Bug 722578

Summary: distutils doesn't byte-compile .py files to __pycache__ during installation, leading to extra .pyc files in wrong location
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: python3Assignee: Dave Malcolm <dmalcolm>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: amcnabb, dmalcolm, thomas.moschny, tomspur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python3-3.2.2-8.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-11 19:04:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Malcolm 2011-07-15 17:29:35 UTC
Description of problem:
See http://bugs.python.org/issue11254

This is affecting e.g. bug 675588

Version-Release number of selected component (if applicable):
python3-3.2.1-1.fc16, but presumably all 3.2 in F15 onwards.

Comment 1 Dave Malcolm 2011-07-15 17:47:18 UTC
Looks like this may affect every python3-* package.

Some examples:

$ rpm -q python3-setuptools
python3-setuptools-0.6.14-7.fc15.noarch
$ rpm -ql python3-setuptools | grep "\.pyc" | grep alias
/usr/lib/python3.2/site-packages/setuptools/command/__pycache__/alias.cpython-32.pyc
/usr/lib/python3.2/site-packages/setuptools/command/alias.pyc


$ rpm -q python3-coverage
python3-coverage-3.4-3.fc15.x86_64
$ rpm -ql python3-coverage | grep "\.pyc" | grep __init__
/usr/lib64/python3.2/site-packages/coverage/__init__.pyc
/usr/lib64/python3.2/site-packages/coverage/__pycache__/__init__.cpython-32.pyc


$ rpm -q python3-pygments
python3-pygments-1.3.1-8.fc15.noarch
$ rpm -ql python3-pygments | grep "\.pyc" | grep html
/usr/lib/python3.2/site-packages/pygments/formatters/__pycache__/html.cpython-32.pyc
/usr/lib/python3.2/site-packages/pygments/formatters/html.pyc


Removing blocker on bug 675588, given that everything else seems to be affected

Comment 2 Dave Malcolm 2011-10-10 21:23:36 UTC
A fix has been committed upstream

I've cherrypicked the patch, into F17:
http://pkgs.fedoraproject.org/gitweb/?p=python3.git;a=commitdiff;h=e2a3db4dedb92ecbe2df3545d19dc95e243d54c3

Building python3-3.2.2-8.fc17 for dist-rawhide
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=3420282

Comment 3 Thomas Moschny 2011-12-13 18:35:23 UTC
Shouldn't we have the fix also on F16?