blob: 7751fdc448d5ffb647ec6effaf2b2d4d1ceb1607 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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 ];
};
}
|