14910f5943
GitOrigin-RevId: 5aaed40d22f0d9376330b6fa413223435ad6fee5
59 lines
1.1 KiB
Nix
59 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, isPy3k
|
|
, pytestCheckHook
|
|
, python
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "frozendict";
|
|
version = "2.1.1";
|
|
format = "setuptools";
|
|
|
|
disabled = !isPy3k;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "655b879217dd445a2023e16154cc231febef802b5c812d5c2e822280ad69e1dc";
|
|
};
|
|
|
|
postPatch = ''
|
|
# fixes build on non-x86_64 architectures
|
|
rm frozendict/src/3_9/cpython_src/Include/pyconfig.h
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"frozendict"
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
preCheck = ''
|
|
rm -r frozendict
|
|
export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
|
|
'';
|
|
|
|
disabledTests = [
|
|
# TypeError: unsupported operand type(s) for |=: 'frozendict.frozendict' and 'dict'
|
|
"test_union"
|
|
# non-standard assertions
|
|
"test_repr"
|
|
"test_format"
|
|
"test_str"
|
|
];
|
|
|
|
disabledTestPaths = [
|
|
# unpackaged test dependency: coold
|
|
"test/test_coold.py"
|
|
"test/test_coold_subclass.py"
|
|
];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/slezica/python-frozendict";
|
|
description = "An immutable dictionary";
|
|
license = licenses.mit;
|
|
};
|
|
}
|