diff options
| author | Robert Schütz <nix@dotlambda.de> | 2022-05-02 05:36:53 +0000 |
|---|---|---|
| committer | Robert Schütz <nix@dotlambda.de> | 2022-05-02 19:52:55 +0000 |
| commit | e9452b3b3ed9b295e1cede48f6549bb28c1d4773 (patch) | |
| tree | 1188db2e6972f299554726d8e54df9ac196b9255 | |
| parent | terraform-providers: update 2022-05-02 (diff) | |
| download | nixpkgs-e9452b3b3ed9b295e1cede48f6549bb28c1d4773.tar.gz | |
python3Packages.preprocess-cancellation: fix build
| -rw-r--r-- | pkgs/development/python-modules/preprocess-cancellation/default.nix | 42 | ||||
| -rw-r--r-- | pkgs/development/python-modules/preprocess-cancellation/pep-621.patch | 20 |
2 files changed, 56 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/preprocess-cancellation/default.nix b/pkgs/development/python-modules/preprocess-cancellation/default.nix index d671cb4d66eb..44a54810e443 100644 --- a/pkgs/development/python-modules/preprocess-cancellation/default.nix +++ b/pkgs/development/python-modules/preprocess-cancellation/default.nix @@ -1,6 +1,11 @@ -{ lib, fetchFromGitHub, buildPythonPackage, pythonOlder, poetry-core -, pytestCheckHook, pytest-cov -, shapely }: +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, poetry-core +, shapely +, pytestCheckHook +}: buildPythonPackage rec { pname = "preprocess-cancellation"; @@ -16,11 +21,36 @@ buildPythonPackage rec { hash = "sha256-mn3/etXA5dkL+IsyxwD4/XjU/t4/roYFVyqQxlLOoOI="; }; - nativeBuildInputs = [ poetry-core ]; + patches = [ + ./pep-621.patch + ]; - propagatedBuildInputs = [ shapely ]; + postPatch = '' + sed -i "/^addopts/d" pyproject.toml - checkInputs = [ pytestCheckHook pytest-cov ]; + # 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" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + shapely + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "preprocess_cancellation" ]; meta = with lib; { description = "Klipper GCode Preprocessor for Object Cancellation"; diff --git a/pkgs/development/python-modules/preprocess-cancellation/pep-621.patch b/pkgs/development/python-modules/preprocess-cancellation/pep-621.patch new file mode 100644 index 000000000000..48d8db33d465 --- /dev/null +++ b/pkgs/development/python-modules/preprocess-cancellation/pep-621.patch @@ -0,0 +1,20 @@ +diff --git a/pyproject.toml b/pyproject.toml +index da1376e..88298a7 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,11 +1,11 @@ +-[tool.poetry]
++[project]
+ name = "preprocess_cancellation"
+ version = "0.2.0"
+ description = "GCode processor to add klipper cancel-object markers"
+ readme = "README.md"
+-authors = ["Franklyn Tackitt <im@frank.af>"]
+-repository = "https://github.com/kageurufu/cancelobject-preprocessor"
+-license = "GPL-3.0-only"
++authors = [ { name = "Franklyn Tackitt", email = "im@frank.af" } ]
++urls.repository = "https://github.com/kageurufu/cancelobject-preprocessor"
++license.text = "GPL-3.0-only"
+
+ [tool.poetry.urls]
+ "Bug Tracker" = "https://github.com/kageurufu/cancelobject-preprocessor/issues"
|
