Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pythonOlder, 6 7 # build-system 8 setuptools, 9 10 # optional-dependencies 11 lxml, 12 matplotlib, 13 numpy, 14 pandas, 15 pydot, 16 pygraphviz, 17 scipy, 18 sympy, 19 20 # tests 21 pytest-xdist, 22 pytestCheckHook, 23 24 # reverse dependency 25 sage, 26}: 27 28buildPythonPackage rec { 29 pname = "networkx"; 30 # upgrade may break sage, please test the sage build or ping @timokau on upgrade 31 version = "3.3"; 32 pyproject = true; 33 34 disabled = pythonOlder "3.8"; 35 36 src = fetchPypi { 37 inherit pname version; 38 hash = "sha256-DBJ9iy9IZfWa6cuKr81gtccPMkHr1m997618SrkBJsk="; 39 }; 40 41 nativeBuildInputs = [ setuptools ]; 42 43 passthru.optional-dependencies = { 44 default = [ 45 numpy 46 scipy 47 matplotlib 48 pandas 49 ]; 50 extra = [ 51 lxml 52 pygraphviz 53 pydot 54 sympy 55 ]; 56 }; 57 58 passthru.tests = { 59 inherit sage; 60 }; 61 62 nativeCheckInputs = [ 63 pytest-xdist 64 pytestCheckHook 65 ]; 66 67 disabledTests = [ 68 # No warnings of type (<class 'DeprecationWarning'>, <class 'PendingDeprecationWarning'>, <class 'FutureWarning'>) were emitted. 69 "test_connected_raise" 70 ]; 71 72 meta = { 73 changelog = "https://github.com/networkx/networkx/blob/networkx-${version}/doc/release/release_${version}.rst"; 74 homepage = "https://networkx.github.io/"; 75 downloadPage = "https://github.com/networkx/networkx"; 76 description = "Library for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks"; 77 license = lib.licenses.bsd3; 78 }; 79}