diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 93458fb1621..4f4be10a472 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -3613,63 +3613,64 @@ phylogenetic markers, and can also scale to very large phylogenies comprising (define-public python-pybedtools (package (name "python-pybedtools") - (version "0.10.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "pybedtools" version)) - (sha256 - (base32 - "0q8if5bd8zgv5xvr5zs4pj8y60yzl8i5jz8xfk6bw4xh4fnvlvqs")))) + (version "0.12.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pybedtools" version)) + (sha256 + (base32 "0jbjaj0n34k64jp5q3l653qrrxwd8d276hqbq1ii7j3rcngyr1l7")) + (snippet + ;; Force the Cythonization of C++ files to guard against compilation + ;; problems. + #~(begin + (use-modules (guix build utils)) + (use-modules (srfi srfi-26)) + (let ((cython-sources (map (cut string-drop-right <> 4) + (find-files "." "\\.pyx$"))) + (c/c++-files (find-files "." "\\.(c|cpp|cxx)$"))) + (define (strip-extension filename) + (string-take filename (string-index-right filename #\.))) + (define (cythonized? c/c++-file) + (member (strip-extension c/c++-file) cython-sources)) + (for-each delete-file (filter cythonized? c/c++-files))))))) (build-system pyproject-build-system) (arguments (list - #:modules '((srfi srfi-26) - (guix build utils) - (guix build python-build-system) - (guix build pyproject-build-system)) + #:build-backend "setuptools.build_meta" + ;; tests: 508 passed, 1 deselected, 3 xfailed #:test-flags - ;; Requires internet access. - '(list "-k" "not test_chromsizes") + #~(list "--pyargs" "pybedtools" + ;; ValueError: It appears you don't have an internet connection + ;; -- unable to get chromsizes from UCSC + "--deselect=test/test_helpers.py::test_chromsizes") #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'fix-references - (lambda _ - (substitute* "pybedtools/test/test_issues.py" - (("'/bin/bash'") (string-append "'" (which "bash") "'"))))) - ;; Force the Cythonization of C++ files to guard against compilation - ;; problems. - (add-after 'unpack 'remove-cython-generated-files - (lambda _ - (let ((cython-sources (map (cut string-drop-right <> 4) - (find-files "." "\\.pyx$"))) - (c/c++-files (find-files "." "\\.(c|cpp|cxx)$"))) - (define (strip-extension filename) - (string-take filename (string-index-right filename #\.))) - (define (cythonized? c/c++-file) - (member (strip-extension c/c++-file) cython-sources)) - (for-each delete-file (filter cythonized? c/c++-files))))) - (add-after 'remove-cython-generated-files 'generate-cython-extensions - (lambda _ - (invoke "python" "setup.py" "cythonize"))) - (add-before 'check 'build-extensions - (lambda _ - ;; Cython extensions have to be built before running the tests. - (invoke "python" "setup.py" "build_ext" "--inplace")))))) + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-references + (lambda _ + (substitute* "pybedtools/test/test_issues.py" + (("'/bin/bash'") (string-append "'" (which "bash") "'"))))) + (add-before 'build 'generate-cython-extensions + (lambda _ + (invoke "python" "setup.py" "cythonize"))) + (add-before 'check 'remove-local-source + (lambda _ + (delete-file-recursively "pybedtools")))))) (propagated-inputs - (list bedtools samtools + (list bedtools kentutils ;for bedGraphToBigWig python-numpy python-pandas python-psutil python-pysam - python-pyyaml)) + python-pyyaml + samtools)) (inputs (list zlib)) (native-inputs (list python-cython python-pytest - python-setuptools - python-wheel)) + python-setuptools)) (home-page "https://pythonhosted.org/pybedtools/") (synopsis "Python wrapper for BEDtools programs") (description