Bug#840673: dput missing a dependency on python setuptools library [and 1 more messages]
On 12.11.2016 19:37, Stefano Rivera wrote: > Hi Matthias (2016.11.09_21:34:14_+) >> it's surprising that dput would need a dependency on the setuptools egg >> instead >> of the pkg_resources egg. A dependency on the setuptools egg just sounds >> plain >> wrong. > > I think what's going on here is that the egg-info for setuptools is in > the setuptools package, not the pkg-resources package. pkg-resources is > refusing to do anything unless it can resolve the requirements of the > package in question, which in this case includes setuptools. So even > though it has everything it needs on hand, it isn't doing anything. > > If we're rewriting dependencies from setuptools to pkg-recources, we > should ship the setuptools egg-info in pkg-resources. shipping the setuptools egg-info in pkg-resources would be worse, announcing a module which might not be present. The immediate fix for dput would be to patch the egg info, removing the setuptools egg, and handle the requirements by the Debian dependencies. I think it's still worth having the pkg-resources available as a "runtime dependency", without having the setuptools packages installed. Now filed https://github.com/pypa/setuptools/issues/863 as well.
Bug#840673: dput missing a dependency on python setuptools library [and 1 more messages]
Hi Matthias (2016.11.09_21:34:14_+) > it's surprising that dput would need a dependency on the setuptools egg > instead > of the pkg_resources egg. A dependency on the setuptools egg just sounds > plain > wrong. I think what's going on here is that the egg-info for setuptools is in the setuptools package, not the pkg-resources package. pkg-resources is refusing to do anything unless it can resolve the requirements of the package in question, which in this case includes setuptools. So even though it has everything it needs on hand, it isn't doing anything. If we're rewriting dependencies from setuptools to pkg-recources, we should ship the setuptools egg-info in pkg-resources. SR -- Stefano Rivera http://tumbleweed.org.za/ +1 415 683 3272
Bug#840673: dput missing a dependency on python setuptools library [and 1 more messages]
Matthias Klose writes ("Re: Bug#840673: dput missing a dependency on python setuptools library [and 1 more messages]"): > On 09.11.2016 21:44, Goirand Thomas (aka zigo) wrote: > > What's happening here is probably dput having a Python dep > > on setuptools but it's not expressed in the Debian package's > > runtime Depends:. The way to fix it would be patching the > > dput Python requires (probably, that's in setup.py), or add the > > Depends: python-setuptools in the dput package. But I haven't > > looked at the issue so I can't tell which one of actions to do. I don't think this is right. See Ben Finney's message here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836710#10 > it's surprising that dput would need a dependency on the setuptools > egg instead of the pkg_resources egg. A dependency on the > setuptools egg just sounds plain wrong. > > Do you have a test case why a dependency on the setuptools egg is needed? Is this likely to be relevant ? (build)root@zealot:/home/ian# egrep . /usr/share/dput/dput-0.10.3.egg-info/requires.txt setuptools python-debian (build)root@zealot:/home/ian# Also, I don't understand how python module loading stuff works, but the behaviour I see below makes things quite hard to test: (build)root@zealot:/home/ian# dput Traceback (most recent call last): File "/usr/bin/dput", line 6, in from pkg_resources import load_entry_point File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2994, in @_call_aside File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2980, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3007, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 658, in _build_master ws.require(__requires__) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 966, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 852, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'setuptools' distribution was not found and is required by dput (build)root@zealot:/home/ian# cp /usr/bin/dput . (build)root@zealot:/home/ian# python ./dput Traceback (most recent call last): File "./dput", line 6, in from pkg_resources import load_entry_point File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2994, in @_call_aside File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2980, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3007, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 658, in _build_master ws.require(__requires__) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 966, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 852, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'dput==0.10.3' distribution was not found and is required by the application (build)root@zealot:/home/ian# -- Ian Jackson <ijack...@chiark.greenend.org.uk> These opinions are my own. If I emailed you from an address @fyvzl.net or @evade.org.uk, that is a private address which bypasses my fierce spamfilter.
Bug#840673: dput missing a dependency on python setuptools library [and 1 more messages]
On 09.11.2016 21:44, Goirand Thomas (aka zigo) wrote: > > On Nov 9, 2016 5:56 PM, Ian Jacksonwrote: >> >> Ian Jackson writes ("dput missing a dependency on python setuptools >> library"): >>> (build)root@zealot:~# dput >> ... >>> raise DistributionNotFound(req, requirers) >>> pkg_resources.DistributionNotFound: The 'setuptools' distribution was not >>> found and is required by dput >> >> Are there any plans to fix this in python ? (I'm not really familiar >> enough with the python module and loading system to do so myself.) > > Every python module is installed with an "egg-info" folder > containing a "require.txt" file that contains Python module deps. > > What's happening here is probably dput having a Python dep > on setuptools but it's not expressed in the Debian package's > runtime Depends:. The way to fix it would be patching the > dput Python requires (probably, that's in setup.py), or add the > Depends: python-setuptools in the dput package. But I haven't > looked at the issue so I can't tell which one of actions to do. it's surprising that dput would need a dependency on the setuptools egg instead of the pkg_resources egg. A dependency on the setuptools egg just sounds plain wrong. Do you have a test case why a dependency on the setuptools egg is needed? Matthias
Bug#840673: dput missing a dependency on python setuptools library [and 1 more messages]
Ian Jackson writes ("dput missing a dependency on python setuptools library"): > (build)root@zealot:~# dput ... > raise DistributionNotFound(req, requirers) > pkg_resources.DistributionNotFound: The 'setuptools' distribution was not > found and is required by dput Are there any plans to fix this in python ? (I'm not really familiar enough with the python module and loading system to do so myself.) It's causing the debci for dgit to fail, because dput is nonfunctional. Perhaps dput ought to get a dependency for now ? Ian. -- Ian JacksonThese opinions are my own. If I emailed you from an address @fyvzl.net or @evade.org.uk, that is a private address which bypasses my fierce spamfilter.
Bug#840673: dput missing a dependency on python setuptools library
Package: dput Version: 0.10.3 Steps to reproduce: apt-get install dput dput Observe output: (build)root@zealot:~# dput Traceback (most recent call last): File "/usr/bin/dput", line 6, in from pkg_resources import load_entry_point File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2991, in @_call_aside File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2977, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3004, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 662, in _build_master ws.require(__requires__) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 970, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 856, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'setuptools' distribution was not found and is required by dput Ian. -- Ian JacksonThese opinions are my own. If I emailed you from an address @fyvzl.net or @evade.org.uk, that is a private address which bypasses my fierce spamfilter.