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