python312Packages.partd: fix build, refactor
Partd ships with a broken vendored versioneer file, that calls into things that are not available on 3.12 anymore. Update dependencies, use the pytest hook instead of overriding the checkPhase.
This commit is contained in:
parent
dfd39c05a8
commit
d5c1111cf2
1 changed files with 43 additions and 14 deletions
|
@ -1,14 +1,24 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchFromGitHub
|
||||||
, isPy27
|
, fetchpatch2
|
||||||
|
, pythonOlder
|
||||||
|
|
||||||
|
# build-system
|
||||||
, setuptools
|
, setuptools
|
||||||
, pytest
|
|
||||||
|
# dependencies
|
||||||
, locket
|
, locket
|
||||||
|
, toolz
|
||||||
|
|
||||||
|
# optional-dependencies
|
||||||
|
, blosc2
|
||||||
, numpy
|
, numpy
|
||||||
, pandas
|
, pandas
|
||||||
, pyzmq
|
, pyzmq
|
||||||
, toolz
|
|
||||||
|
# tests
|
||||||
|
, pytestCheckHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -16,25 +26,44 @@ buildPythonPackage rec {
|
||||||
version = "1.4.1";
|
version = "1.4.1";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = isPy27;
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "dask";
|
||||||
hash = "sha256-VsJd1J5v6lcn5zEgPEZsbgkvMI2PACThmdAvaqIWf2c=";
|
repo = "partd";
|
||||||
|
rev = "refs/tags/${version}";
|
||||||
|
hash = "sha256-EK+HNSPh2b7jwpc6jwH/n+6HDgHhRfBeaRuiDIWVG28=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch2 {
|
||||||
|
# python 3.12 support; https://github.com/dask/partd/pull/70
|
||||||
|
url = "https://github.com/dask/partd/pull/70/commits/c96a034367cb9fee0a0900f758b802aeef8a8a41.patch";
|
||||||
|
hash = "sha256-QlSIrFQQQo9We/gf7WSgmWrxdt3rxXQcyvJnFm8R5cM=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
setuptools
|
setuptools
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [ pytest ];
|
propagatedBuildInputs = [
|
||||||
|
locket
|
||||||
|
toolz
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ locket numpy pandas pyzmq toolz ];
|
passthru.optional-dependencies = {
|
||||||
|
complete = [
|
||||||
|
blosc2
|
||||||
|
numpy
|
||||||
|
pandas
|
||||||
|
pyzmq
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
checkPhase = ''
|
nativeCheckInputs = [
|
||||||
rm partd/tests/test_zmq.py # requires network & fails
|
pytestCheckHook
|
||||||
py.test -k "not test_serialize"
|
];
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Appendable key-value storage";
|
description = "Appendable key-value storage";
|
||||||
|
|
Loading…
Reference in a new issue