Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Distutils, bdist_XXX, rpmbuild issues

Thread Tools

Distutils, bdist_XXX, rpmbuild issues

Gerry Reno
Posts: n/a
I've been trying to use the "built distribution" distutils commands such
as bdist_rpm to create distro-specific packages for python applications
but I'm running into some thorny issues specifically with pre-release
versioning of source distributions and built distributions and how to
get a "final" release to update these pre-release distributions.

For example:

We have an application, foo-5.0.0, and we want to put out some
pre-release candidates for testing, so we set the version to "5.0.0_rc1"

We create the source distribution with:
$ python sdist
which creates a source archive, foo-5.0.0_rc1.tar.gz.

We extract this archive and 'cd' into the foo-5.0.0_rc1 directory and
create a built distribution with:
$ python bdist_rpm
which creates source and binary RPMS in the form:

So we think everything is fine. Everyone installs and tests using the
pre-release candidate and subsequent candidates but when you eventually
get to the final release, foo-5.0.0, and build your final release RPMS,
foo-5.0.0-1.noarch.rpm, you find that it will not update your last
pre-release candidate RPM, foo-5.0.0_rcX-1.noarch.rpm because it is not
"rpm newer".

So I've been working on this for a while but have not found a good way
to do this by setting options in a setup.cfg file. It seems like for
RPM purposes we have to keep the version to "5.0.0" and set "release" to
"0_rcX" for the pre-release candidates and this will work for RPM
purposes but then "sdist" does not generate the correct tarball names
for each pre-release candidate. It always generates foo-5.0.0.tar.gz.

Has anyone managed to solve this issue or is distutils in need of some
enhancement. We need the "sdist" command to generate distinct
pre-release candidate tarball names. And we need the "bdist_XXX"
commands to generate distro-specific package naming such that the
pre-release candidate packages can be updated by the final release package.


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: CentOS 5.5 x86_64 rpmbuild from source William S. Python 1 03-08-2011 08:03 PM
Windows XP Pro clean install issues, SP2 issues too... Howie Computer Support 0 07-06-2005 07:12 PM
Re: Windows XP Pro clean install issues, SP2 issues too... pcbutts1 Computer Support 0 07-06-2005 04:58 PM
Re: Windows XP Pro clean install issues, SP2 issues too... pcbutts1 Computer Support 0 07-06-2005 04:52 PM
SNMP Issues in Cisco Routers; Vulnerability Issues in TCP =?iso-8859-1?Q?Frisbee=AE?= MCSE 0 04-21-2004 03:00 PM