(define-module (cyvcf2) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages autotools) #:use-module (gnu packages build-tools) #:use-module (gnu packages cmake) #:use-module (gnu packages check) #:use-module (gnu packages python) #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-xyz) #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) #:use-module (gnu packages bioinformatics) #:use-module (gnu packages serialization) #:use-module (gnu packages compression) #:use-module (gnu packages curl) #:use-module (gnu packages tls) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system python) #:use-module (guix build-system cargo) #:use-module (guix build-system cmake) #:use-module (guix build-system pyproject)) (define-public python-cyvcf2 (package (name "python-cyvcf2") (version "0.30.28") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/brentp/cyvcf2") (commit (string-append "v" version)))) (sha256 (base32 "16yhfax509zyip8kkq2b0lflx5bdq5why7d785ayrqyzzq2rxqkk")) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "htslib"))))) (build-system pyproject-build-system) (arguments `(#:tests? #f #:phases (modify-phases %standard-phases ; (add-before 'check 'rm-folder ; (lambda _ ; (copy-recursively "cyvcf2/tests" "./tests") ; (delete-file-recursively "cyvcf2") ; (mkdir-p "cyvcf2") ; (copy-recursively "tests" "cyvcf2/tests"))) (add-after 'unpack 'fix-setup (lambda* (#:key inputs #:allow-other-keys) (substitute* "setup.py" ((" or not check_libhts\\(\\)") "") (("library_dirs=htslib_library_dirs") (string-append "library_dirs=[\"" (assoc-ref inputs "htslib") "/lib\"]")) (("\\+ htslib_include_dirs") (string-append "+ [\"" (assoc-ref inputs "htslib") "/include\"]"))))) (add-before 'build 'setenv (lambda _ (setenv "CYTHONIZE" "1") (setenv "CYVCF2_HTSLIB_MODE" "EXTERNAL")))))) (inputs (list htslib zlib libdeflate curl openssl python-cython)) (native-inputs (list python-pytest)) (propagated-inputs (list python-click python-coloredlogs python-numpy)) (home-page "https://github.com/brentp/cyvcf2/") (synopsis "fast vcf parsing with cython + htslib") (description "fast vcf parsing with cython + htslib") (license license:expat)))