bdist creates broken packages on pythons < 2.7

Bug #876991 reported by Brian Pitts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Graphite
Fix Released
Undecided
Unassigned

Bug Description

I've been using bdist to try to create RPMs of graphite-web.

If on CentOS 5.7 you run 'python setup.py bdist --format rpm', the files specified in package_data and data_files are not in the resulting rpm. On Fedora 15, they are.

I think this is because the default list of files to distribute has only included files that matches the package_data and data_files metadata since Python 2.7.

http://docs.python.org/release/2.4/dist/manifest.html
http://docs.python.org/release/2.5/dist/manifest.html
http://docs.python.org/release/2.6.7/distutils/sourcedist.html#specifying-the-files-to-distribute
http://docs.python.org/distutils/sourcedist.html

I think the fix for bdist on python 2.4 through 2.6 is to write a MANIFEST.in which includes the files from package_data and data_files.

Revision history for this message
Nicholas Leskiw (nleskiw) wrote : Re: [Bug 876991] [NEW] bdist creates broken packages on pythons < 2.7

Can you create.those files? I'm not very familiar with that procedure.

-Nick

Sent from a mobile device.
Please excuse terse language and spelling mistakes.

Brian Pitts <email address hidden> wrote:

>Public bug reported:
>
>I've been using bdist to try to create RPMs of graphite-web.
>
>If on CentOS 5.7 you run 'python setup.py bdist --format rpm', the files
>specified in package_data and data_files are not in the resulting rpm.
>On Fedora 15, they are.
>
>I think this is because the default list of files to distribute has only
>included files that matches the package_data and data_files metadata
>since Python 2.7.
>
>http://docs.python.org/release/2.4/dist/manifest.html
>http://docs.python.org/release/2.5/dist/manifest.html
>http://docs.python.org/release/2.6.7/distutils/sourcedist.html#specifying-the-files-to-distribute
>http://docs.python.org/distutils/sourcedist.html
>
>I think the fix for bdist on python 2.4 through 2.6 is to write a
>MANIFEST.in which includes the files from package_data and data_files.
>
>** Affects: graphite
> Importance: Undecided
> Status: New
>
>--
>You received this bug notification because you are subscribed to
>Graphite.
>https://bugs.launchpad.net/bugs/876991
>
>Title:
> bdist creates broken packages on pythons < 2.7
>
>Status in Graphite - Enterprise scalable realtime graphing:
> New
>
>Bug description:
> I've been using bdist to try to create RPMs of graphite-web.
>
> If on CentOS 5.7 you run 'python setup.py bdist --format rpm', the
> files specified in package_data and data_files are not in the
> resulting rpm. On Fedora 15, they are.
>
> I think this is because the default list of files to distribute has
> only included files that matches the package_data and data_files
> metadata since Python 2.7.
>
> http://docs.python.org/release/2.4/dist/manifest.html
> http://docs.python.org/release/2.5/dist/manifest.html
> http://docs.python.org/release/2.6.7/distutils/sourcedist.html#specifying-the-files-to-distribute
> http://docs.python.org/distutils/sourcedist.html
>
> I think the fix for bdist on python 2.4 through 2.6 is to write a
> MANIFEST.in which includes the files from package_data and
> data_files.
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/graphite/+bug/876991/+subscriptions

Revision history for this message
chrismd (chrismd) wrote :

See my recent comment on Bug #546737. I don't know if bdist_rpm will ultimately work for graphite, can it do pre/post install commands? If not we'll need to build it from a spec file.

Revision history for this message
Brian Pitts (bpitts) wrote :

Thanks for drawing my attention to Bug #546737. I think Pete's MANIFEST.in in it is almost correct. I've added conf/*example to it. The two lines below were enough for me to generate a working package.

include webapp/graphite/*.example webapp/graphite/render/*.conf webapp/graphite/templates/* conf/*example
recursive-include webapp/content *

I agree that this isn't sufficient to produce official RPMs for distribution. However, adding a MANIFEST.in will make it easier for people to roll their own-quick-and-dirty packages.

Revision history for this message
chrismd (chrismd) wrote :

I see I'm sorry I was confused because there actually are MANIFEST.in files for carbon and the webapp, but they are in trunk. They don't include themselves so they don't make it into the distribution tarballs. I'll add MANIFEST.in to itself and that should fix it :)

Changed in graphite:
status: New → Fix Committed
Changed in graphite:
milestone: none → 0.9.10
Changed in graphite:
status: Fix Committed → Fix Released
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.