~ruther/guix-local

cecb6f161d08d6121b56ebb8c25beec8f86f52af — Andreas Enge 6 months ago c3b9d03
gnu: Remove python-skranger.

* gnu/packages/python-xyz.scm (python-skranger): Delete variable.

Fixes: guix/guix#2921
Change-Id: I19b5ab9df38e4d41e3b01fe4fd9183a282bf9287
1 files changed, 0 insertions(+), 67 deletions(-)

M gnu/packages/python-xyz.scm
M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +0 -67
@@ 3408,73 3408,6 @@ commits.")
generator MkDocs.")
    (license license:expat)))

(define-public python-skranger
  (package
    (name "python-skranger")
    (version "0.8.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/crflynn/skranger")
                    (commit version)
                    (recursive? #true)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0njy4xbc98l295k92nyk93njv1348vd1il5pdyrnk8nnzc2anzf0"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:modules '((guix build pyproject-build-system)
                  (guix build utils)
                  (ice-9 match))
      #:test-flags
      ;; "from sklearn.datasets import load_boston" fails because it has been
      ;; removed from scikit-learn since version 1.2.
      '(list "--ignore=tests/conftest.py"
             "--ignore=tests/test_tools.py"
             "--ignore=tests/tree/test_regressor.py"
             "--ignore=tests/ensemble/test_regressor.py"
             ;; All tests fail with error: AttributeError: 'super' object has
             ;; no attribute '__sklearn_tags__'
             "--ignore=tests/tree/test_classifier.py"
             "--ignore=tests/ensemble/test_classifier.py")
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'fix-tests
            (lambda _
              (substitute* "tests/conftest.py"
                (("from sklearn.datasets import load_boston") "")
                (("^_boston_X.*") "_boston_X, _boston_Y = (True, True)\n"))))
          (add-before 'check 'build-extensions
            (lambda _
              ;; Cython extensions have to be built before running the tests.
              (invoke "python" "buildpre.py")
              (invoke "python" "build.py" "build_ext" "--inplace")
              (let ((site (string-append #$output "/lib/python"
                                         #$(version-major+minor
                                            (package-version python))
                                         "/site-packages/skranger"))
                    (lib (match (find-files "build" "\\.so")
                           ((the-lib) the-lib)
                           (_ (error "could not find .so")))))
                (mkdir-p site)
                (install-file lib site)))))))
    (propagated-inputs (list python-scikit-learn))
    (native-inputs
     (list python-cython
           python-matplotlib
           python-pandas
           python-poetry-core
           python-setuptools
           python-wheel
           python-pytest))
    (home-page "https://github.com/crflynn/skranger")
    (synopsis "Python bindings for C++ ranger random forests")
    (description "This package provides scikit-learn compatible Python
bindings to the C++ random forest implementation, ranger, using Cython.")
    (license license:gpl3+)))

(define-public python-nanobind
  (package
    (name "python-nanobind")