nixpkgs/pkgs/development/python-modules/cached-ipaddress/default.nix
Martin Weinelt 528354e66c
python312Packages.cython: 0.29.36 -> 3.0.9
Folds the cython_3 attribute into the primary cython attribute and
migrates all packages from the versioned attribute.

The old version will be provided through the cython_0 attribute in an
effort to phase it out.
2024-03-27 18:35:05 +01:00

55 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, cython
, fetchFromGitHub
, poetry-core
, pytestCheckHook
, pythonOlder
, setuptools
, wheel
}:
buildPythonPackage rec {
pname = "cached-ipaddress";
version = "0.3.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "bdraco";
repo = "cached-ipaddress";
rev = "refs/tags/v${version}";
hash = "sha256-iTQ1DSCZqjAzsf95nYUxnNj5YCb1Y4JIUW5VGIi7yoY=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=cached_ipaddress --cov-report=term-missing:skip-covered" "" \
--replace "Cython>=3.0.5" "Cython"
'';
nativeBuildInputs = [
cython
poetry-core
setuptools
wheel
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"cached_ipaddress"
];
meta = with lib; {
description = "Cache construction of ipaddress objects";
homepage = "https://github.com/bdraco/cached-ipaddress";
changelog = "https://github.com/bdraco/cached-ipaddress/blob/${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}