#378 Update python multiversion guideline for difference in new setuptools
Closed: Fixed None Opened 8 years ago by toshio.

The setuptools shipped with F20+ has one seemingly minor behaviour change that causes issues for rpm that affects our multi-version python modules guidelines.


The guidelines recommend doing:
easy_install -m --prefix $RPM_BUILD_ROOT%{_usr} dist/*.egg

On previous versions of setuptools this would result in the python module being installed into a subdirectory of site-packages named after the python module, for instance:

With the new setuptools, the python module is instead installed as a zip file. The zip file has the same name as the directory (ie: WebOb-1.2.3-py3.3.egg ). rpm cannot replace a directory with a file without resorting to hacks so I think we should just adjust the guidelines to specify installing unzipped eggs.

This is just adding the -Z switch to the easy_install command like this:

easy_install -m -Z --prefix $RPM_BUILD_ROOT%{_usr} dist/*.egg

Does easy_install support -Z back through all of our supported releases? If so, I suggest you simply go ahead and make this change in the guidelines.

It's supported in F18 and in EL6. Downloading a centos5 iso to test there.

Yep, easy_install in EL5 also supports the -Z switch.

Guideline updated. Since people will need to update spec files to add -Z, Here's an announcement text:


Changes to python-setuptools in F20 cause easy_install to install egg files instead of egg directories by default. This sometimes causes problems for rpms of multi-version python modules as the egg filenames are the same if the version of the package hasn't been increased and rpm is unable to replace the directory with a file. To fix this, the https://fedoraproject.org/wiki/Packaging:Python_Eggs#Multiple_Versions guideline has been updated to pass the "-Z" switch to easy_install which restores the former behaviour of installing eggs as a directory.

If you package a backwards or forwards compat python module that makes use of the Multiple_Versions guideline (or easy_install in some other way), please update your spec file to include the -Z switch.

Metadata Update from @toshio:
- Issue assigned to toshio

5 years ago

Login to comment on this ticket.