summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-09-27 18:33:37 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-09-27 18:33:37 +0000
commit143e54e67e524ebdf51a4c7392ce1375974fb80c (patch)
treebf39d2b7cc34d2652c760344056fd8d519dc19c2 /dev-lang/python
parentFix Makefile ARCH setting which was disabling the bytecode compiler on amd64;... (diff)
downloadgentoo-2-143e54e67e524ebdf51a4c7392ce1375974fb80c.tar.gz
gentoo-2-143e54e67e524ebdf51a4c7392ce1375974fb80c.tar.bz2
gentoo-2-143e54e67e524ebdf51a4c7392ce1375974fb80c.zip
Don't duplicate code.
(Portage version: 14444-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/python-2.4.6.ebuild16
-rw-r--r--dev-lang/python/python-2.5.4-r3.ebuild16
-rw-r--r--dev-lang/python/python-2.6.2-r2.ebuild16
-rw-r--r--dev-lang/python/python-3.1.1-r1.ebuild16
4 files changed, 28 insertions, 36 deletions
diff --git a/dev-lang/python/python-2.4.6.ebuild b/dev-lang/python/python-2.4.6.ebuild
index 5f8968cb1231..785a33219b80 100644
--- a/dev-lang/python/python-2.4.6.ebuild
+++ b/dev-lang/python/python-2.4.6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.4.6.ebuild,v 1.17 2009/09/27 17:56:00 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.4.6.ebuild,v 1.18 2009/09/27 18:33:37 arfrever Exp $
EAPI="1"
@@ -263,7 +263,7 @@ pkg_preinst() {
fi
}
-pkg_postinst() {
+eselect_python_update() {
local ignored_python_slots
[[ "$(eselect python show)" == "python2."* ]] && ignored_python_slots="--ignore 3.0 --ignore 3.1 --ignore 3.2"
@@ -271,6 +271,10 @@ pkg_postinst() {
eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 > /dev/null
eselect python update ${ignored_python_slots}
+}
+
+pkg_postinst() {
+ eselect_python_update
python_mod_optimize -x "(site-packages|test)" /usr/lib/python${PYVER}
[[ "$(get_libdir)" != "lib" ]] && python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER}
@@ -289,13 +293,7 @@ pkg_postinst() {
}
pkg_postrm() {
- local ignored_python_slots
- [[ "$(eselect python show)" == "python2."* ]] && ignored_python_slots="--ignore 3.0 --ignore 3.1 --ignore 3.2"
-
- # Create python2 symlink.
- eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 > /dev/null
-
- eselect python update ${ignored_python_slots}
+ eselect_python_update
python_mod_cleanup /usr/lib/python${PYVER}
[[ "$(get_libdir)" != "lib" ]] && python_mod_cleanup /usr/$(get_libdir)/python${PYVER}
diff --git a/dev-lang/python/python-2.5.4-r3.ebuild b/dev-lang/python/python-2.5.4-r3.ebuild
index 4f62710d3ae2..038339dcaaac 100644
--- a/dev-lang/python/python-2.5.4-r3.ebuild
+++ b/dev-lang/python/python-2.5.4-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.4-r3.ebuild,v 1.19 2009/09/27 17:56:00 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.4-r3.ebuild,v 1.20 2009/09/27 18:33:37 arfrever Exp $
EAPI="1"
@@ -268,7 +268,7 @@ pkg_preinst() {
fi
}
-pkg_postinst() {
+eselect_python_update() {
local ignored_python_slots
[[ "$(eselect python show)" == "python2."* ]] && ignored_python_slots="--ignore 3.0 --ignore 3.1 --ignore 3.2"
@@ -276,6 +276,10 @@ pkg_postinst() {
eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 > /dev/null
eselect python update ${ignored_python_slots}
+}
+
+pkg_postinst() {
+ eselect_python_update
python_mod_optimize -x "(site-packages|test)" /usr/lib/python${PYVER}
[[ "$(get_libdir)" != "lib" ]] && python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER}
@@ -294,13 +298,7 @@ pkg_postinst() {
}
pkg_postrm() {
- local ignored_python_slots
- [[ "$(eselect python show)" == "python2."* ]] && ignored_python_slots="--ignore 3.0 --ignore 3.1 --ignore 3.2"
-
- # Create python2 symlink.
- eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 > /dev/null
-
- eselect python update ${ignored_python_slots}
+ eselect_python_update
python_mod_cleanup /usr/lib/python${PYVER}
[[ "$(get_libdir)" != "lib" ]] && python_mod_cleanup /usr/$(get_libdir)/python${PYVER}
diff --git a/dev-lang/python/python-2.6.2-r2.ebuild b/dev-lang/python/python-2.6.2-r2.ebuild
index 252fd4c90f6b..150bbb97c7ad 100644
--- a/dev-lang/python/python-2.6.2-r2.ebuild
+++ b/dev-lang/python/python-2.6.2-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.2-r2.ebuild,v 1.5 2009/09/27 17:56:00 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.2-r2.ebuild,v 1.6 2009/09/27 18:33:37 arfrever Exp $
EAPI="2"
@@ -281,7 +281,7 @@ pkg_preinst() {
fi
}
-pkg_postinst() {
+eselect_python_update() {
local ignored_python_slots
[[ "$(eselect python show)" == "python2."* ]] && ignored_python_slots="--ignore 3.0 --ignore 3.1 --ignore 3.2"
@@ -289,6 +289,10 @@ pkg_postinst() {
eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 > /dev/null
eselect python update ${ignored_python_slots}
+}
+
+pkg_postinst() {
+ eselect_python_update
python_mod_optimize -x "(site-packages|test)" /usr/lib/python${PYVER}
[[ "$(get_libdir)" != "lib" ]] && python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER}
@@ -307,13 +311,7 @@ pkg_postinst() {
}
pkg_postrm() {
- local ignored_python_slots
- [[ "$(eselect python show)" == "python2."* ]] && ignored_python_slots="--ignore 3.0 --ignore 3.1 --ignore 3.2"
-
- # Create python2 symlink.
- eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 > /dev/null
-
- eselect python update ${ignored_python_slots}
+ eselect_python_update
python_mod_cleanup /usr/lib/python${PYVER}
[[ "$(get_libdir)" != "lib" ]] && python_mod_cleanup /usr/$(get_libdir)/python${PYVER}
diff --git a/dev-lang/python/python-3.1.1-r1.ebuild b/dev-lang/python/python-3.1.1-r1.ebuild
index 8c99d9bf24b5..d84afa955597 100644
--- a/dev-lang/python/python-3.1.1-r1.ebuild
+++ b/dev-lang/python/python-3.1.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.1-r1.ebuild,v 1.5 2009/09/27 17:56:00 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.1-r1.ebuild,v 1.6 2009/09/27 18:33:37 arfrever Exp $
EAPI="2"
@@ -258,7 +258,7 @@ pkg_preinst() {
fi
}
-pkg_postinst() {
+eselect_python_update() {
local ignored_python_slots
[[ "$(eselect python show)" == "python2."* ]] && ignored_python_slots="--ignore 3.0 --ignore 3.1 --ignore 3.2"
@@ -266,6 +266,10 @@ pkg_postinst() {
eselect python update > /dev/null
eselect python update ${ignored_python_slots}
+}
+
+pkg_postinst() {
+ eselect_python_update
python_mod_optimize -x "(site-packages|test)" /usr/lib/python${PYVER}
[[ "$(get_libdir)" != "lib" ]] && python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER}
@@ -294,13 +298,7 @@ pkg_postinst() {
}
pkg_postrm() {
- local ignored_python_slots
- [[ "$(eselect python show)" == "python2."* ]] && ignored_python_slots="--ignore 3.0 --ignore 3.1 --ignore 3.2"
-
- # Create python3 symlink.
- eselect python update > /dev/null
-
- eselect python update ${ignored_python_slots}
+ eselect_python_update
python_mod_cleanup /usr/lib/python${PYVER}
[[ "$(get_libdir)" != "lib" ]] && python_mod_cleanup /usr/$(get_libdir)/python${PYVER}