Bug 1036046 - [abrt] pyp2rpm-1.0.1-3.fc20: pkg_resources.py:626:resolve:DistributionNotFound: distribute
Summary: [abrt] pyp2rpm-1.0.1-3.fc20: pkg_resources.py:626:resolve:DistributionNotFoun...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pyp2rpm
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert Kuska
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:a59590e25d708464c1c95ffcedc...
: 1035207 1045713 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-29 09:28 UTC by Miro Hrončok
Modified: 2016-04-18 10:17 UTC (History)
6 users (show)

Fixed In Version: pyp2rpm-1.0.1-4.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-14 08:03:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1011 bytes, text/plain)
2013-11-29 09:28 UTC, Miro Hrončok
no flags Details
File: environ (3.65 KB, text/plain)
2013-11-29 09:28 UTC, Miro Hrončok
no flags Details

Description Miro Hrončok 2013-11-29 09:28:31 UTC
Description of problem:
$ pyp2rpm httpretty

Version-Release number of selected component:
pyp2rpm-1.0.1-3.fc20

Additional info:
reporter:       libreport-2.1.9
cmdline:        /usr/bin/python /usr/bin/pyp2rpm httpretty
dso_list:       python-setuptools-0.9.8-2.fc20.noarch
executable:     /usr/bin/pyp2rpm
kernel:         3.11.7-300.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
pkg_resources.py:626:resolve:DistributionNotFound: distribute

Traceback (most recent call last):
  File "/usr/bin/pyp2rpm", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve
    raise DistributionNotFound(req)
DistributionNotFound: distribute

Local variables in innermost frame:
dist: None
to_activate: [pyp2rpm 1.0.1 (/usr/lib/python2.7/site-packages)]
req: Requirement.parse('distribute')
requirements: [Requirement.parse('Jinja2')]
processed: {Requirement.parse('pyp2rpm==1.0.1'): True}
env: <pkg_resources.Environment object at 0x7f86bf0a0310>
installer: None
self: <pkg_resources.WorkingSet object at 0x7f86bf0a0050>
best: {'distribute': None}

Comment 1 Miro Hrončok 2013-11-29 09:28:39 UTC
Created attachment 830564 [details]
File: backtrace

Comment 2 Miro Hrončok 2013-11-29 09:28:42 UTC
Created attachment 830565 [details]
File: environ

Comment 3 Miro Hrončok 2013-11-29 09:29:41 UTC
Run pyp2rpm with any arguments to get this error.

Comment 4 Robert Kuska 2014-01-10 11:00:14 UTC
I couldn't reproduce the bug, is this still an issue?

If not, it was probably a setuptools problem (there are new setuptools in f20) otherwise there may be a problem with eggs files.

Comment 5 Robert Kuska 2014-01-10 12:26:28 UTC
*** Bug 1045713 has been marked as a duplicate of this bug. ***

Comment 6 Robert Kuska 2014-01-10 12:27:28 UTC
*** Bug 1035207 has been marked as a duplicate of this bug. ***

Comment 7 Miro Hrončok 2014-01-10 14:15:26 UTC
Currently this is not happening because it is "covered" by bz1045713 - that's what is happening.

Comment 8 Miro Hrončok 2014-01-10 14:17:42 UTC
Ooo, ignore my previous comment, I've been having hallucinations.

Yes I can reproduce this.

$ pyp2rpm httpretty
Traceback (most recent call last):
  File "/usr/bin/pyp2rpm", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2793, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 673, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 576, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: distribute

Comment 9 Robert Kuska 2014-01-13 10:56:39 UTC
Ok, I have managed to reproduce this in mock.

As I mentioned in my previous comment it was problem with egg file but on my side.

[rkuska@localhost distribute-0.7.3-py2.7.egg-info]$ rpm -qf PKG-INFO 
file /usr/lib/python2.7/site-packages/distribute-0.7.3-py2.7.egg-info/PKG-INFO is not owned by any package
[rkuska@localhost distribute-0.7.3-py2.7.egg-info]$ cat requires.txt 
setuptools>=0.7

