sdist builds report version as 0.0.0

Bug #1040734 reported by Clark Boylan
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Critical
Clark Boylan

Bug Description

openstack.common.setup has functions to determine the current version of a project state. These functions work in two cases (other configurations return a default version of 0.0.0). Versioning works if you run setup.py within the git repository of a project or if project/versioninfo is available relative to setup.py.

Running setup.py within the git repository generates a versioninfo file at project/versioninfo. Knowing this, the correct way to build an sdist for a project is to run `python setup.py sdist` within the git repository and have setup.py include project/versioninfo as part of the package data. If you don't include the versioninfo file as part of the package data the sdist package will report its version as 0.0.0.

To add versioninfo as package data add it as an include in the project's MANIFEST.in. For example:
include glance/versioninfo

The commit at the head of glance's master branch does not currently do this. As a result glance sdist builds report their version to be 0.0.0.

Changed in glance:
assignee: nobody → Clark Boylan (cboylan)
status: New → In Progress
Brian Waldon (bcwaldon)
Changed in glance:
importance: Undecided → Critical
milestone: none → folsom-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/11831
Committed: http://github.com/openstack/glance/commit/eb8c956753fb7b3c6d016a79d4a9297075f4229d
Submitter: Jenkins
Branch: master

commit eb8c956753fb7b3c6d016a79d4a9297075f4229d
Author: Clark Boylan <email address hidden>
Date: Wed Aug 22 17:04:23 2012 -0700

    Add glance/versioninfo to MANIFEST.in.

    Fixes bug #1040734

    Adding glance/versioninfo to MANIFEST.in adds the versioninfo file to
    sdist packages. Adding this file to sdist packages allows versioning to
    work properly when installing from an sdist package.

    Change-Id: I7c9d2843e428fb0da1ffb461410c75a25a6e51d0

Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
Sean M. Collins (scollins) wrote :

Can we expect a fixed version of the folsom~3 tarball?

Revision history for this message
Thierry Carrez (ttx) wrote :

A milestone is a point in time, there is no point in redoing it. The next milestone is now RC1. If you need one tarball now, you can find a more recent one including the fix at: http://tarballs.openstack.org/glance/glance-master.tar.gz

Revision history for this message
Sean M. Collins (scollins) wrote :

OK - then can the folsom-3 tarball be deleted from PyPI? It currently breaks my jenkins build of OpenStack-Nova.

Revision history for this message
Sean M. Collins (scollins) wrote :

Sorry - not from PyPI. Pip appears to be downloading it off Launchpad.

Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: folsom-rc1 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.