This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bdist_rpm still can't handle dashes in versions
Type: Stage:
Components: Distutils Versions: Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: jafo Nosy List: jafo, loewis, nnorwitz, sarynx
Priority: normal Keywords: patch

Created on 2005-11-18 15:41 by sarynx, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bdist_rpm-dashed-versions.patch sarynx, 2005-11-18 15:41 patch which fixes bdist_rpm to handle versions with dashes properly
Messages (4)
msg49071 - (view) Author: jared jennings (sarynx) Date: 2005-11-18 15:41
I tried to use Python 2.4.2 to create a bdist_rpm of
setuptools, whose version string was 0.6a9dev-r41475.
The distutils/command/bdist_rpm module's
_make_spec_file method mangled the version to
0.6a9dev_r41475 (line 370). Then when the spec file was
being built by rpmbuild, it looked for the sdist named
setuptools-0.6a9dev_r41475.tar.gz, which didn't exist:
it was called setuptools-0.6a9dev-r41475.tar.gz (note
dash). 

So you have to mangle the version to make rpm happy -
but you can't expect the sdist to have the mangled
version as part of its name.

I looked at the nightly Python source as of 17 Nov 2005
and saw that this bug still exists in the development
version of Python.

A patch is attached which fixed this bug for me.
msg49072 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-11-21 02:17
Logged In: YES 
user_id=33168

Sean, you seem to know a lot more about rpms than most of
us.  Any comment on this approach?
msg49073 - (view) Author: Sean Reifschneider (jafo) * (Python committer) Date: 2006-09-02 23:25
Logged In: YES 
user_id=81797

This patch looks good to me.  I checked in python-trunk and
it still seems to need to be fixed.  I'd recommend it gets
checked in for the 2.6 release.  I'd like one of the
distutils people to confirm this though.
msg49074 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-11-12 18:56
Logged In: YES 
user_id=21627

Thanks for the patch. Committed as r52741 and r52742
History
Date User Action Args
2022-04-11 14:56:14adminsetgithub: 42608
2005-11-18 15:41:43sarynxcreate