gnu: python-astral: Update to 3.2.

* gnu/packages/astronomy.scm (python-astral): Update to 3.2.
[build-system]: Switch to pyproject-build-system.
[arguments]: Do not override the 'check phase, specify #:test-flags and skip
failing tests.  Add 'prepare-test-environment phase.  Use G-Expressions.
[native-inputs]: Add python-poetry-core, python-pytest.

Signed-off-by: Vinicius Monego <monego@posteo.net>
This commit is contained in:
Sharlatan Hellseher 2023-05-24 22:51:48 +01:00 committed by Vinicius Monego
parent 740ebec5aa
commit 264d08fdc4
No known key found for this signature in database
GPG Key ID: 637B0B138065B68A

View File

@ -1937,24 +1937,55 @@ SolarSoft data analysis environment.")
(define-public python-astral (define-public python-astral
(package (package
(name "python-astral") (name "python-astral")
(version "2.2") (version "3.2")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "astral" version)) (uri (pypi-uri "astral" version))
(sha256 (sha256
(base32 "1gkggdibccmdy9glymw3kbrkzm6svvsg0lk56hhy92y4smkrj7g4")))) (base32 "121xag65rmv6pszbi3d206yz3jfwmpkf0jxjrxrd2scy5r0knz4v"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:test-flags
(replace 'check ;; XXX: Disable tests which require newer version of python-pytz.
(lambda* (#:key inputs outputs tests? #:allow-other-keys) ;; No time zone found with key Pacific/Auckland
(when tests? #~(list "-k" (string-append
(add-installed-pythonpath inputs outputs) "not test_TimezoneLookup"
(invoke "python" "-m" "pytest"))))))) " and not test_Sun"
" and not test_Dawn"
" and not test_Sunrise"
" and not test_SolarNoon"
" and not test_Dusk"
" and not test_Sunset"
" and not test_SolarElevation"
" and not test_SolarAzimuth"
" and not test_TimeAtAltitude"
" and not test_MoonNoDate"
" and not test_lookup"
" and not test_tzinfo"
" and not test_australia"
" and not test_adak"
" and not test_australia"
" and not test_Elevation_NonNaive"
" and not test_Wellington"
" and not test_Sun_Local_tzinfo"
" and not test_Sun_Local_str"
" and not test_SolarZenith_London"
" and not test_SolarZenith_Riyadh"
" and not test_moonrise_utc"
" and not test_moonrise_wellington"
" and not test_moonset_wellington"))
#:phases
#~(modify-phases %standard-phases
(add-before 'check 'prepare-test-environment
(lambda _
(setenv "HOME" "/tmp"))))))
(native-inputs (native-inputs
(list python-freezegun python-setuptools-scm)) (list python-freezegun
python-poetry-core
python-pytest
python-setuptools-scm))
(propagated-inputs (propagated-inputs
(list python-dataclasses python-pytest python-pytz)) (list python-dataclasses python-pytest python-pytz))
(home-page "https://github.com/sffjunkie/astral") (home-page "https://github.com/sffjunkie/astral")