[openstack-dev] nova dependencies, oslo-config and pypi
Johannes Erdfelt
johannes at erdfelt.com
Tue Feb 26 01:15:35 UTC 2013
On Mon, Feb 25, 2013, Mark McLoughlin <markmc at redhat.com> wrote:
> On Mon, 2013-02-25 at 10:25 -0800, Johannes Erdfelt wrote:
> > Downloading/unpacking oslo-config (from nova==2013.1.g3)
> > Could not find any downloads that satisfy the requirement oslo-config
> > (from nova==2013.1.g3)
> > No distributions at all found for oslo-config (from nova==2013.1.g3)
>
> When you're installing this way, why isn't dependency_links being
> respected?
I've spent some time debugging this and the result appears to be that
python packaging is still a bit of a mess.
pip 1.1 works, but pip 1.2.1 doesn't.
The documentation at http://peak.telecommunity.com/DevCenter/setuptools
has this:
"If you depend on a package that's distributed as a single .py file, you
must include an "#egg=project-version" suffix to the URL, to give a
project name and version number. (Be sure to escape any dashes in the
name or version by replacing them with underscores.)"
This is the section documenting dependency_links, so it's not clear why
it's specifically limiting this format to single .py files, when it
appears to apply to tarballs and VCS links as well.
Either way, pip 1.2.1 enforces the #egg=<package>-<version> format and
it's ignoring the URL as a result.
The dependency we have is:
http://tarballs.openstack.org/oslo-config/oslo-config-2013.1b4.tar.gz#egg=oslo-config
There appears to be a bug in pip 1.1 that accepts this.
That bug appears to be fixed in pip 1.2.1 causing the problem we're
seeing. I got our nova package working with two fixes:
1) Add the version to the egg fragment for oslo-config in
tools/pip-requires
2) Fix the regular expression in parse_requirements (in
nova/openstack/common/setup.py) to exclude the version from the
match
JE
More information about the OpenStack-dev
mailing list