Jelle van der Waa pushed to branch main at Arch Linux / Packaging / Packages /
python-dateutil
Commits:
2412830e by Jelle van der Waa at 2024-03-02T13:47:37+01:00
Make tests pass
The tests used to run against the installed package, as this package has
a cyclic dependency somewhere in the build tooling. The failing tests
failed because that version of dateutil did not yet support a new
feature, setting PYTHONPATH=src loads the to be packaged version.
To run the tests from Git we need to ensure the zoneinfo tarball is
available for dateutil to load. So we download it to src/dateutil so it
is available to run during tests.
- - - - -
1 changed file:
- PKGBUILD
Changes:
=====================================
PKGBUILD
=====================================
@@ -27,6 +27,12 @@ source=("git+$url.git#commit=$pkgver")
sha256sums=('SKIP')
# validpgpkeys=('5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23') # Mario Corchero
<[email protected]>
+prepare() {
+ cd dateutil
+ # Download the tarball required for running tests
+ PYTHONPATH=src python updatezinfo.py
+}
+
build() {
cd dateutil
python -m build -wn
@@ -35,8 +41,7 @@ build() {
check() {
cd dateutil
# https://github.com/pytest-dev/pytest/issues/5678
- pytest -W ignore::pytest.PytestUnknownMarkWarning \
- --deselect tests/test_imports.py::test_lazy_import
+ PYTHONPATH=src pytest -W ignore::pytest.PytestUnknownMarkWarning .
}
package() {
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/python-dateutil/-/commit/2412830e46b11e92a3c4cd0c997448b3772bf39f
--
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/python-dateutil/-/commit/2412830e46b11e92a3c4cd0c997448b3772bf39f
You're receiving this email because of your account on gitlab.archlinux.org.