12 buildPythonPackage rec {
13 pname = "preprocess-cancellation";
15 disabled = pythonOlder "3.6"; # >= 3.6
19 src = fetchFromGitHub {
21 repo = "cancelobject-preprocessor";
22 rev = "refs/tags/${version}";
23 hash = "sha256-MJ4mwOFswLYHhg2LNZ+/ZwDvSjoxElVxlaWjArHV2NY=";
27 sed -i "/^addopts/d" pyproject.toml
29 # setuptools 61 compatibility
30 # error: Multiple top-level packages discovered in a flat-layout: ['STLs', 'GCode'].
32 mv GCode STLs test_* tests
33 substituteInPlace tests/test_preprocessor.py \
34 --replace "./GCode" "./tests/GCode"
35 substituteInPlace tests/test_preprocessor_with_shapely.py \
36 --replace "./GCode" "./tests/GCode"
44 propagatedBuildInputs = [ shapely ];
46 nativeCheckInputs = [ pytestCheckHook ];
48 pythonImportsCheck = [ "preprocess_cancellation" ];
51 description = "Klipper GCode Preprocessor for Object Cancellation";
52 homepage = "https://github.com/kageurufu/cancelobject-preprocessor";
53 license = licenses.gpl3Only;
54 maintainers = with maintainers; [ zhaofengli ];