nixpkgs/pkgs/development/python-modules/frozendict/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonAtLeast
, pythonOlder
}:
2018-04-21 16:48:10 +00:00
buildPythonPackage rec {
pname = "frozendict";
version = "2.3.5";
format = "setuptools";
disabled = pythonOlder "3.7";
2018-04-21 16:48:10 +00:00
src = fetchFromGitHub {
owner = "Marco-Sulla";
repo = "python-frozendict";
rev = "refs/tags/v${version}";
hash = "sha256-IlKhqQvNaYz4+U8UJ/fGUNNTC3RjyGKCJUzJ6J431Vw=";
2018-04-21 16:48:10 +00:00
};
postPatch = ''
# https://github.com/Marco-Sulla/python-frozendict/pull/69
substituteInPlace setup.py \
--replace 'if impl == "PyPy":' 'if impl == "PyPy" or not src_path.exists():'
'';
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"frozendict"
];
preCheck = ''
pushd test
'';
disabledTests = lib.optionals (pythonAtLeast "3.11") [
# https://github.com/Marco-Sulla/python-frozendict/issues/68
"test_c_extension"
];
meta = with lib; {
description = "Module for immutable dictionary";
homepage = "https://github.com/Marco-Sulla/python-frozendict";
changelog = "https://github.com/Marco-Sulla/python-frozendict/releases/tag/v${version}";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ ];
2018-04-21 16:48:10 +00:00
};
}