python3Packages.python-tsp: init at 0.5.0 (#427160)

This commit is contained in:
Aleksana
2025-07-24 21:56:30 +08:00
committed by GitHub
2 changed files with 59 additions and 0 deletions
@@ -0,0 +1,57 @@
{
# Basic
lib,
buildPythonPackage,
fetchFromGitHub,
# Build system
poetry-core,
# Dependencies
numpy,
requests,
tsplib95,
# Test
pytestCheckHook,
mock,
}:
buildPythonPackage rec {
pname = "python-tsp";
version = "0.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "fillipe-gsm";
repo = "python-tsp";
tag = "v${version}";
hash = "sha256-X4L0j6ZL8/Xj2YFcvwOl8voC2xHagMcdcj9F1f/6/5M=";
};
build-system = [ poetry-core ];
dependencies = [
numpy
requests
tsplib95
];
# Rename some dependencies
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "poetry>=0.12" "poetry-core>=0.12" \
--replace-fail "poetry.masonry.api" "poetry.core.masonry.api"
'';
nativeCheckInputs = [
pytestCheckHook
mock
];
pythonImportsCheck = [ "python_tsp" ];
meta = {
description = "Library for solving typical Traveling Salesperson Problems (TSP)";
homepage = "https://github.com/fillipe-gsm/python-tsp";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ thattemperature ];
};
}
+2
View File
@@ -14784,6 +14784,8 @@ self: super: with self; {
python-trovo = callPackage ../development/python-modules/python-trovo { };
python-tsp = callPackage ../development/python-modules/python-tsp { };
python-twitch-client = callPackage ../development/python-modules/python-twitch-client { };
python-twitter = callPackage ../development/python-modules/python-twitter { };