pythonPackages.pycodec2: init at 4.1.1

Co-authored-by: Gaétan Lepage <gaetan@glepage.com>
Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com>
This commit is contained in:
Pol Dellaiera
2026-06-02 14:41:31 +02:00
co-authored by Gaétan Lepage Benjamin Saunders
parent 12fd79babe
commit 9b36710b9f
2 changed files with 70 additions and 0 deletions
@@ -0,0 +1,68 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
cython,
numpy,
setuptools,
# buildInputs
codec2,
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "pycodec2";
version = "4.1.1";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "gregorias";
repo = "pycodec2";
tag = "v${finalAttrs.version}";
hash = "sha256-DDO18uhAhZGaD04rAPinZhkNTww3ibEhw1uJwTtJYWk=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "numpy==2.1.*" "numpy"
'';
build-system = [
cython
numpy
setuptools
];
buildInputs = [
codec2
];
dependencies = [
numpy
];
pythonImportsCheck = [ "pycodec2" ];
nativeCheckInputs = [
pytestCheckHook
];
preCheck = ''
rm -rf pycodec2
'';
# The only test fails with a cryptic AssertionError
doCheck = false;
meta = {
description = "Python's interface to codec 2";
homepage = "https://github.com/gregorias/pycodec2";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ drupol ];
};
})
+2
View File
@@ -13703,6 +13703,8 @@ self: super: with self; {
pycocotools = callPackage ../development/python-modules/pycocotools { };
pycodec2 = callPackage ../development/python-modules/pycodec2 { };
pycodestyle = callPackage ../development/python-modules/pycodestyle { };
pycognito = callPackage ../development/python-modules/pycognito { };