classification
Title: bdist_rpm does not list dist files (should effect upload)
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: crobben, eric.araujo, htgoebel, python-dev, tarek
Priority: normal Keywords: easy, patch

Created on 2008-05-22 14:34 by htgoebel, last changed 2012-02-26 03:12 by eric.araujo. This issue is now closed.

Files
File name Uploaded Description Edit
simple-0.0.0.0.1.tar.gz htgoebel, 2008-05-22 14:34 simple package to show the bug
bdist_rpm.patch crobben, 2011-10-06 22:13 bdist_rpm patch review
test_bdist_rpm.patch crobben, 2011-10-10 09:39 patch for test_bdist_rpm.py review
bdist_rpm-2.7.patch crobben, 2011-10-10 09:42 review
Messages (13)
msg67192 - (view) Author: Hartmut Goebel (htgoebel) Date: 2008-05-22 14:34
In Python 2.5 distutils has a bug in bdist_rpm:

Generated distribution files are not listed in
``distribution.dist_files``. Thus .rpms can not be handled by other
tools, eg. ``upload``.

I need this bug fixed for automated upload of files using
<http://origo-submit.origo.ethz.ch>.

Enclosed please find a simple package to show the bug. Just run

    python setup.py bdist_rpm

and watch the (missing) output. In contrast see the output of

    python setup.py sdist

Additionally:
While untested, this should effect distutils ``upload`` command. RPMs
are not in the dist_files list and when looking at the source, there
seams to be no 'trick' to add them later.
msg112432 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-02 08:59
Tarek, can this bug be fixed or is it outdated? IOW, is bdist_rpm officially discouraged or do you still accept bugfixes for it?
msg143221 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-08-30 15:24
Even thought bdist_rpm is gone from distutils2, this is a bug that can be fixed in distutils.  Adding the easy keyword to let potential contributors find this bug; hint: look at how bdist_dumb registers distributions with dist.dist_files.
msg145045 - (view) Author: Carl Robben (crobben) Date: 2011-10-06 22:13
I found that bdist_rpm wasn't registering distributions with dist.dist_files at all.  The attached patch should be all that's needed to fix this.
msg145092 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-10-07 16:03
Great!  Could you add a test for this?  By the way, do you have a machine with rpm installed?  I don’t, so I won’t be able to test the patch.
msg145292 - (view) Author: Carl Robben (crobben) Date: 2011-10-10 09:39
Here's a patch for test_bdist_rpm.py and to check the contents of dist.dist_files
msg145293 - (view) Author: Carl Robben (crobben) Date: 2011-10-10 09:42
Adding a patch for 2.7
msg145305 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-10-10 15:41
Looks good.  Do you have rpm on your machine?  If yes, have you run the tests successfully?
msg145333 - (view) Author: Carl Robben (crobben) Date: 2011-10-11 06:28
Yeah I installed rpm and have run the tests successfully.
msg152516 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-03 14:16
FYI I have committed the patch to my repo and will push as soon as I can.
msg152685 - (view) Author: Roundup Robot (python-dev) Date: 2012-02-05 12:50
New changeset 26aea1825418 by Éric Araujo in branch '3.2':
Stop ignoring RPMs in distutils' upload command (#2945).
http://hg.python.org/cpython/rev/26aea1825418

New changeset 1cb9b8126534 by Éric Araujo in branch 'default':
Merge edits from 3.2 (#13716, #1040439, #2945, #13770, #6715)
http://hg.python.org/cpython/rev/1cb9b8126534
msg154296 - (view) Author: Roundup Robot (python-dev) Date: 2012-02-26 02:49
New changeset f606d722ca23 by Éric Araujo in branch '2.7':
Stop ignoring RPMs in distutils' upload command (#2945).
http://hg.python.org/cpython/rev/f606d722ca23
msg154305 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-26 03:12
Fixed in 2.7 too, thanks to you both.  If you have the time to run the tests, it would be great to get a confirmation (I’m not sure we have a buildbot with rpm installed for 2.7).
History
Date User Action Args
2012-02-26 03:12:53eric.araujosetstatus: open -> closed
resolution: fixed
messages: + msg154305

stage: patch review -> resolved
2012-02-26 02:49:07python-devsetmessages: + msg154296
2012-02-05 12:50:13python-devsetnosy: + python-dev
messages: + msg152685
2012-02-03 14:16:22eric.araujosetassignee: tarek -> eric.araujo
messages: + msg152516
2011-10-11 06:28:48crobbensetmessages: + msg145333
2011-10-10 15:41:42eric.araujosetmessages: + msg145305
stage: needs patch -> patch review
2011-10-10 09:42:10crobbensetfiles: + bdist_rpm-2.7.patch

messages: + msg145293
2011-10-10 09:39:47crobbensetfiles: + test_bdist_rpm.patch

messages: + msg145292
2011-10-07 16:03:17eric.araujosetmessages: + msg145092
2011-10-06 22:13:33crobbensetfiles: + bdist_rpm.patch

nosy: + crobben
messages: + msg145045

keywords: + patch
2011-08-30 15:24:21eric.araujosetkeywords: + easy

stage: needs patch
messages: + msg143221
versions: + Python 3.3, - Python 3.1
2010-08-02 08:59:35eric.araujosetnosy: + eric.araujo

messages: + msg112432
versions: + Python 3.2
2009-02-06 09:15:16tareksetassignee: tarek
nosy: + tarek
versions: + Python 3.1, Python 2.7, - Python 2.5
2008-05-22 14:34:59htgoebelsettype: behavior
2008-05-22 14:34:30htgoebelcreate