Distutils, bdist_XXX, rpmbuild issues

Discussion in 'Python' started by Gerry Reno, Jan 8, 2009.

  1. Gerry Reno

    Gerry Reno Guest

    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"
    in setup.py.

    We create the source distribution with:
    $ python setup.py 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 setup.py bdist_rpm
    which creates source and binary RPMS in the form:
    foo-5.0.0_rc1-1.noarch.rpm.

    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.


    Regards,
    Gerry
     
    Gerry Reno, Jan 8, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PenguinOfDoom

    distutils deficiency

    PenguinOfDoom, Jun 25, 2003, in forum: Python
    Replies:
    0
    Views:
    739
    PenguinOfDoom
    Jun 25, 2003
  2. Edward K. Ream

    Distutils directory questions

    Edward K. Ream, Jun 28, 2003, in forum: Python
    Replies:
    1
    Views:
    774
    Edward K. Ream
    Jun 28, 2003
  3. timw.google
    Replies:
    1
    Views:
    560
    Serge Orlov
    May 11, 2006
  4. Luis Alberto Zarrabeitia Gomez

    distutils, No module named numpy.distutils.fcompiler.conv_template

    Luis Alberto Zarrabeitia Gomez, Mar 30, 2009, in forum: Python
    Replies:
    0
    Views:
    1,357
    Luis Alberto Zarrabeitia Gomez
    Mar 30, 2009
  5. William S.
    Replies:
    1
    Views:
    464
    J.O. Aho
    Mar 8, 2011
Loading...

Share This Page