Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96389 - distutils.eclass should allow PYTHON_MODNAME to contain multiple packages
Summary: distutils.eclass should allow PYTHON_MODNAME to contain multiple packages
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-17 09:03 UTC by Marien Zwart (RETIRED)
Modified: 2005-12-07 09:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marien Zwart (RETIRED) gentoo-dev 2005-06-17 09:03:48 UTC
distutils.eclass allows setting PYTHON_MODNAME to a space-separated list of
packages that have their .pyc/.pyo files removed after uninstall. However it
won't automagically optimize all modules. The following:

--- /usr/portage/eclass/distutils.eclass	2004-09-16 01:35:59.000000000 +0200
+++ distutils.eclass	2005-06-17 17:59:36.000000000 +0200
@@ -87,7 +87,7 @@
 	
 	if has_version ">=dev-lang/python-2.3"; then
 		python_version
-		for pymod in "${PYTHON_MODNAME}"; do
+		for pymod in ${PYTHON_MODNAME}; do
 			if [ -d "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}" ]; then
 				python_mod_optimize
${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}
 			fi

fixes it. distutils_pkg_postrm already has the variable unquoted, so I'm pretty
sure this is ok.

Reproducible: Always
Steps to Reproduce:
1. emerge a package with PYTHON_MODNAME="nevow formless"
Actual Results:  
Get no precompiled .pyc/.pyo files, but do get proper cleanup messages
("Cleaning orphaned Python bytecode from ${path} .." for both nevow and formless)


Expected Results:  
Proper "mod_optimize".
Comment 1 Marien Zwart (RETIRED) gentoo-dev 2005-12-07 09:57:32 UTC
Checked in, closing.