at master 1.1 kB view raw
1{ 2 # Basic 3 lib, 4 buildPythonPackage, 5 fetchFromGitHub, 6 # Build system 7 setuptools, 8 # Dependencies 9 click, 10 deprecated, 11 networkx, 12 tabulate, 13 # Test 14 pytestCheckHook, 15}: 16 17buildPythonPackage rec { 18 pname = "tsplib95"; 19 version = "0.7.1"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "rhgrant10"; 24 repo = "tsplib95"; 25 tag = "v${version}"; 26 hash = "sha256-rDKnfuauA9+mlgL6Prfz0uRP2rWxiQruXBj422/6Eak="; 27 }; 28 29 build-system = [ setuptools ]; 30 31 dependencies = [ 32 click 33 deprecated 34 networkx 35 tabulate 36 ]; 37 38 # Remove deprecated pytest-runner 39 postPatch = '' 40 substituteInPlace setup.py \ 41 --replace-fail "'pytest-runner'," "" 42 ''; 43 44 pythonRelaxDeps = [ 45 "networkx" 46 "tabulate" 47 ]; 48 49 nativeCheckInputs = [ 50 pytestCheckHook 51 ]; 52 53 pythonImportsCheck = [ "tsplib95" ]; 54 55 meta = { 56 description = "Library for working with TSPLIB 95 files"; 57 homepage = "https://github.com/rhgrant10/tsplib95"; 58 mainProgram = "tsplib95"; 59 license = lib.licenses.asl20; 60 maintainers = with lib.maintainers; [ thattemperature ]; 61 }; 62}