diff options
author | Thiago Kenji Okada <thiagokokada@gmail.com> | 2024-03-14 10:47:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-14 10:47:45 +0000 |
commit | 515721aa97ad21ac28230bd2e161ea9c8cefaa53 (patch) | |
tree | 99562cce70f7a20df9ecab995116030cd5f049ed | |
parent | 7b97c01386f469f0e0c983fe61ec26cc7bb916ce (diff) | |
parent | 5e00e168e2dc34c44b40ebe31e8c62a4d6510f8a (diff) |
Merge pull request #292201 from lucasew/orange3/fix-setuptools
python3Packages.orange3: fix ModuleNotFoundError pkg_resources
-rw-r--r-- | pkgs/development/python-modules/orange3/default.nix | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/orange3/default.nix b/pkgs/development/python-modules/orange3/default.nix index fe7f775541822..1c4531254ae8c 100644 --- a/pkgs/development/python-modules/orange3/default.nix +++ b/pkgs/development/python-modules/orange3/default.nix @@ -4,7 +4,10 @@ , buildPythonPackage , chardet , copyDesktopItems +, pythonRelaxDepsHook , cython +, catboost +, xgboost , fetchFromGitHub , fetchurl , httpx @@ -45,7 +48,7 @@ let self = buildPythonPackage rec { pname = "orange3"; version = "3.36.2"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -58,15 +61,17 @@ let postPatch = '' substituteInPlace pyproject.toml \ - --replace "setuptools>=41.0.0,<50.0" "setuptools" - sed -i 's;\(scikit-learn\)[^$]*;\1;g' requirements-core.txt - sed -i 's;pyqtgraph[^$]*;;g' requirements-gui.txt # TODO: remove after bump with a version greater than 0.13.1 + --replace-fail 'cython>=3.0' 'cython' + + # disable update checking + echo -e "def check_for_updates():\n\tpass" >> Orange/canvas/__main__.py ''; nativeBuildInputs = [ copyDesktopItems - cython + pythonRelaxDepsHook oldest-supported-numpy + cython qt5.wrapQtAppsHook recommonmark setuptools @@ -76,13 +81,18 @@ let enableParallelBuilding = true; + pythonRelaxDeps = [ "scikit-learn" ]; + propagatedBuildInputs = [ numpy scipy chardet + catboost + xgboost openpyxl opentsne qtconsole + setuptools bottleneck matplotlib joblib @@ -107,6 +117,9 @@ let # FIXME: ImportError: cannot import name '_variable' from partially initialized module 'Orange.data' (most likely due to a circular import) (/build/source/Orange/data/__init__.py) doCheck = false; + # FIXME: pythonRelaxDeps is not relaxing the scikit-learn version constraint, had to disable this + dontCheckRuntimeDeps = true; + pythonImportsCheck = [ "Orange" "Orange.data._variable" ]; desktopItems = [ |