Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 270382 - python.eclass python_mod_optimize and friends should be less demanding
Summary: python.eclass python_mod_optimize and friends should be less demanding
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: High enhancement
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-19 06:16 UTC by SpanKY
Modified: 2010-09-14 14:34 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 SpanKY gentoo-dev 2009-05-19 06:16:13 UTC
right now, python_mod_optimize requires a full path.  that means people need to know the exact location of the python install.  that has led to plenty of duplicated code like so:
sys-cluster/mpich2/mpich2-1.0.8.ebuild: python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages/${PN}
sys-libs/libselinux/libselinux-1.34.14.ebuild: python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages
sys-libs/libselinux/libselinux-2.0.71.ebuild: python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages
sys-libs/libsemanage/libsemanage-1.10.9.ebuild: python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages
sys-libs/libsemanage/libsemanage-2.0.27.ebuild: python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages
sys-apps/policycoreutils/policycoreutils-1.34.15.ebuild: python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages
sys-apps/policycoreutils/policycoreutils-2.0.55.ebuild: python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages

since packages should generally be installing into /usr/$(get_libdir)/python${PYVER}/ anyways, and so far the eclass has required absolute paths, how about we extend it such that a relative path will automatically prefix $(python_get_libdir)

further more, since the default behavior for no arguments has been to do nothing, and so no ebuild should be invoking python_mod_optimize that way, why dont we default it to run on $(python_get_sitedir)
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-14 20:45:40 UTC
python_mod_optimize() now requires paths relative to "$(python_get_sitedir)" in case of packages supporting installation for multiple Python versions.
Comment 2 Alexander E. Patrakov 2010-09-14 14:15:12 UTC
Please revert - a lot of packages in stable, e.g. xfce-base/exo-0.3.107, still pass absolute pathnames to python_mod_optimize, and this no longer works.
Comment 3 Alexander E. Patrakov 2010-09-14 14:16:18 UTC
oops, I should not post on behalf of forum users.
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-09-14 14:34:00 UTC
(In reply to comment #1)
> python_mod_optimize() now requires paths relative to "$(python_get_sitedir)"
> in case of packages supporting installation for multiple Python versions.

The same behavior is also present in case of modules in site-packages directories for all packages in EAPI >=3.

(In reply to comment #2)
> Please revert - a lot of packages in stable, e.g. xfce-base/exo-0.3.107,
> still pass absolute pathnames to python_mod_optimize,

xfce-base/exo-0.3.107 was misported to EAPI="3" (bug #337009).