2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytest,
|
|
|
|
mock,
|
|
|
|
numpy,
|
|
|
|
multipledispatch,
|
|
|
|
python-dateutil,
|
|
|
|
setuptools,
|
|
|
|
versioneer,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
# Fetcher function looks similar to fetchPypi.
|
|
|
|
# Allows for easier overriding, without having to know
|
|
|
|
# how the source is actually fetched.
|
2024-06-05 15:53:02 +00:00
|
|
|
fetcher =
|
|
|
|
{
|
|
|
|
pname,
|
|
|
|
version,
|
|
|
|
sha256,
|
|
|
|
}:
|
|
|
|
fetchFromGitHub {
|
|
|
|
owner = "blaze";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "datashape";
|
|
|
|
version = "0.5.4";
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
pyproject = true;
|
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
versioneer
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetcher {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0rhlj2kjj1vx5m73wnc5518rd6cs1zsbgpsvzk893n516k69shcf";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Remove vendorized versioneer.py
|
|
|
|
rm versioneer.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest
|
|
|
|
mock
|
|
|
|
];
|
|
|
|
dependencies = [
|
|
|
|
numpy
|
|
|
|
multipledispatch
|
|
|
|
python-dateutil
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# 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";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Data description language";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
};
|
|
|
|
}
|