gnu: python-pyvo: Update to 1.8.

* gnu/packages/astronomy.scm (python-pyvo): Update to 1.8.
[source]: Switch to git-fetch.
[arguments] <test-flags>: Enable all test.
<phases>: Add 'set-version, 'include-package-data, and 'post-check.

Change-Id: Iecaf3df03989ace2e76f35d7a3960b3b3c9bb31a
This commit is contained in:
Sharlatan Hellseher 2025-11-20 00:33:47 +00:00
parent bf645aa895
commit 7b2c0c8a66
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -7289,26 +7289,41 @@ spectra, and data.")
(define-public python-pyvo
(package
(name "python-pyvo")
(version "1.7.1")
(version "1.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pyvo" version))
(method git-fetch)
(uri (git-reference
(url "https://github.com/astropy/pyvo")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1zr1vwcpypr6hr9h02gprchrhcah1vffcxjvqg9xl2yxj48qzpa1"))))
(base32 "0ks1542i85y042yny3ka6gsrgy7pyv0xdaclirmvqrkakikhv70b"))))
(build-system pyproject-build-system)
(arguments
(list
;; tests: 430 passed, 56 skipped, 1 xfailed
#:test-flags
#~(list "--pyargs" "pyvo"
;; XXX: Some data file was not copied in install phase:
;; urllib.error.URLError: <urlopen error [Errno 2] No such file
;; or directory
;; <.../lib/python3.11/site-packages/pyvo/mivot/writer/mivot-v1.xsd>.
"-k" (string-join
(list "not test_all_properties"
"test_extraction_from_votable_header")
" and not "))))
#~(list "--pyargs" "pyvo")
#:phases
#~(modify-phases %standard-phases
(add-before 'build 'set-version
(lambda _
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
(add-after 'install 'include-package-data
;; FIXME: Check why pyproject-build-system ignores coping some
;; package data files during build/install phases.
(lambda* (#:key inputs outputs #:allow-other-keys)
(for-each
(lambda (file)
(install-file file
(string-append (site-packages inputs outputs)
"/pyvo/mivot/writer/")))
(find-files "pyvo/mivot/writer" "\\.xsd$"))))
(add-before 'check 'post-check
(lambda _
(for-each delete-file-recursively
(find-files #$output "__pycache__" #:directories? #t)))))))
(native-inputs
(list python-pytest-astropy
python-pytest-doctestplus