Title: distutils' bdist_rpm fails when running with PYTHONDONTWRITEBYTECODE
Type: Stage:
Components: Distutils Versions: Python 3.1, Python 3.2, Python 3.3, Python 2.7
Status: closed Resolution: duplicate
Dependencies: Superseder: Make testsuite pass with -B/DONTWRITEBYTECODE set.
View: 11420
Assigned To: eric.araujo Nosy List: Arfrever, eric.araujo, tarek, twouters
Priority: normal Keywords:

Created on 2011-03-06 23:14 by twouters, last changed 2011-03-07 20:01 by eric.araujo. This issue is now closed.

Messages (6)
msg130198 - (view) Author: Thomas Wouters (twouters) * (Python committer) Date: 2011-03-06 23:14
According to distutils' test_bdist_rpm, bdist_rpm fails when running Python with -B/PYTHONDONTWRITEBYTECODE. (bdist_rpm or its test doesn't pass -B along but also doesn't use -E, so the test-failure shows up when setting the PYTHONDONTWRITEBYTECODE environment variable.) It looks like (somewhere in distutils) something relies on .pyc files being written, instead of explicitly using (say) py_compile.compile().
msg130246 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-07 10:10
What change are you wishing for?  bdist_rpm is frozen in distutils and removed in distutils2.  If this is a feature request, it should be reported to the new standalone project bdist_rpm2 (home <>; the bug tracker is not enabled, so I suggest you write to the distutils-sig ML).
msg130273 - (view) Author: Thomas Wouters (twouters) * (Python committer) Date: 2011-03-07 18:21
I couldn't really care less about bdist_rpm, I'm just reporting a bug in it when not writing .pyc files (through PYTHONDONTWRITEBYTECODE.) I encountered it while making the testsuite do the right thing when not writing bytecode (see issue #11420.) To me, a perfectly acceptable "fix" would be for the bdist_rpm tests to be skipped when not writing bytecode.
msg130274 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-07 18:23
I’d find such a patch acceptable too.  Thanks for the report and suggested solution.
msg130282 - (view) Author: Thomas Wouters (twouters) * (Python committer) Date: 2011-03-07 18:56
I'll incorporate that change into issue #11420 then, and close this (and harp on bdist_rpm2 if it ever lands in the stdlib and has the same issue :-)
msg130288 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-07 20:01
bdist_rpm2 will never go into the stdlib, that’s the point: external maintenance lets people adapt the code when operating system policies change and release more often than Python.  Sooner or later someone will report this same bug to the bdist_rpm2, so if you’re willing to do that now it would be extra nice.
Date User Action Args
2011-03-07 20:01:57eric.araujosetnosy: twouters, tarek, eric.araujo, Arfrever
resolution: wont fix -> duplicate
superseder: Make testsuite pass with -B/DONTWRITEBYTECODE set.
messages: + msg130288
2011-03-07 18:56:04twouterssetstatus: open -> closed

messages: + msg130282
resolution: wont fix
nosy: twouters, tarek, eric.araujo, Arfrever
2011-03-07 18:23:25eric.araujosetassignee: tarek -> eric.araujo
versions: + Python 3.1, Python 2.7, Python 3.2, Python 3.3
messages: + msg130274
nosy: twouters, tarek, eric.araujo, Arfrever
2011-03-07 18:21:03twouterssetnosy: twouters, tarek, eric.araujo, Arfrever
messages: + msg130273
2011-03-07 14:36:13Arfreversetnosy: + Arfrever
2011-03-07 10:10:08eric.araujosetnosy: twouters, tarek, eric.araujo
messages: + msg130246
2011-03-06 23:14:53twouterscreate