depot/third_party/nixpkgs/pkgs/development/python-modules/cached-ipaddress/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

51 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; [ ];
};
}