dh_auto_test failure with pybuild due to missing PYTHONPATH
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 from git_pw import api git_pw/__init__.py:8: in __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 from git_pw import bundle git_pw/__init__.py:8: in __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 from git_pw import patch git_pw/__init__.py:8: in __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 from git_pw import series git_pw/__init__.py:8: in __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 from git_pw import utils git_pw/__init__.py:8: in __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_re
New here. Hi
Hi all. I'm new to the list and to Debian packaging overall. I hope my coming questions are not too stupid. Read you soon.
How to watch pypi.org
I've packaged a project provided via https://pipi.org and I wanted to create a debian/watch file but pipi.org publishes the tarball behind a strange url like https://files.pythonhosted.org/packages/d6/72/9848a2d631dad70d7ea582540f0619e1a7ecf31b3a117de9d9f2b6b28029/django-settings-export-1.2.1.tar.gz I guess pypi.org is a common source of python code so perhaps there's already a solution for this. Thanks in advanced.
Re: New here. Hi
On Sun, Oct 04, 2020 at 05:20:30PM +0200, Fioddor Superconcentrado wrote: > Hi all. > > I'm new to the list and to Debian packaging overall. Welcome > I hope my coming questions are not too stupid. > > Read you soon. Regards Geert Stappers -- Silence is hard to parse
python3- preffix
Hi again. Debian's packaging documentation requires the packages containing python3 apps to be renamed with a python3 suffix. I do so in debian/control file. Now I can put that prefix to the source too or not. If I do so then I get a lintian warning source-package-encodes-python-version but if I don't I get a conflict warning. I've renamed the downloaded tarball with the prefix because the build toolchain expected it. But I left the extracted directory's name untouched. What's the canonical way? Thanks in advanced.
Re: How to watch pypi.org
On Sun, Oct 04, 2020 at 05:28:57PM +0200, Fioddor Superconcentrado wrote: > I've packaged a project provided via https://pipi.org and I wanted to > create a debian/watch file but pipi.org publishes the tarball behind a > strange url like > > https://files.pythonhosted.org/packages/d6/72/9848a2d631dad70d7ea582540f0619e1a7ecf31b3a117de9d9f2b6b28029/django-settings-export-1.2.1.tar.gz > > I guess pypi.org is a common source of python code so perhaps there's > already a solution for this. The solution (that transparently uses pypi.debian.net) is described in uscan(1). -- WBR, wRAR signature.asc Description: PGP signature
Re: How to watch pypi.org
On Sun, Oct 04, 2020 at 05:28:57PM +0200, Fioddor Superconcentrado wrote: > I've packaged a project provided via https://pipi.org and I wanted to > create a debian/watch file but pipi.org publishes the tarball behind a > strange url like > > https://files.pythonhosted.org/packages/d6/72/9848a2d631dad70d7ea582540f0619e1a7ecf31b3a117de9d9f2b6b28029/django-settings-export-1.2.1.tar.gz > > I guess pypi.org is a common source of python code so perhaps there's > already a solution for this. Quoting the manual page of uscan. ( uscan is the utility reads debian/watch for watching. ) PyPI For PyPI based projects, pypi.debian.net runs a redirector which allows a simpler form of URL. The format below will automatically be rewritten to use the redirector with the watch file: version=4 https://pypi.python.org/packages/source/// \ -(.+)\.tar\.gz debian uupdate For cfn-sphere, set the watch file as: version=4 https://pypi.python.org/packages/source/c/cfn-sphere/ \ cfn-sphere-([\d\.]+).tar.gz debian uupdate Please note, you can still use normal functionalities of uscan to set up a watch file for this site without using the redirector. version=4 opts="pgpmode=none" \ https://pypi.python.org/pypi/cfn-sphere/ \ https://pypi.python.org/packages/.*/.*/.*/\ cfn-sphere-([\d\.]+).tar.gz#.* debian uupdate > Thanks in advanced. Looking forward to something like "OK, that works" Regards Geert Stappers -- Silence is hard to parse
Re: python3- preffix
On Sun, Oct 04, 2020 at 05:39:16PM +0200, Fioddor Superconcentrado wrote: > Debian's packaging documentation requires the packages containing python3 > apps to be renamed with a python3 suffix. *apps* shouldn't have a prefix, only modules should. > Now I can put that prefix to the source too or not. No. The current best practices for source package names for Python module packages are either just foo or python-foo and this wasn't changed when dropping py2. > if I don't I get a conflict warning. What do you mean? -- WBR, wRAR signature.asc Description: PGP signature
Re: python3- preffix
On Sun, Oct 04, 2020 at 05:39:16PM +0200, Fioddor Superconcentrado wrote: > Hi again. > > Debian's packaging documentation requires the packages containing python3 > apps to be renamed with a python3 suffix. I do so in debian/control file. > Now I can put that prefix to the source too or not. If I do so then I get a > lintian warning source-package-encodes-python-version but if I don't I get > a conflict warning. > > I've renamed the downloaded tarball with the prefix because the build > toolchain expected it. But I left the extracted directory's name untouched. > > What's the canonical way? Same way as we have learnt walking. > Thanks in advanced. Yes, also beginners can run out of credit. Regards Geert Stappers -- Silence is hard to parse
Patch an automatic tweek?
Hi again. Running debuild -us -uc with pybuild the toolchain automatically inserts setup.cfg to SOURCES.txt and the next debuild run breaks because there's an unpatched change outside the debian directory. I've been trying with quilt and I figured out how to configure it to put the patches under debian directory. The toolchain then reverts the patch series (a single patch in my case) automatically skipping the rerun problem. But then it's lintian that complains. What else am I supposed to do? Should I create some debian/rules to apply/revert the patch? Should I just ignore lintian's warning? Thanks in advanced.
Re: python3- preffix
Thank you Andrey. In this case it's a module and therefore needs the prefix. Ok. renamed the source package with python-. I get following (translated back to english): dpkg-buildpackage: information: system architecture amd64 dpkg-source: failure: source package has 2 conflicting values: "python-my-package" and "python3-my-package" dpkg-buildpackage: failure: dpkg-source --before-build . subprocess returned exit status 25 El dom., 4 oct. 2020 a las 17:46, Andrey Rahmatullin () escribió: > On Sun, Oct 04, 2020 at 05:39:16PM +0200, Fioddor Superconcentrado wrote: > > Debian's packaging documentation requires the packages containing python3 > > apps to be renamed with a python3 suffix. > *apps* shouldn't have a prefix, only modules should. > > > Now I can put that prefix to the source too or not. > No. The current best practices for source package names for Python module > packages are either just foo or python-foo and this wasn't changed when > dropping py2. > > > if I don't I get a conflict warning. > What do you mean? > > > -- > WBR, wRAR >
Re: python3- preffix
Hi Fioddor! On Sun, Oct 04, 2020 at 06:24:30PM +0200, Fioddor Superconcentrado wrote: > Thank you Andrey. > > In this case it's a module and therefore needs the prefix. > Ok. renamed the source package with python-. > > I get following (translated back to english): > dpkg-buildpackage: information: system architecture amd64 > dpkg-source: failure: source package has 2 conflicting values: > "python-my-package" and "python3-my-package" You need to change both debian/control and debian/changelog. -- Dmitry Shachnev signature.asc Description: PGP signature
Re: dh_auto_test failure with pybuild due to missing PYTHONPATH
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 > from git_pw import api > git_pw/__init__.py:8: in > __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 > from git_pw import bundle > git_pw/__init__.py:8: in > __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 > from git_pw import patch > git_pw/__init__.py:8: in > __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 > from git_pw import series > git_pw/__init__.py:8: in > __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 > from git_pw import utils > git_pw/__init__.py:8: in > __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-pac
Re: How to watch pypi.org
On Sun, Oct 4, 2020 at 3:29 PM Fioddor Superconcentrado wrote: > I've packaged a project provided via https://pipi.org and I wanted to create > a debian/watch file but pipi.org publishes the tarball behind a strange url > like I would suggest using the upstream git repo instead of the PyPi tarballs. -- bye, pabs https://wiki.debian.org/PaulWise
Re: How to watch pypi.org
On Sunday, October 4, 2020 10:24:22 PM EDT Paul Wise wrote: > On Sun, Oct 4, 2020 at 3:29 PM Fioddor Superconcentrado wrote: > > I've packaged a project provided via https://pipi.org and I wanted to > > create a debian/watch file but pipi.org publishes the tarball behind a > > strange url like > I would suggest using the upstream git repo instead of the PyPi tarballs. I think that's a different argument. There is a pypi redirector for Debian watch files. Something like this works (this is from the pyspf package): https://pypi.debian.net/pyspf/pyspf-([0-9][0-9t\.\-]*).tar.gz This currently works, but no guarantee for how long: https://pypi.python.org/packages/source/x/@PACKAGE@/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ Scott K
Re: How to watch pypi.org, example
On Sun, Oct 04, 2020 at 10:53:47PM -0400, Scott Kitterman wrote: > On Sunday, October 4, 2020 10:24:22 PM EDT Paul Wise wrote: > > On Sun, Oct 4, 2020 at 3:29 PM Fioddor Superconcentrado wrote: > > > I've packaged a project provided via https://pipi.org and I wanted to > > > create a debian/watch file but pipi.org publishes the tarball behind a > > > strange url like > > I would suggest using the upstream git repo instead of the PyPi tarballs. > > I think that's a different argument. > > There is a pypi redirector for Debian watch files. Something like this works > (this is from the pyspf package): > > https://pypi.debian.net/pyspf/pyspf-([0-9][0-9t\.\-]*).tar.gz > > This currently works, but no guarantee for how long: > > https://pypi.python.org/packages/source/x/@PACKAGE@/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ https://pypi.python.org/packages/source/x/@PACKAGE@/@PACKAGE@-@ANY_VERSION@@ARCHIVE_EXT@ And learning is also learning from examples. stappers@paddy:~ $ cd packaging_dir/ stappers@paddy:packaging_dir $ debcheckout pyspf declared git repository at https://salsa.debian.org/python-team/modules/pyspf.git git clone https://salsa.debian.org/python-team/modules/pyspf.git pyspf ... Cloning into 'pyspf'... remote: Enumerating objects: 1039, done. remote: Counting objects: 100% (1039/1039), done. remote: Compressing objects: 100% (368/368), done. remote: Total 1039 (delta 612), reused 943 (delta 551), pack-reused 0 Receiving objects: 100% (1039/1039), 237.12 KiB | 415.00 KiB/s, done. Resolving deltas: 100% (612/612), done. stappers@paddy:packaging_dir $ cd pyspf stappers@paddy:packaging_dir/pyspf $ cat debian/watch version=3 https://pypi.debian.net/pyspf/pyspf-([0-9][0-9t\.\-]*).tar.gz stappers@paddy:packaging_dir/pyspf $ Regards Geert Stappers -- Silence is hard to parse