diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2010-01-10 17:18:59 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2010-01-10 17:18:59 +0000 |
commit | ac464898866906c22de7e0fb545cefea603a97e6 (patch) | |
tree | e7c8e1c5d22289555e01c99ca4d58fe208882fbc /dev-lang | |
parent | Transfer Prefix keywords (diff) | |
download | historical-ac464898866906c22de7e0fb545cefea603a97e6.tar.gz historical-ac464898866906c22de7e0fb545cefea603a97e6.tar.bz2 historical-ac464898866906c22de7e0fb545cefea603a97e6.zip |
Simplify setting of active version of Python.
Use ${SLOT} or appropriate getter functions instead of ${PYVER}.
Package-Manager: portage-15180-svn/cvs/Linux x86_64
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/Manifest | 18 | ||||
-rw-r--r-- | dev-lang/python/python-2.4.6.ebuild | 39 | ||||
-rw-r--r-- | dev-lang/python/python-2.5.4-r3.ebuild | 6 | ||||
-rw-r--r-- | dev-lang/python/python-2.5.4-r4.ebuild | 37 | ||||
-rw-r--r-- | dev-lang/python/python-2.6.4.ebuild | 45 | ||||
-rw-r--r-- | dev-lang/python/python-3.1.1-r1.ebuild | 39 |
6 files changed, 85 insertions, 99 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 924ab7186b82..2100e2394eca 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -7,25 +7,17 @@ AUX python-2.6-test-cross.patch 914 RMD160 1f421b5565d39a24b887e85cbecaf3857741f AUX python-config-2.4-r1 1624 RMD160 e4e6893c9e8414289c0c70c0f4be58835911e376 SHA1 addf9a6eb81e636364264a6abb3d96f01ea0cf90 SHA256 923a9e896f99cca5aa4ccbb02f981c6e26a2b1aa42326de2359d3c884bde2a9f DIST Python-2.4.6.tar.bz2 8154677 RMD160 0687989193dec2ac108142759281be7ddcf7f31e SHA1 cb1972a554a458f6a26d3e047b359251865d7c96 SHA256 da104139ad3f4534482942ac02cf8f8ed9badd370ffa14f06b07c44914423e08 DIST Python-2.5.4.tar.bz2 9821313 RMD160 3a76c83464c3b1c38a60351ab054e33ac7195663 SHA1 0f2e819d6381f72f26c734e00a6780b3933ea404 SHA256 bc8d896a2bfe5523ba93b8d89b71017b74e8e6cb21dc676a0ccff668c8780110 -DIST Python-2.6.2.tar.bz2 11156901 RMD160 85fa3540cbacf4d0547d2381eb3aa76bef35c2e1 SHA1 125d4ed90f82de1d44f288150bbbda23a6cd27a4 SHA256 a1cdc4a8f6c1f947ea3b87d097af2db4371019bac941d92c3844124c5694328b -DIST Python-2.6.3.tar.bz2 11249543 RMD160 8af600f29c06d0a1bd7e5476750cdd7fac5d7529 SHA1 8e598f7f9299da96899bd8c0afd0d1313221f00f SHA256 4367e389d7e7b2a891b96bc031b9af58b7ca4befc316c91e65436bb822ecdc24 DIST Python-2.6.4.tar.bz2 11249486 RMD160 fd33853842110fa3636dd296f2f27646fd2b151a SHA1 bee572680d1966501247cb2b26e0e51f94d1cd13 SHA256 dad8d5575144a210d5cc4fdbc40b8a26386e9cdb1ef58941bec0be02c7cb9d89 DIST Python-3.1.1.tar.bz2 9757032 RMD160 d60b64e1346b2ff15d65b032ea35fb3ad8b0dc66 SHA1 42eb37bf75fae5731f6df1b195902960ae1789e0 SHA256 d87cc2578abade3ac1124b2b8e63146b1201726279d44cdde37fdd59553b51fd DIST python-gentoo-patches-2.4.6.tar.bz2 10983 RMD160 c06dc76edec86d708a0c0e37126ae50f49f61bd3 SHA1 bbc04083fe74cff8c723c5c3cab70b1b814c987f SHA256 0508a66408f218c655823303833599344d2edeec1ffc683c6ada3fc33731590d DIST python-gentoo-patches-2.5.4-r2.tar.bz2 20722 RMD160 86c25ad3647b7a3ca44c8e781a4572187d6c1934 SHA1 a859d75092303ee445cebd7af4221beeed58b74d SHA256 54236f25147bb26e15f6f204975513515410292a343b6dfb2116806aa9123afc DIST python-gentoo-patches-2.5.4-r3.tar.bz2 19473 RMD160 c3a807693103f9e26c3cce4add5a1f3d975ef216 SHA1 c6170894865ee8aac8c813916c21a0d0458691bc SHA256 03f5bdb0a4ac8eb498a90c5cd444a5c76ed7e79bff5e8dca00efe77cf80c6391 -DIST python-gentoo-patches-2.6.2-r4.tar.bz2 11802 RMD160 d04d80d3ed2ead001dbdbe24a89e8cfe5e6e56c7 SHA1 eca475efb4dd47f688fa49d510ae8f53afe3dff0 SHA256 a0b881c332991aafd885a337432c9ef3c4a29d41ed50898e12261801aad6f83a -DIST python-gentoo-patches-2.6.2-r5.tar.bz2 12206 RMD160 43f321ac4df2b4c6ccb5777d3627c089d46b9024 SHA1 2e35f77a7216b61a9aac9508eac2ddce882c993a SHA256 f3e1593911130ed4bb5879c13e5afa4edd0a873682e1e8609184ec24cae244e1 -DIST python-gentoo-patches-2.6.3.tar.bz2 10996 RMD160 6247c60c54dc80f4a243e5fd2cb56e91989b1703 SHA1 066d76528e892b588d4b643ab4e7e310f2e0079e SHA256 d116be09c88ecd8b93b1f1cfa5a18100e1aeb21ca515a8425e3e14ce6b3e5554 DIST python-gentoo-patches-2.6.4.tar.bz2 11032 RMD160 83903892ef18880f876e7a140c803c1e8a67e24b SHA1 51d4174b2a4136a11c64ae0007b59e4c2f0e13f2 SHA256 19a66a0855df270c030438f21c29260e7ff69b299830409f6aa9140611b721e2 DIST python-gentoo-patches-3.1.1-r4.tar.bz2 10200 RMD160 418852c54bf7169eb7bab078e78997e22799139e SHA1 0c063cd446a22833e267710f59351cb157098b21 SHA256 c065659242df3e921290ff044aee6f543c8b5cd2290db5bf668065cf97fcbbbe -EBUILD python-2.4.6.ebuild 9262 RMD160 6df7665c69b47b35b70791373dee58f6acbc2a92 SHA1 81a265d7f478487e484335a9e79b966a33d0256f SHA256 23ce2b95a5f876192326f508969e69845eaf53a0cbd1176c978c0f0e7f5719d3 -EBUILD python-2.5.4-r3.ebuild 9457 RMD160 76b23268635520077fdb652833a49c8dbd17b7e3 SHA1 9e5260a15056bd381424696ad291850cf75645be SHA256 1449dbd53a020cc2844c2eaf39004fd220f702e395c35a2a287738c86c1a4cc5 -EBUILD python-2.5.4-r4.ebuild 9713 RMD160 3cd0bbb022493d5bd04789c5724155e642d35d12 SHA1 c60627163f1d94c520c4df4e128b3324d2f1ce52 SHA256 bede02b61cf3bec09e2607693821249e30017c33574cef5907f888283e4d73d8 -EBUILD python-2.6.2-r1.ebuild 10010 RMD160 932616944b96b6797b9167d324f7122504d457bd SHA1 81d45fa8f5cc68b2d547ef0151553c66d673dfcf SHA256 ae0d672108d40306b12c94fe20b38c6a51a201798c217fefa7f34883a374267c -EBUILD python-2.6.2-r2.ebuild 10045 RMD160 778904d8332b14b68872ce36367c6440f4004b4a SHA1 357cf9cbbd882219ae3e136f93c467c0b210bf51 SHA256 400ef0f1d9c43aca04d10243fe60f5a3bf1e1f533c2579a4f770ca5291214f11 -EBUILD python-2.6.3.ebuild 9983 RMD160 af38972ec604b2ee906c1c05640e20a5399165d5 SHA1 bbdeb0b02516174c2250f4eb49e7e272e657c489 SHA256 f2bc2a6471f750779e41f4c77011f5d218d9a6bbb5abc729750f37b0a08f0ad3 -EBUILD python-2.6.4.ebuild 9955 RMD160 f097082baf7f1f9f7f274551eacf4ef0fbb948a3 SHA1 396c2b57f2ed222b161f8eb4a2fff582af18f235 SHA256 8577d0546288b4d07a456ffd32ed62c06cd34d9fde1b4f97fd4e68898ed6df88 -EBUILD python-3.1.1-r1.ebuild 9310 RMD160 f7f14a4b399eaf1d49edf44ac46a028e74bb72bc SHA1 7b08c933aa508712c86e6ced93a0cd055628df81 SHA256 d84c2ae6caffab3bee28d00335e210687f9c8b697711b120d4c9b19eb85b5736 +EBUILD python-2.4.6.ebuild 9081 RMD160 4595708c82bac9691a0d9e3443d9b0529c0b814a SHA1 3295f89c689adfb15a403cb2f92469ca0cc37151 SHA256 eaf08da09430c50e362c8f98466da0957d22a646da5c5b927930064da15a5f19 +EBUILD python-2.5.4-r3.ebuild 9493 RMD160 bbef042ae69c07d9ab765eda2374a2475198262a SHA1 9aa777b43e6b2e7f0de865acc2a5fcc07f6a5120 SHA256 3a9c915effabfd19d06a02f63dff0ac6844584f88daeaa7855d675a55cfad092 +EBUILD python-2.5.4-r4.ebuild 9453 RMD160 5cde88a12b5c8636f2cdc7ad9751763f4aaab688 SHA1 61ca623b94825304d68ed7723b90f0c9fdf98bc5 SHA256 c11a0fc58caae5bd78fde5ec5818d4a6fa38b1abbb8479892cd557a4b3f74755 +EBUILD python-2.6.4.ebuild 9693 RMD160 9f658765f801fa6fc7ce1e107e62f6eb9dafeb4b SHA1 a3ad748091ce814739211fcdd9b5a2de05216c6b SHA256 6255f86f886d2478371d9c031bf648d9fbbad954abb00305017e473accf0ac74 +EBUILD python-3.1.1-r1.ebuild 9066 RMD160 71f9f4aecfcd671196035cb859f5cd4cde8ed59b SHA1 e2b33a6ef90a273fc8a8ca63f59a5fc3ba7ecc2d SHA256 30d747ea55f41f4cf10c4fa978dd46e2b3777bf7f31673b022e788ad57318cba MISC ChangeLog 77745 RMD160 71f306aa976420850d66720886c2b4490c9ab2a1 SHA1 ade504fc86d341d35a513cff2cb342710f55ea83 SHA256 1a159ab1d86ccd342caef6a6478c0139cf77d33cc902898d0aac99fb68bf7296 MISC metadata.xml 661 RMD160 54831d16b8807086bfabdbb3df9d33336b5d42a0 SHA1 9867c337fe9e6f4e967004fc9409763e0fedf43b SHA256 2c6c3407251f7ccd6501dee49494e539a9544f2fbae99a4373eefdf4e83e8908 diff --git a/dev-lang/python/python-2.4.6.ebuild b/dev-lang/python/python-2.4.6.ebuild index 44981d9d511e..a12b0ba633b7 100644 --- a/dev-lang/python/python-2.4.6.ebuild +++ b/dev-lang/python/python-2.4.6.ebuild @@ -1,16 +1,11 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 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.24 2009/12/06 17:50:22 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.4.6.ebuild,v 1.25 2010/01/10 17:18:59 arfrever Exp $ EAPI="1" inherit autotools eutils flag-o-matic multilib python toolchain-funcs versionator -# We need this so that we don't depend on python.eclass. -PYVER_MAJOR="$(get_major_version)" -PYVER_MINOR="$(get_version_component_range 2)" -PYVER="${PYVER_MAJOR}.${PYVER_MINOR}" - MY_P="Python-${PV}" S="${WORKDIR}/${MY_P}" @@ -52,6 +47,8 @@ PDEPEND="app-admin/python-updater" PROVIDE="virtual/python" pkg_setup() { + python_set_active_version ${SLOT} + if use berkdb; then ewarn "\"bsddb\" module is out-of-date and no longer maintained inside dev-lang/python. It has" ewarn "been additionally removed in Python 3. You should use external, still maintained \"bsddb3\"" @@ -210,7 +207,7 @@ src_test() { done elog "If you'd like to run them, you may:" - elog "cd /usr/$(get_libdir)/python${PYVER}/test" + elog "cd $(python_get_libdir)/test" elog "and run the tests separately." } @@ -219,31 +216,31 @@ src_install() { # Install our own custom python-config exeinto /usr/bin - newexe "${FILESDIR}"/python-config-${PYVER}-r1 python-config-${PYVER} + newexe "${FILESDIR}"/python-config-${SLOT}-r1 python-config-${SLOT} # Use correct libdir in python-config - dosed "s:/usr/lib/:/usr/$(get_libdir)/:" /usr/bin/python-config-${PYVER} + dosed "s:/usr/lib/:/usr/$(get_libdir)/:" /usr/bin/python-config-${SLOT} # Fix collisions between different slots of Python. - mv "${D}usr/bin/pydoc" "${D}usr/bin/pydoc${PYVER}" - mv "${D}usr/bin/idle" "${D}usr/bin/idle${PYVER}" - mv "${D}usr/share/man/man1/python.1" "${D}usr/share/man/man1/python${PYVER}.1" + mv "${D}usr/bin/pydoc" "${D}usr/bin/pydoc${SLOT}" + mv "${D}usr/bin/idle" "${D}usr/bin/idle${SLOT}" + mv "${D}usr/share/man/man1/python.1" "${D}usr/share/man/man1/python${SLOT}.1" rm -f "${D}usr/bin/smtpd.py" # Fix the OPT variable so that it doesn't have any flags listed in it. # Prevents the problem with compiling things with conflicting flags later. - sed -e "s:^OPT=.*:OPT=-DNDEBUG:" -i "${D}usr/$(get_libdir)/python${PYVER}/config/Makefile" + sed -e "s:^OPT=.*:OPT=-DNDEBUG:" -i "${D}$(python_get_libdir)/config/Makefile" # Python 2.4 partially doesn't respect $(get_libdir). if use build; then - rm -fr "${D}"usr/lib*/python${PYVER}/{bsddb,email,lib-tk,test} + rm -fr "${D}"usr/lib*/python${SLOT}/{bsddb,email,lib-tk,test} else - use elibc_uclibc && rm -fr "${D}"usr/lib*/python${PYVER}/{bsddb/test,test} - use berkdb || rm -fr "${D}"usr/lib*/python${PYVER}/{bsddb,test/test_bsddb*} - use tk || rm -fr "${D}"usr/lib*/python${PYVER}/lib-tk + use elibc_uclibc && rm -fr "${D}"usr/lib*/python${SLOT}/{bsddb/test,test} + use berkdb || rm -fr "${D}"usr/lib*/python${SLOT}/{bsddb,test/test_bsddb*} + use tk || rm -fr "${D}"usr/lib*/python${SLOT}/lib-tk fi - prep_ml_includes usr/include/python${PYVER} + prep_ml_includes $(python_get_includedir) if use examples; then insinto /usr/share/doc/${PF}/examples @@ -274,7 +271,7 @@ pkg_postinst() { eselect_python_update # Python 2.4 partially doesn't respect $(get_libdir). - python_mod_optimize -x "(site-packages|test)" /usr/lib/python${PYVER} + python_mod_optimize -x "(site-packages|test)" /usr/lib/python${SLOT} if [[ "${python_updater_warning}" == "1" ]]; then ewarn @@ -293,5 +290,5 @@ pkg_postrm() { eselect_python_update # Python 2.4 partially doesn't respect $(get_libdir). - python_mod_cleanup /usr/lib/python${PYVER} + python_mod_cleanup /usr/lib/python${SLOT} } diff --git a/dev-lang/python/python-2.5.4-r3.ebuild b/dev-lang/python/python-2.5.4-r3.ebuild index 8c679676428e..b4256c292906 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 +# Copyright 1999-2010 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.27 2009/12/06 17:50:22 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.4-r3.ebuild,v 1.28 2010/01/10 17:18:59 arfrever Exp $ EAPI="1" @@ -57,6 +57,8 @@ PDEPEND="app-admin/python-updater" PROVIDE="virtual/python" pkg_setup() { + python_set_active_version ${SLOT} + if use berkdb; then ewarn "\"bsddb\" module is out-of-date and no longer maintained inside dev-lang/python. It has" ewarn "been additionally removed in Python 3. You should use external, still maintained \"bsddb3\"" diff --git a/dev-lang/python/python-2.5.4-r4.ebuild b/dev-lang/python/python-2.5.4-r4.ebuild index 47a946c91153..5617071218ef 100644 --- a/dev-lang/python/python-2.5.4-r4.ebuild +++ b/dev-lang/python/python-2.5.4-r4.ebuild @@ -1,16 +1,11 @@ # Copyright 1999-2010 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-r4.ebuild,v 1.1 2010/01/01 18:56:30 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.4-r4.ebuild,v 1.2 2010/01/10 17:18:59 arfrever Exp $ EAPI="1" inherit autotools eutils flag-o-matic multilib pax-utils python toolchain-funcs versionator -# We need this so that we don't depend on python.eclass. -PYVER_MAJOR="$(get_major_version)" -PYVER_MINOR="$(get_version_component_range 2)" -PYVER="${PYVER_MAJOR}.${PYVER_MINOR}" - MY_P="Python-${PV}" S="${WORKDIR}/${MY_P}" @@ -59,6 +54,8 @@ PDEPEND="app-admin/python-updater" PROVIDE="virtual/python" pkg_setup() { + python_set_active_version ${SLOT} + if use berkdb; then ewarn "\"bsddb\" module is out-of-date and no longer maintained inside dev-lang/python. It has" ewarn "been additionally removed in Python 3. You should use external, still maintained \"bsddb3\"" @@ -228,7 +225,7 @@ src_test() { done elog "If you'd like to run them, you may:" - elog "cd /usr/$(get_libdir)/python${PYVER}/test" + elog "cd $(python_get_libdir)/test" elog "and run the tests separately." python_disable_pyc @@ -237,28 +234,28 @@ src_test() { src_install() { emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed" - mv "${D}usr/bin/python${PYVER}-config" "${D}usr/bin/python-config-${PYVER}" + mv "${D}usr/bin/python${SLOT}-config" "${D}usr/bin/python-config-${SLOT}" # Fix collisions between different slots of Python. - mv "${D}usr/bin/pydoc" "${D}usr/bin/pydoc${PYVER}" - mv "${D}usr/bin/idle" "${D}usr/bin/idle${PYVER}" - mv "${D}usr/share/man/man1/python.1" "${D}usr/share/man/man1/python${PYVER}.1" + mv "${D}usr/bin/pydoc" "${D}usr/bin/pydoc${SLOT}" + mv "${D}usr/bin/idle" "${D}usr/bin/idle${SLOT}" + mv "${D}usr/share/man/man1/python.1" "${D}usr/share/man/man1/python${SLOT}.1" rm -f "${D}usr/bin/smtpd.py" # Fix the OPT variable so that it doesn't have any flags listed in it. # Prevents the problem with compiling things with conflicting flags later. - sed -e "s:^OPT=.*:OPT=-DNDEBUG:" -i "${D}usr/$(get_libdir)/python${PYVER}/config/Makefile" + sed -e "s:^OPT=.*:OPT=-DNDEBUG:" -i "${D}$(python_get_libdir)/config/Makefile" if use build; then - rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{bsddb,email,lib-tk,sqlite3,test} + rm -fr "${D}$(python_get_libdir)/"{bsddb,email,lib-tk,sqlite3,test} else - use elibc_uclibc && rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{bsddb/test,test} - use berkdb || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{bsddb,test/test_bsddb*} - use sqlite || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/lib-tk" + use elibc_uclibc && rm -fr "${D}$(python_get_libdir)/"{bsddb/test,test} + use berkdb || rm -fr "${D}$(python_get_libdir)/"{bsddb,test/test_bsddb*} + use sqlite || rm -fr "${D}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} + use tk || rm -fr "${D}$(python_get_libdir)/lib-tk" fi - prep_ml_includes usr/include/python${PYVER} + prep_ml_includes $(python_get_includedir) if use examples; then insinto /usr/share/doc/${PF}/examples @@ -288,7 +285,7 @@ eselect_python_update() { pkg_postinst() { eselect_python_update - python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER} + python_mod_optimize -x "(site-packages|test)" $(python_get_libdir) if [[ "${python_updater_warning}" == "1" ]]; then ewarn @@ -306,5 +303,5 @@ pkg_postinst() { pkg_postrm() { eselect_python_update - python_mod_cleanup /usr/$(get_libdir)/python${PYVER} + python_mod_cleanup $(python_get_libdir) } diff --git a/dev-lang/python/python-2.6.4.ebuild b/dev-lang/python/python-2.6.4.ebuild index 746e8f946e3e..5f5fc7bd2620 100644 --- a/dev-lang/python/python-2.6.4.ebuild +++ b/dev-lang/python/python-2.6.4.ebuild @@ -1,16 +1,11 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.4.ebuild,v 1.10 2010/01/01 17:23:45 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.4.ebuild,v 1.11 2010/01/10 17:18:59 arfrever Exp $ EAPI="2" inherit autotools eutils flag-o-matic multilib pax-utils python toolchain-funcs versionator -# We need this so that we don't depend on python.eclass. -PYVER_MAJOR="$(get_major_version)" -PYVER_MINOR="$(get_version_component_range 2)" -PYVER="${PYVER_MAJOR}.${PYVER_MINOR}" - MY_P="Python-${PV}" S="${WORKDIR}/${MY_P}" @@ -62,6 +57,8 @@ PDEPEND="app-admin/python-updater" PROVIDE="virtual/python" pkg_setup() { + python_set_active_version ${SLOT} + if use berkdb; then ewarn "\"bsddb\" module is out-of-date and no longer maintained inside dev-lang/python. It has" ewarn "been additionally removed in Python 3. You should use external, still maintained \"bsddb3\"" @@ -224,38 +221,40 @@ src_test() { done elog "If you'd like to run them, you may:" - elog "cd /usr/$(get_libdir)/python${PYVER}/test" + elog "cd $(python_get_libdir)/test" elog "and run the tests separately." + + python_disable_pyc } src_install() { emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed" - mv "${D}usr/bin/python${PYVER}-config" "${D}usr/bin/python-config-${PYVER}" + mv "${D}usr/bin/python${SLOT}-config" "${D}usr/bin/python-config-${SLOT}" # Fix collisions between different slots of Python. - mv "${D}usr/bin/2to3" "${D}usr/bin/2to3-${PYVER}" - mv "${D}usr/bin/pydoc" "${D}usr/bin/pydoc${PYVER}" - mv "${D}usr/bin/idle" "${D}usr/bin/idle${PYVER}" - mv "${D}usr/share/man/man1/python.1" "${D}usr/share/man/man1/python${PYVER}.1" + mv "${D}usr/bin/2to3" "${D}usr/bin/2to3-${SLOT}" + mv "${D}usr/bin/pydoc" "${D}usr/bin/pydoc${SLOT}" + mv "${D}usr/bin/idle" "${D}usr/bin/idle${SLOT}" + mv "${D}usr/share/man/man1/python.1" "${D}usr/share/man/man1/python${SLOT}.1" rm -f "${D}usr/bin/smtpd.py" # Fix the OPT variable so that it doesn't have any flags listed in it. # Prevents the problem with compiling things with conflicting flags later. - sed -e "s:^OPT=.*:OPT=-DNDEBUG:" -i "${D}usr/$(get_libdir)/python${PYVER}/config/Makefile" + sed -e "s:^OPT=.*:OPT=-DNDEBUG:" -i "${D}$(python_get_libdir)/config/Makefile" if use build; then - rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{bsddb,email,lib-tk,sqlite3,test} + rm -fr "${D}$(python_get_libdir)/"{bsddb,email,lib-tk,sqlite3,test} else - use elibc_uclibc && rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{bsddb/test,test} - use berkdb || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{bsddb,test/test_bsddb*} - use sqlite || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/lib-tk" + use elibc_uclibc && rm -fr "${D}$(python_get_libdir)/"{bsddb/test,test} + use berkdb || rm -fr "${D}$(python_get_libdir)/"{bsddb,test/test_bsddb*} + use sqlite || rm -fr "${D}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} + use tk || rm -fr "${D}$(python_get_libdir)/lib-tk" fi - use threads || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/multiprocessing" + use threads || rm -fr "${D}$(python_get_libdir)/multiprocessing" - prep_ml_includes usr/include/python${PYVER} + prep_ml_includes $(python_get_includedir) if use examples; then insinto /usr/share/doc/${PF}/examples @@ -266,7 +265,7 @@ src_install() { newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} # Don't install empty directory. - rmdir "${D}usr/$(get_libdir)/python${PYVER}/lib-old" + rmdir "${D}$(python_get_libdir)/lib-old" } pkg_preinst() { @@ -288,7 +287,7 @@ eselect_python_update() { pkg_postinst() { eselect_python_update - python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER} + python_mod_optimize -x "(site-packages|test)" $(python_get_libdir) if [[ "${python_updater_warning}" == "1" ]]; then ewarn @@ -306,5 +305,5 @@ pkg_postinst() { pkg_postrm() { eselect_python_update - python_mod_cleanup /usr/$(get_libdir)/python${PYVER} + python_mod_cleanup $(python_get_libdir) } diff --git a/dev-lang/python/python-3.1.1-r1.ebuild b/dev-lang/python/python-3.1.1-r1.ebuild index 0fa9fb5c8009..cd63af114223 100644 --- a/dev-lang/python/python-3.1.1-r1.ebuild +++ b/dev-lang/python/python-3.1.1-r1.ebuild @@ -1,16 +1,11 @@ # Copyright 1999-2010 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.22 2010/01/01 19:54:42 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.1-r1.ebuild,v 1.23 2010/01/10 17:18:59 arfrever Exp $ EAPI="2" inherit autotools eutils flag-o-matic multilib pax-utils python toolchain-funcs versionator -# We need this so that we don't depend on python.eclass. -PYVER_MAJOR="$(get_major_version)" -PYVER_MINOR="$(get_version_component_range 2)" -PYVER="${PYVER_MAJOR}.${PYVER_MINOR}" - MY_P="Python-${PV}" S="${WORKDIR}/${MY_P}" @@ -51,6 +46,10 @@ PDEPEND="app-admin/python-updater PROVIDE="virtual/python" +pkg_setup() { + python_set_active_version ${SLOT} +} + src_prepare() { # Ensure that internal copies of expat and libffi aren't used. rm -fr Modules/expat @@ -206,7 +205,7 @@ src_test() { done elog "If you'd like to run them, you may:" - elog "cd /usr/$(get_libdir)/python${PYVER}/test" + elog "cd $(python_get_libdir)/test" elog "and run the tests separately." python_disable_pyc @@ -215,29 +214,29 @@ src_test() { src_install() { emake DESTDIR="${D}" altinstall || die "emake altinstall failed" - mv "${D}usr/bin/python${PYVER}-config" "${D}usr/bin/python-config-${PYVER}" + mv "${D}usr/bin/python${SLOT}-config" "${D}usr/bin/python-config-${SLOT}" # Fix collisions between different slots of Python. - mv "${D}usr/bin/2to3" "${D}usr/bin/2to3-${PYVER}" - mv "${D}usr/bin/pydoc3" "${D}usr/bin/pydoc${PYVER}" - mv "${D}usr/bin/idle3" "${D}usr/bin/idle${PYVER}" + mv "${D}usr/bin/2to3" "${D}usr/bin/2to3-${SLOT}" + mv "${D}usr/bin/pydoc3" "${D}usr/bin/pydoc${SLOT}" + mv "${D}usr/bin/idle3" "${D}usr/bin/idle${SLOT}" rm -f "${D}usr/bin/smtpd.py" # Fix the OPT variable so that it doesn't have any flags listed in it. # Prevents the problem with compiling things with conflicting flags later. - sed -e "s:^OPT=.*:OPT=-DNDEBUG:" -i "${D}usr/$(get_libdir)/python${PYVER}/config/Makefile" + sed -e "s:^OPT=.*:OPT=-DNDEBUG:" -i "${D}$(python_get_libdir)/config/Makefile" if use build; then - rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{email,sqlite3,test,tkinter} + rm -fr "${D}$(python_get_libdir)/"{email,sqlite3,test,tkinter} else - use elibc_uclibc && rm -fr "${D}usr/$(get_libdir)/python${PYVER}/test" - use sqlite || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{tkinter,test/test_tk*} + use elibc_uclibc && rm -fr "${D}$(python_get_libdir)/test" + use sqlite || rm -fr "${D}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} + use tk || rm -fr "${D}$(python_get_libdir)/"{tkinter,test/test_tk*} fi - use threads || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/multiprocessing" + use threads || rm -fr "${D}$(python_get_libdir)/multiprocessing" - prep_ml_includes usr/include/python${PYVER} + prep_ml_includes $(python_get_includedir) if use examples; then insinto /usr/share/doc/${PF}/examples @@ -267,7 +266,7 @@ eselect_python_update() { pkg_postinst() { eselect_python_update - python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER} + python_mod_optimize -x "(site-packages|test)" $(python_get_libdir) if [[ "$(eselect python show)" == "python2."* ]]; then ewarn @@ -297,5 +296,5 @@ pkg_postinst() { pkg_postrm() { eselect_python_update - python_mod_cleanup /usr/$(get_libdir)/python${PYVER} + python_mod_cleanup $(python_get_libdir) } |