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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
pytest,
mock,
numpy,
multipledispatch,
python-dateutil,
setuptools,
versioneer,
}:
let
# Fetcher function looks similar to fetchPypi.
# Allows for easier overriding, without having to know
# how the source is actually fetched.
fetcher =
{
pname,
version,
sha256,
}:
fetchFromGitHub {
owner = "blaze";
repo = pname;
rev = version;
inherit sha256;
};
in
buildPythonPackage rec {
pname = "datashape";
version = "0.5.4";
pyproject = true;
build-system = [
setuptools
versioneer
];
src = fetcher {
inherit pname version;
sha256 = "0rhlj2kjj1vx5m73wnc5518rd6cs1zsbgpsvzk893n516k69shcf";
};
postPatch = ''
# Remove vendorized versioneer.py
rm versioneer.py
'';
nativeCheckInputs = [
pytest
mock
];
dependencies = [
numpy
multipledispatch
python-dateutil
];
# Disable several tests
# https://github.com/blaze/datashape/issues/232
checkPhase = ''
pytest --ignore datashape/tests/test_str.py \
--ignore datashape/tests/test_user.py
'';
# https://github.com/blaze/datashape/issues/238
PYTEST_ADDOPTS = "-k 'not test_record and not test_tuple'";
meta = {
homepage = "https://github.com/ContinuumIO/datashape";
description = "Data description language";
license = lib.licenses.bsd2;
};
}
|