Quite interesting. I have some sort of compatibility wrapper leftover for distribute->setuptools.


This is easy to fix I guess, change of requires from distribute to setuptools should do the trick.

Comment 10 Matthias Runge 2014-01-20 08:19:42 UTC
I don't have distribute at all installed here on my system (F20).
And I was able to "fix" this issue by manually removing "distribute" from /usr/lib/python2.7/site-packages/pyp2rpm-1.0.1-py2.7.egg-info/requires.txt

Comment 11 Matthias Runge 2014-01-28 10:36:36 UTC
The following fix for the spec will solve this issue.

diff --git a/pyp2rpm.spec b/pyp2rpm.spec
index 8a5924a..9d57771 100644
--- a/pyp2rpm.spec
+++ b/pyp2rpm.spec
@@ -72,6 +72,9 @@ rm -rf %{py3dir}
 cp -a . %{py3dir}
 find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
 
+# remove hard dependency to distribute
+sed -i "/'distribute',/d" setup.py
+
 %endif # with_python3

Comment 12 Matthias Runge 2014-01-28 10:39:35 UTC
(In reply to Robert Kuska from comment #9)
> Ok, I have managed to reproduce this in mock.
> 
> As I mentioned in my previous comment it was problem with egg file but on my
> side.
> 
> [rkuska@localhost distribute-0.7.3-py2.7.egg-info]$ rpm -qf PKG-INFO 
> file
> /usr/lib/python2.7/site-packages/distribute-0.7.3-py2.7.egg-info/PKG-INFO is
> not owned by any package
> [rkuska@localhost distribute-0.7.3-py2.7.egg-info]$ cat requires.txt 
> setuptools>=0.7
> 
> Quite interesting. I have some sort of compatibility wrapper leftover for
> distribute->setuptools.
> 
> 
> This is easy to fix I guess, change of requires from distribute to
> setuptools should do the trick.
Err, requires should be handled via rpm, right? Will you fix this?

Comment 13 Robert Kuska 2014-01-28 10:41:52 UTC
(In reply to Matthias Runge from comment #12)
> (In reply to Robert Kuska from comment #9)
> > Ok, I have managed to reproduce this in mock.
> > 
> > As I mentioned in my previous comment it was problem with egg file but on my
> > side.
> > 
> > [rkuska@localhost distribute-0.7.3-py2.7.egg-info]$ rpm -qf PKG-INFO 
> > file
> > /usr/lib/python2.7/site-packages/distribute-0.7.3-py2.7.egg-info/PKG-INFO is
> > not owned by any package
> > [rkuska@localhost distribute-0.7.3-py2.7.egg-info]$ cat requires.txt 
> > setuptools>=0.7
> > 
> > Quite interesting. I have some sort of compatibility wrapper leftover for
> > distribute->setuptools.
> > 
> > 
> > This is easy to fix I guess, change of requires from distribute to
> > setuptools should do the trick.
> Err, requires should be handled via rpm, right? Will you fix this?

Yes x 2

Comment 14 Fedora Update System 2014-01-29 08:22:55 UTC
pyp2rpm-1.0.1-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/pyp2rpm-1.0.1-4.fc20

Comment 15 Fedora Update System 2014-01-30 03:40:33 UTC
Package pyp2rpm-1.0.1-4.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pyp2rpm-1.0.1-4.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-1798/pyp2rpm-1.0.1-4.fc20
then log in and leave karma (feedback).

Comment 16 Jan Hutař 2014-02-07 13:49:51 UTC
Seems to be OK now.

$ cat /usr/lib/python2.7/site-packages/pyp2rpm-1.0.1-py2.7.egg-info/requires.txt
Jinja2
setuptools

Comment 17 Fedora Update System 2014-02-14 08:03:34 UTC
pyp2rpm-1.0.1-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.