Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytest, 6 mock, 7 numpy, 8 multipledispatch, 9 python-dateutil, 10 setuptools, 11 versioneer, 12}: 13 14let 15 # Fetcher function looks similar to fetchPypi. 16 # Allows for easier overriding, without having to know 17 # how the source is actually fetched. 18 fetcher = 19 { 20 pname, 21 version, 22 sha256, 23 }: 24 fetchFromGitHub { 25 owner = "blaze"; 26 repo = pname; 27 rev = version; 28 inherit sha256; 29 }; 30in 31buildPythonPackage rec { 32 pname = "datashape"; 33 version = "0.5.4"; 34 35 pyproject = true; 36 build-system = [ 37 setuptools 38 versioneer 39 ]; 40 41 src = fetcher { 42 inherit pname version; 43 sha256 = "0rhlj2kjj1vx5m73wnc5518rd6cs1zsbgpsvzk893n516k69shcf"; 44 }; 45 46 postPatch = '' 47 # Remove vendorized versioneer.py 48 rm versioneer.py 49 ''; 50 51 nativeCheckInputs = [ 52 pytest 53 mock 54 ]; 55 dependencies = [ 56 numpy 57 multipledispatch 58 python-dateutil 59 ]; 60 61 # Disable several tests 62 # https://github.com/blaze/datashape/issues/232 63 checkPhase = '' 64 pytest --ignore datashape/tests/test_str.py \ 65 --ignore datashape/tests/test_user.py 66 ''; 67 68 # https://github.com/blaze/datashape/issues/238 69 PYTEST_ADDOPTS = "-k 'not test_record and not test_tuple'"; 70 71 meta = { 72 homepage = "https://github.com/ContinuumIO/datashape"; 73 description = "Data description language"; 74 license = lib.licenses.bsd2; 75 }; 76}