Bug 1088448 - Invalid dependency on argparse
Summary: Invalid dependency on argparse
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rospkg
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rich Mattes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-16 16:03 UTC by Tim Niemueller
Modified: 2014-04-30 04:08 UTC (History)
4 users (show)

Fixed In Version: python-rospkg-1.0.28-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-30 04:08:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tim Niemueller 2014-04-16 16:03:59 UTC
Description of problem:
We have a custom ROS Fuerte which uses python-rospkg. Running roscore fails with:

Traceback (most recent call last):
  File "/opt/ros/fuerte/bin/roscore", line 4, in <module>
    import pkg_resources
  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: argparse

The problem must have occured recently with some update. We have machines not udpated for a few weeks (due to a custom installed package preventing the upgrade) which work. Recently upgraded machines fail. We could not track down the actual package causing the problem.

The problem can be fixed by removing "argparse" from /usr/lib/python2.7/site-packages/rospkg-1.0.27-py2.7.egg-info/requires.txt. I guess this needs to be fixed in setup.py or so in the source package.

Googling a bit (and also looking in bugzilla) it seems that a previously existing python-argparse has been rolled into python-libs.


Version-Release number of selected component (if applicable):
python-rospkg-1.0.27-1.fc20.noarch

Comment 1 Scott K Logan 2014-04-16 18:14:08 UTC
Thanks for the BR.

The stray dependency is listed in /usr/lib/python2.7/site-packages/rospkg-1.0.27-py2.7.egg-info/requires.txt, which is generated from the setup.py. Removing it from requires.txt should fix your problem temporarily.

You're right about argparse, it is included in Python 2 >= 2.7 and Python 3 >= 3.2 [1], so the package dep should be removed from the requires.txt in Fedora.

I think we'll need to make a conditionally applied patch, because el6 has Python 2.6, where it is not yet integrated. Overall, I think a dep should be added on python-argparse, which is provided by the python package in Fedora.

Does this sound like a good plan, Rich?

Thanks,

--scott

[1] https://pypi.python.org/pypi/argparse/1.2.1

Comment 2 Rich Mattes 2014-04-16 18:46:58 UTC
Yeah, this is similar to the issue with bloom that we fixed in #1084865.  I agree that a patch to remove argparse from setup.py in !el6, and the addition of Requires: python-argparse as per the setup.py install_requires should take care of this issue.  

I'll also scan through the rest of the ROS python packages to make sure there aren't any other ones that require argparse in setup.py.

Comment 3 Fedora Update System 2014-04-17 00:58:37 UTC
python-rospkg-1.0.28-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-rospkg-1.0.28-1.fc20

Comment 4 lnie 2014-04-17 06:50:56 UTC
Tested with python-rospkg-1.0.28-1.fc20,the Requires for argparse is added

Comment 5 Fedora Update System 2014-04-18 15:40:22 UTC
Package python-rospkg-1.0.28-1.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 python-rospkg-1.0.28-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5326/python-rospkg-1.0.28-1.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-04-30 04:08:16 UTC
python-rospkg-1.0.28-1.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.