Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #12923
| Path | csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod |
|---|---|
| From | Louis-Philippe Véronneau <pollo@debian.org> |
| Newsgroups | linux.debian.maint.python |
| Subject | Re: dh_auto_test failure with pybuild due to missing PYTHONPATH |
| Date | Sun, 04 Oct 2020 20:40:01 +0200 |
| Message-ID | <AWh5n-1jn-1@gated-at.bofh.it> (permalink) |
| References | <AW7z3-3Ll-3@gated-at.bofh.it> |
| X-Original-To | debian-python@lists.debian.org |
| X-Mailbox-Line | From debian-python-request@lists.debian.org Sun Oct 4 18:36:28 2020 |
| Old-Return-Path | <pollo@debian.org> |
| X-Amavis-Spam-Status | No, score=-11.178 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, BODY_8BITS=1.5, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, PGPSIGNATURE=-5, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001] autolearn=ham autolearn_force=no |
| X-Policyd-Weight | using cached result; rate: -4.6 |
| X-Riseup-User-ID | 8D69FE204A546EB31AC534C31AE212CCFF080C4A1E9A507FEB7CBE064C2D29EA |
| Autocrypt | addr=pollo@debian.org; prefer-encrypt=mutual; keydata= mQINBFSX1NABEADH76idoFsToCSwRrCJAqoZMPFWNGdK5+lMpxfVxb3GQYzEmxexkqq2ga/N oUlEs1jKY7F513uDARm2IVsE4ypq3TqYYZtSIr+27NvWUCAleFTBcTRvlo6pdBwaF9bENRgg uoMuHdY8OkNxg1jhwiq0kWpImD1K91NokKiX/9GebCIsr3J5ETafJ+pcHc6N3v8BIC2C8QAu c+fh5Atb9qZglNdFQ9orFkvCDKvaa6ZOymwpAW27JLY1NjSj8S+bLle2XKC3mNq2jtVN0vX0 V9UrNEOHpXokuFLXQFoGZGdqyQBBG3Hj9q0+NAJxMmNbBcOroOI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uKTf0+vp+OySujplsPKM+13XtjMxf2nZvtwvf6N QCFfDnf3OFD0yNkdYrB1vl5FQUShzCSyLDVLevmEITDCEEvdogyaQWjC7qTZ4yIBd1oeztx9 ydAcCvuKcMgLuhhGtpfMiwgLH8yLBEh2nzs9j0RdHf6HqRGFRFkmxiVdOIsphSfTssqsGUiT JuJ8W2yBR4MeU8EMfLvA/Sear1TraQ71nr85fV17e7CskOJRnPwHjHBjmETCAp81n/l/9WiM p2RZ/Q7hTlQsps2xLgiP5oMA/ftAZianXhxALL5+0H6bsDtVrfynKWWsiMNwzjsiaDP6DSQC R8U2obul/KXIKM+w4CMphzuJsq9bSjFWINOF6Etn7bJAZxvAGJ3O0SIlS1DAQ+4Gk+VOEI0Z 40aJvBRHlWYQhqFgV40RXqNiPkWknR9XL2FWHRa8wAzvfcbuMfJshviZ9vVpprEdm1ii6TQM XmhN2gedZrYCQFeciDE/h6nbmMXic4TbrQzlsKp3ogBI/CLC+6/cvX10BrswdjY9nwiN9EHq SiSO38HQlglbq920nym73XQ= |
| MIME-Version | 1.0 |
| Content-Type | multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="w1NT67D569hAOpSqbQHr32bY4sIjIWa4S" |
| X-Mailing-List | <debian-python@lists.debian.org> archive/latest/18682 |
| List-ID | <debian-python.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-python/> |
| List-Archive | https://lists.debian.org/msgid-search/076644ef-b9dd-68fc-2967-d5df61380749@debian.org |
| Approved | robomod@news.nic.it |
| Lines | 208 |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Date | Sun, 4 Oct 2020 14:36:06 -0400 |
| X-Original-Message-ID | <076644ef-b9dd-68fc-2967-d5df61380749@debian.org> |
| X-Original-References | <87362ubdvh.fsf@mid.deneb.enyo.de> |
| Xref | csiph.com linux.debian.maint.python:12923 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On 2020-10-04 04 h 21, Florian Weimer wrote:
> I'm trying to package git-pw, and running the test suite fails like
> this:
>
> dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:217: cd /build/git-pw-2.0.0/.pybuild/cpython3_3.8_git-pw/build; python3.8 -m pytest tests
> =========================================== test session starts ===========================================
> platform linux -- Python 3.8.6, pytest-4.6.11, py-1.9.0, pluggy-0.13.0
> rootdir: /build/git-pw-2.0.0
> collected 0 items / 5 errors
>
> ================================================= ERRORS ==================================================
> __________________ ERROR collecting .pybuild/cpython3_3.8_git-pw/build/tests/test_api.py __________________
> tests/test_api.py:6: in <module>
> from git_pw import api
> git_pw/__init__.py:8: in <module>
> __version__ = pkg_resources.get_distribution('git-pw').version
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:480: in get_distribution
> dist = get_provider(dist)
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:356: in get_provider
> return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:899: in require
> needed = self.resolve(parse_requirements(requirements))
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:785: in resolve
> raise DistributionNotFound(req, requirers)
> E pkg_resources.DistributionNotFound: The 'git-pw' distribution was not found and is required by the application
> ________________ ERROR collecting .pybuild/cpython3_3.8_git-pw/build/tests/test_bundle.py _________________
> tests/test_bundle.py:7: in <module>
> from git_pw import bundle
> git_pw/__init__.py:8: in <module>
> __version__ = pkg_resources.get_distribution('git-pw').version
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:480: in get_distribution
> dist = get_provider(dist)
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:356: in get_provider
> return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:899: in require
> needed = self.resolve(parse_requirements(requirements))
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:785: in resolve
> raise DistributionNotFound(req, requirers)
> E pkg_resources.DistributionNotFound: The 'git-pw' distribution was not found and is required by the application
> _________________ ERROR collecting .pybuild/cpython3_3.8_git-pw/build/tests/test_patch.py _________________
> tests/test_patch.py:9: in <module>
> from git_pw import patch
> git_pw/__init__.py:8: in <module>
> __version__ = pkg_resources.get_distribution('git-pw').version
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:480: in get_distribution
> dist = get_provider(dist)
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:356: in get_provider
> return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:899: in require
> needed = self.resolve(parse_requirements(requirements))
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:785: in resolve
> raise DistributionNotFound(req, requirers)
> E pkg_resources.DistributionNotFound: The 'git-pw' distribution was not found and is required by the application
> ________________ ERROR collecting .pybuild/cpython3_3.8_git-pw/build/tests/test_series.py _________________
> tests/test_series.py:7: in <module>
> from git_pw import series
> git_pw/__init__.py:8: in <module>
> __version__ = pkg_resources.get_distribution('git-pw').version
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:480: in get_distribution
> dist = get_provider(dist)
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:356: in get_provider
> return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:899: in require
> needed = self.resolve(parse_requirements(requirements))
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:785: in resolve
> raise DistributionNotFound(req, requirers)
> E pkg_resources.DistributionNotFound: The 'git-pw' distribution was not found and is required by the application
> _________________ ERROR collecting .pybuild/cpython3_3.8_git-pw/build/tests/test_utils.py _________________
> tests/test_utils.py:11: in <module>
> from git_pw import utils
> git_pw/__init__.py:8: in <module>
> __version__ = pkg_resources.get_distribution('git-pw').version
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:480: in get_distribution
> dist = get_provider(dist)
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:356: in get_provider
> return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:899: in require
> needed = self.resolve(parse_requirements(requirements))
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:785: in resolve
> raise DistributionNotFound(req, requirers)
> E pkg_resources.DistributionNotFound: The 'git-pw' distribution was not found and is required by the application
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 5 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> ========================================= 5 error in 0.40 seconds =========================================
> E: pybuild pybuild:352: test: plugin distutils failed with: exit code=2: cd /build/git-pw-2.0.0/.pybuild/cpython3_3.8_git-pw/build; python3.8 -m pytest tests
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.8 returned exit code 13
>
> Apparently, the test suite expects PYTHONPATH to be set. Is there a
> way to achieve this in a clean way?
You could use "export PYBUILD_BEFORE_TEST=PYTHONPATH=" to tell pybuild
to run a command before the testsuite is ran.
I'd consider that "cleaner" than overriding dh_auto_test.
> Adding this to debian/rules works:
>
> override_dh_auto_test:
> PYTHONPATH=. pytest-3 tests
>
> But it won't run the tests against the installed binaries.
Not sure I understand what you mean by "against the installed binaries".
The testsuite ran during build isn't ran against installed binaries,
that's why we use autopkgtests.
Here is an example of an autopkgtest running the testsuite and exporting
a python path:
https://sources.debian.org/src/supysonic/0.6.0+ds-1/debian/tests/unittests/?hl=4#L4
--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Louis-Philippe Véronneau
⢿⡄⠘⠷⠚⠋ pollo@debian.org / veronneau.org
⠈⠳⣄
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Find similar | Unroll thread
dh_auto_test failure with pybuild due to missing PYTHONPATH Florian Weimer <fw@deneb.enyo.de> - 2020-10-04 10:30 +0200 Re: dh_auto_test failure with pybuild due to missing PYTHONPATH Louis-Philippe Véronneau <pollo@debian.org> - 2020-10-04 20:40 +0200
csiph-web