mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
python312Packages.preprocess-cancellation: only use poetry-core
This commit is contained in:
parent
e8aede8883
commit
a3881c1695
@ -4,7 +4,6 @@
|
||||
pythonOlder,
|
||||
fetchFromGitHub,
|
||||
poetry-core,
|
||||
setuptools,
|
||||
shapely,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
@ -13,7 +12,7 @@ buildPythonPackage rec {
|
||||
pname = "preprocess-cancellation";
|
||||
version = "0.2.1";
|
||||
disabled = pythonOlder "3.6"; # >= 3.6
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
# No tests in PyPI
|
||||
src = fetchFromGitHub {
|
||||
@ -26,22 +25,20 @@ buildPythonPackage rec {
|
||||
postPatch = ''
|
||||
sed -i "/^addopts/d" pyproject.toml
|
||||
|
||||
# setuptools 61 compatibility
|
||||
# error: Multiple top-level packages discovered in a flat-layout: ['STLs', 'GCode'].
|
||||
mkdir tests
|
||||
mv GCode STLs test_* tests
|
||||
substituteInPlace tests/test_preprocessor.py \
|
||||
--replace "./GCode" "./tests/GCode"
|
||||
substituteInPlace tests/test_preprocessor_with_shapely.py \
|
||||
--replace "./GCode" "./tests/GCode"
|
||||
cat >> pyproject.toml << EOF
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
EOF
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
build-system = [
|
||||
poetry-core
|
||||
setuptools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ shapely ];
|
||||
optional-dependencies = {
|
||||
shapely = [ shapely ];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user