python3Packages.rectangle-packer: init at 2.0.2

This commit is contained in:
Federico Beffa
2025-03-04 17:45:45 +01:00
parent 60cde9e4b9
commit 52ffcb6cd4
2 changed files with 48 additions and 0 deletions
@@ -0,0 +1,46 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
cython,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "rectangle-packer";
version = "2.0.2";
pyproject = true;
src = fetchFromGitHub {
owner = "Penlect";
repo = "rectangle-packer";
rev = version;
hash = "sha256-YsMLB9jfAC5yB8TnlY9j6ybXM2ILireOgQ8m8wYo4ts=";
};
build-system = [
cython
setuptools
];
postPatch = ''
substituteInPlace setup.py \
--replace-fail 'Cython<3.0.0' 'Cython'
'';
pythonImportsCheck = [ "rpack" ];
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
rm -r rpack
'';
meta = with lib; {
description = "Pack a set of rectangles into a bounding box with minimum area";
homepage = "https://github.com/Penlect/rectangle-packer";
license = licenses.mit;
maintainers = with maintainers; [ fbeffa ];
};
}
+2
View File
@@ -13914,6 +13914,8 @@ self: super: with self; {
rectpack = callPackage ../development/python-modules/rectpack { };
rectangle-packer = callPackage ../development/python-modules/rectangle-packer { };
recurring-ical-events = callPackage ../development/python-modules/recurring-ical-events { };
recursive-pth-loader = toPythonModule (callPackage ../development/python-modules/recursive-pth-loader { });