diff options
author | Dirkjan Ochtman <djc@gentoo.org> | 2012-09-30 15:18:29 +0000 |
---|---|---|
committer | Dirkjan Ochtman <djc@gentoo.org> | 2012-09-30 15:18:29 +0000 |
commit | da2c3e01565cec28001d7b2452a2d154dabb47d1 (patch) | |
tree | 8a22305e43e82a6ca5f93beae5d66423d86a3266 /dev-lang | |
parent | Drop some obsolete versions. (diff) | |
download | historical-da2c3e01565cec28001d7b2452a2d154dabb47d1.tar.gz historical-da2c3e01565cec28001d7b2452a2d154dabb47d1.tar.bz2 historical-da2c3e01565cec28001d7b2452a2d154dabb47d1.zip |
Add tentative python-3.3 ebuild.
Package-Manager: portage-2.1.11.23/cvs/Linux x86_64
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/ChangeLog | 7 | ||||
-rw-r--r-- | dev-lang/python/Manifest | 21 | ||||
-rw-r--r-- | dev-lang/python/python-3.3.0.ebuild | 292 |
3 files changed, 305 insertions, 15 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog index bcb4f70e4e76..244b2af14c9c 100644 --- a/dev-lang/python/ChangeLog +++ b/dev-lang/python/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-lang/python # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.612 2012/09/27 03:08:40 mattst88 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.613 2012/09/30 15:18:29 djc Exp $ + +*python-3.3.0 (30 Sep 2012) + + 30 Sep 2012; Dirkjan Ochtman <djc@gentoo.org> +python-3.3.0.ebuild: + Add tentative python-3.3 ebuild. Some tests still fail. 27 Sep 2012; Matt Turner <mattst88@gentoo.org> python-3.1.5.ebuild, python-3.2.3-r1.ebuild: diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 72547ec1fbbc..7a083bfd29ab 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -22,6 +22,7 @@ DIST Python-3.1.4.tar.xz 8184052 SHA256 21aa936b3989a8e32ba17799fcf235e0979a2e1c DIST Python-3.1.5.tar.xz 8189536 SHA256 035c4370354d901924ce0fd8df65c5452839f590ec1b9c17fae2ada3e5f3b4d7 SHA512 68581803b9d8276912503869d80494a135cc77aed204e1df3c83eb88c9fc06c8774402b885d80be38dfbc8229432b4ba53d6227f562504c4338464da7ed4bcb1 WHIRLPOOL c9b492d37e3220f9dda3f06f58569b2bd831de5f65fa92e644f016e21231a188a7310058e37081a2038769e65bc281ce4f5a464abfc4571e7337cfd9f17d7d9e DIST Python-3.2.2.tar.xz 8923224 SHA256 1072d13d846373e7eaa4f94c21f0985d2965e916ff1096abe72d1af67c5f55f9 SHA512 112c1a65416d0a136823ba78a2fae265d339652fa67c1610ba7ccba29c57956bde1c77540a5cc1c44e2befe86cda6945b0d13f300e4c03025566394a0db5bf60 WHIRLPOOL 7de2911f687749e3104357c7cdbdfec3fb5489df0d10089a7d0edac1e58cf03f7952ac8593dbe1fa9f20a77da06ea36b69aca35ae6e6ef08c7fcee62c7464597 DIST Python-3.2.3.tar.xz 8970368 SHA256 23c16f621f21e54987079765c060196cbe50235c7867147c6126d433054b1754 SHA512 80a84cc0818b28e0d52828cf23e3618dc25bde5d40dad3d76f1f66d36bdbe14845d6a8582659b304320564ba53cbd5e917f7d435998bbb4c4e2004474d1e7154 WHIRLPOOL 2bdf34a09b12d7b0d7c2df921b74d355eb2ac5dd9d9d979e493f1dba5bbc11034a5b8dfaf11c4210952a56165f8e1d7c0b9badad374fb7ac2236851f93035d0f +DIST Python-3.3.0.tar.xz 11720732 SHA256 09994d2885a8ef61b4b2389527a9805a4a05e3e0f121dbc8e4222f9010f5bbd7 SHA512 36aacc516d7486c8123656171a9400e3881146464abaa56b8dd1c8e3d0c1c31e305529157eacf6e29e3dd0a065c7ff8452addd1d178578bf8db4c9f5c1b7380f WHIRLPOOL 8da50fd249718d6090da9c75af39fa8e925fa91caf828d8067b7f9697cbe98409635b71f05c337f479499b19783257fc5c89844649d48df60ed24d35b42b68a1 DIST python-gentoo-patches-2.5.4-r3.tar.bz2 19473 SHA256 03f5bdb0a4ac8eb498a90c5cd444a5c76ed7e79bff5e8dca00efe77cf80c6391 SHA512 8100bf894e1fae03888a3e66fa74147fdd65912200e0324c3ae4164b88e589aa2756f2d331eed8a0342695b64594c33be7c67633fa390c1993e1dd5196b14a37 WHIRLPOOL 910c225736065263ad01c07a16ee10fe1671a227f62df060d5ee93cb76b983aed5c019e3beb51210e1fddcfc4d8b74d7623ec608e4505ebb9c7124f63dcdbd78 DIST python-gentoo-patches-2.6.6-r2.tar.bz2 16277 SHA256 2754d2aa27086efccc2de73442cf0022f3f9768431b10ff72c9181c4ddd95428 SHA512 b1d2d4af25878eed0a396b9516386353c29758574ef0fc5b160811e136cf6f87a3e1b72055534afb66cb7c077536e2030d5cb6eb25a2925984aa9a33d4840b05 WHIRLPOOL e562263b837712450b5f62ca371b2dc236260ffc73c78b7c045ea01a70bcfa33bcee08ccb9299730c5ea88955211caf55f1a6fcc6ea4b76d7227d7a80707dd66 DIST python-gentoo-patches-2.6.7.tar.bz2 15173 SHA256 dcaca7d0a5f266c41c72a3047db24d23e675ce4a0ac9196dae42d7892d5edb33 SHA512 b1c244a7a02d5a96e4f6287ffba9dfd8614ef5e7b213ee883f885aaec9e6517e1177c61919649191803c369b4dff899baa7408a31cd0e454337779746a7945f7 WHIRLPOOL 6f7a2f69d0c9aba07de166daf866b2e67cdc4f2fbac43619fb291f4fc4e6538b9ff36c7d9ae0c6dc87da00c7afea1eb951a8b23e94df2d8b154893e31a607436 @@ -34,6 +35,7 @@ DIST python-gentoo-patches-3.1.4.tar.bz2 12930 SHA256 9800f3a9989c8aac4c96a7e641 DIST python-gentoo-patches-3.1.5-0.tar.bz2 16939 SHA256 ceacc96a370dfaa232d0a62336af37b809dd7d55adacf5f8befe17e2f72981ff SHA512 c9bd442bf8f69ea5ddd28e732a3912b629e3d392fe58d478acef291332f7f35358c6864132d1c32de3e640c0a6b26305db3de81829e38743603cc43a3b8ae6f8 WHIRLPOOL e5ff0ef4e8cab2df9067f0d26e799bbb89a3a4a46f7d4001412d979457ddd96a6698a1d345f852bf591175a268a8322e0cb22bb396cbcf65028b4960d71c0a7f DIST python-gentoo-patches-3.2.2.tar.bz2 10834 SHA256 521c1bd7c360fb66788e7c5e191497e014bb104f2ef2272d99a40b764082d7cb SHA512 c4800fb61f1926a6930b5a30dcdbec4468333cd730a0c34504a9d818429f22781a0c4f845c084fdb8ac00e3dd152db933e245a577bc87d6fb3c0035d5e94f423 WHIRLPOOL 5f13ed0aeeade4d2357e29aa0b3d6def66f1c1825eb2c94e9a2f8ffdd802a8fc6bf550f26b290893eee875ff273b717cd72129ed8cc55a8c0c55e27e72df1eba DIST python-gentoo-patches-3.2.3-0.tar.bz2 14265 SHA256 2ad8829aa6594edc405afd0ed148a2b4b608d7c6f09ea90bfb90d87580a4784b SHA512 1ea0c8711ec5952a8c0bafeaceec0d8f8821123fe4f622626b57c6e0b1065c349885537b933a4ef22c29e6c8f6c44f44dec587892a2b13dbfe92ec342f16197d WHIRLPOOL b6f6a4d8e7dcafbf944266d1b5744c71568ddb0c21c5b54c5e041ef8bfd5e1fc5a1e68fa3083d8a466182022a07ebe88d536a4742a5fe0443e5d73d5d4bc64ed +DIST python-gentoo-patches-3.3.0-0.tar.bz2 11608 SHA256 de4caf2d29e596959dbe603505d72f60a5e29f4ab556aed62130d21fc5f3cf9b SHA512 28cb3b9ddc88d54169d7b78510ef7394609a26bc162d3e910972715d549f6d28cd6a4f8e44c06ad4e87c3c9610408d2423f39645be1c9439a4a7694e8d956930 WHIRLPOOL 6589cfd157d7fc69487d04df27ac37254979b09e2969988d9efacc8ce92811e4992b42e81c483bb796eb734bb58a3e663eaef2c01da251ede10f335e382da3b4 EBUILD python-2.5.4-r4.ebuild 9900 SHA256 8acf8c08e6ef79524b548d30c0971f49ef3adf69c1d216d54f433dab00d42ab7 SHA512 ddd05933feeaabb7b2d5d15e3db74431163b38643b00955c27dedf3b08d8d39ee8e8737b852dca67b209aa045044d93c3b55ca1d6aa1c2a6fd7ded1bd5dc8ca4 WHIRLPOOL 31512099a4493bb1fa733651ae722f7e73c70ff543a26c2ade4f9ebba1039f380830f08c63ea1bd1b704e8a30e9e88cb36baad198d3cf63ca280c0edc519e101 EBUILD python-2.6.6-r2.ebuild 10785 SHA256 291367cdd811997ec11ba528739c0ce230f5f5ae02555277fee5a43648f0a250 SHA512 7d9a2733ece1fce72ca29d1d069966fb39ad69b1085911f9ef3344c08241d8bdb2c4db552283c9eb33857503c7af8afa840774452ba6f0f8e725ee6fc1189883 WHIRLPOOL 7599cf91dffd3de39a2e3e95c3eb92802ed9898a42bcaadb41b120d473162a09a4c103a8937c9011b541b9ccb810902a161f8022a874038ccb98ea49596d0c0b EBUILD python-2.6.7-r2.ebuild 11857 SHA256 f41d18eb4267700fa831f72e83cf3027898095f6a0cbb64ce1432578156686fc SHA512 b91d2810b3d2c0431974d4832f9a444661e19648173db2224a107ceeb67673845d7603baa97c45ed6937987abd41c9e67999aebe7446abc6de71590acc6c9f50 WHIRLPOOL cabb5d41db543e48aaba16a9cdca06df60348b1601ee75ce989adefdfed815a0496b8e797d0a289937b2187771667b769d273968291cd90c5374175d3a78bc3e @@ -49,23 +51,14 @@ EBUILD python-3.2.2-r1.ebuild 11091 SHA256 5b023da39c639ea436b2a875faadfd25f8515 EBUILD python-3.2.2.ebuild 10967 SHA256 7a1fc42a4a6941b9d30d0c66eae56ed19dba96286f18340ad76747160af2ae58 SHA512 4c48b86d5038f706e8555d4636263664fb13e958adfe4b7233166488e3bbeaf5567bad53edb5881c4d1840084bc5657ac56520f17536769dd00fd991945bdd8d WHIRLPOOL 5c640502a408a3711d9392ffea47e1397622d9a557e5d510d48d01c725d2cc61a965792f44f1ff4d77e6ca70abe47c8fd18e6b8276f42034e2cf3c0743fa0fa6 EBUILD python-3.2.3-r1.ebuild 8723 SHA256 36451f91decd95aeac59e467dae174636e68038582b3f7d58281d5e4075c1548 SHA512 0c122fabf00aaf31beba655647fe93b73c8aeb363ac5ff3ffcaeeedcabdac336f06387ea0d6ff73c19dc60e854876028b16f546a161b0fde8d847990d7835b97 WHIRLPOOL 21ea745d085688c12911adeab19816fd91af134000475f002b927dcde91dce757012538520912b6eea00d12bcc74ff999b1505f43ac079037b0b8f195f07da9c EBUILD python-3.2.3.ebuild 8717 SHA256 0bb6bf9072bbb5151fb5fb33bf03dc83ff4ef419507f1e18f96c85c8168577db SHA512 3f9025a4b0426dd38e33f867f51d83bd062a075867a71667006cee91adf46e2c0a94df3a2f8badfb76960bed35622142c1efbbbd1f3d400aa4195138cc9befca WHIRLPOOL ddae148c62f7633ef25d2fad5f653037049934e5c6d55332db5c0ecb32c0b2fcc53ae5cff59bd35152cacd7d66f2bf4382c8ad94dc180723b37dc05f288ec564 -MISC ChangeLog 8020 SHA256 8fbe6421ff817bd929fc57ade8a7f7de3bc2dc8db4f726f6b69db32cafe14bd7 SHA512 170bdcf46129689e79ee36c6fc9bb01ee86c441e71aba441fbdf8eb4387fc2531061776a37078edb097cd7b4b00b48e6845a9c80b508a83107f6d13999873eb7 WHIRLPOOL fc7f208e5ad50b28de2197e6b0cea1412d8a1aab0310554af0e4cd06724ef0433077d48e2997582d9b181a6a4d9b11963617b929f422a215c0635e7b7ce69e1f +EBUILD python-3.3.0.ebuild 8378 SHA256 24e0fa8d126604219e51fd0d382afc2368e74b65a07fbfc74c5064a81f10e272 SHA512 7295edd32c5d00a2ceb24876a1060dbc8afde56fa343f4cd92976ea74af9a13f8ecd4ac63c1e60143bf95b932b2b658dba792d78325858281e996b7e2dfac155 WHIRLPOOL 16221170ff41aa94607d1260ef956ae09fe48392b3692208d6dd1fb25e11353a7364cb9835e4b856a88db1789a8cac6aa88a314a87b966d39a095a6f5d0506bd +MISC ChangeLog 8173 SHA256 911a5b20c7a64c747bc8a720c782d446dc15e506c1d55064697b70f08c90afa2 SHA512 c8173cfe4b0f4cb7e0e6421f5a64d676c5323a2039b5072f6814fa087af3bd7f6fc0925357b08c41f57f3a8acbb4604c0906d1937b0ae04fe8e82bd572a11f14 WHIRLPOOL 81be3a8e3fc5b741890ac9777850db306ef206497962290b6e2ca3078d05e99a330776fc3596fc59e936269d14551fe9048de063b58ced44eb83dd43176588c6 MISC ChangeLog-2011 100599 SHA256 23129cb47321b2a6b1cb9323f1815d0cd11d6f30c3893908ed51575c270a0cc8 SHA512 4181ba9d965139ba58218da5b960c87b7a611b27606a1ab1ce1b4c3c9255b4e0e2947307cbfffc531f0f8b6b545ee11e083fcb29dc7b2b7ba31c6bb40b8ab128 WHIRLPOOL 4ceebb6a6ed58b906d3a7331795748ac6e4fe2e1401bcccae9024a8e81e2c444aebc5fec610398cfe6002354ad3b10487484598da5091867874727f07e239c56 MISC metadata.xml 661 SHA256 2c6c3407251f7ccd6501dee49494e539a9544f2fbae99a4373eefdf4e83e8908 SHA512 871989a29417ce20d95da950fa385f1a958139de7b1567beb9cda28a1217901243cd9d25235fe3c7b0e43a82176d72286e31e4e97310b26488d2a3252ef3a8a0 WHIRLPOOL b694b1b4270ba15640d04a3b0b26a08575ea4afc9be256717f7f3b1768d75da9f71ceca6afd2f69971906227d5ba42263d2df2fc9387441aa240222d39fd094e -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQIcBAEBCAAGBQJQY8M+AAoJEA/daC2XTKcqSJwP/AnHkfvlvRrIYEiUZmBR4dfs -PaUrURL2CBLwCeuJpGr68WdH9Blx9ZDZ4LZFGcWm3KcWwCD2L+nc/z7qupMhL5yM -ZiamOQig6ocGlAXAZ3MWU6gAYDr8VHGOdiWdHxVM7iuuyU9fJUndpA8IcdXuLaZ5 -VNoj6Dr4qKzQ1u1OoADr0WnehM4c5XxwKRvFCcIBJA/VVJ8o99sDtEYAxJh9WljN -qkrc/kOkFsrSgV2Y7Sj+oKtT3eKOYv2l717UojqReLNEgO4GTycsyrYFujNuB3bp -yInRlF7htrbLM6ZXsyLsawCPjk/ZUvTLv7O5uvvNnZ5FDZWEOrAMh6DUnEFaQj8j -4OkgbuphZzh9BqeijakdO6YttjA1roVswYYZXEkmhZWGzT55oZBeWrDcxdKbTj/B -x2gYT9qejiicQLemlx+DwkED4yaM0+JkroMrtuO50Ec2AAZb9bMhW6BUqfFgvXcE -kGGiEupbV/0jNa6oy8HkRMPEuIeq8XcKI3Esy8RXxW97EoWlftInlNT/0jnxLOTI -uD7ZqlnfPMLEYa5tcugdG8qSqEjnVXY+6mhIM1uSJFEk/SGPiKfSR2mwNvQ9JIB5 -m4g1+YTWtxb/liA7kAy4XzK/jy/bejpLOodiWYgKFXQ4YNYCZ1WGw5DpMF+0ffuH -gfWB60tMBAlxSasOfv6B -=1tky +iEYEAREIAAYFAlBoYw4ACgkQxeMuLWsGW/sYCwCfQGGqyafTyX+PRvXS3RHsWfgk +ozoAoLwIRCQBnMDhOrtH08D5FnjTalKf +=ixbX -----END PGP SIGNATURE----- diff --git a/dev-lang/python/python-3.3.0.ebuild b/dev-lang/python/python-3.3.0.ebuild new file mode 100644 index 000000000000..f89ec00380ba --- /dev/null +++ b/dev-lang/python/python-3.3.0.ebuild @@ -0,0 +1,292 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.3.0.ebuild,v 1.1 2012/09/30 15:18:29 djc Exp $ + +EAPI="3" +WANT_AUTOMAKE="none" +WANT_LIBTOOL="none" + +inherit autotools eutils flag-o-matic multilib pax-utils python toolchain-funcs + +MY_P="Python-${PV}" +PATCHSET_REVISION="0" + +DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language." +HOMEPAGE="http://www.python.org/" +SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz + mirror://gentoo/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.bz2" + +LICENSE="PSF-2" +SLOT="3.2" +PYTHON_ABI="${SLOT}" +KEYWORDS="" +IUSE="build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" + +RDEPEND="app-arch/bzip2 + >=sys-libs/zlib-1.1.3 + virtual/libffi + virtual/libintl + !build? ( + gdbm? ( sys-libs/gdbm[berkdb] ) + ncurses? ( + >=sys-libs/ncurses-5.2 + readline? ( >=sys-libs/readline-4.1 ) + ) + sqlite? ( >=dev-db/sqlite-3.3.8:3[extensions] ) + ssl? ( dev-libs/openssl ) + tk? ( + >=dev-lang/tk-8.0 + dev-tcltk/blt + ) + xml? ( >=dev-libs/expat-2.1 ) + )" +DEPEND="${RDEPEND} + virtual/pkgconfig + >=sys-devel/autoconf-2.65 + !sys-devel/gcc[libffi]" +RDEPEND+=" !build? ( app-misc/mime-types ) + doc? ( dev-python/python-docs:${SLOT} )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + # Ensure that internal copies of expat, libffi and zlib are not used. + rm -fr Modules/expat + rm -fr Modules/_ctypes/libffi* + rm -fr Modules/zlib + + local excluded_patches + if ! tc-is-cross-compiler; then + excluded_patches="*_all_crosscompile.patch" + fi + + EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" \ + epatch "${WORKDIR}/${PV}-${PATCHSET_REVISION}" + + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + Lib/distutils/command/install.py \ + Lib/distutils/sysconfig.py \ + Lib/site.py \ + Lib/sysconfig.py \ + Lib/test/test_site.py \ + Makefile.pre.in \ + Modules/Setup.dist \ + Modules/getpath.c \ + setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" + + # Disable ABI flags. + sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed" + + eautoconf + eautoheader +} + +src_configure() { + if use build; then + # Disable extraneous modules with extra dependencies. + export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" + export PYTHON_DISABLE_SSL="1" + else + local disable + use gdbm || disable+=" gdbm" + use ncurses || disable+=" _curses _curses_panel" + use readline || disable+=" readline" + use sqlite || disable+=" _sqlite3" + use ssl || export PYTHON_DISABLE_SSL="1" + use tk || disable+=" _tkinter" + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. + export PYTHON_DISABLE_MODULES="${disable}" + + if ! use xml; then + ewarn "You have configured Python without XML support." + ewarn "This is NOT a recommended configuration as you" + ewarn "may face problems parsing any XML documents." + fi + fi + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + if [[ "$(gcc-major-version)" -ge 4 ]]; then + append-flags -fwrapv + fi + + filter-flags -malign-double + + [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC + + # https://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flagq -O3; then + is-flagq -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + if tc-is-cross-compiler; then + OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \ + ./configure --{build,host}=${CBUILD} || die "cross-configure failed" + emake python Parser/pgen || die "cross-make failed" + mv python hostpython + mv Parser/pgen Parser/hostpgen + make distclean + sed -i \ + -e "/^HOSTPYTHON/s:=.*:=./hostpython:" \ + -e "/^HOSTPGEN/s:=.*:=./Parser/hostpgen:" \ + Makefile.pre.in || die "sed failed" + fi + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + tc-export CXX + # The configure script fails to use pkg-config correctly. + # http://bugs.python.org/issue15506 + export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) + + # Set LDFLAGS so we link modules with -lpython3.2 correctly. + # Needed on FreeBSD unless Python 3.2 is already installed. + # Please query BSD team before removing this! + append-ldflags "-L." + + local dbmliborder + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + OPT="" econf \ + --with-fpectl \ + --enable-shared \ + $(use_enable ipv6) \ + $(use_with threads) \ + $(use_with wide-unicode) \ + --infodir='${prefix}/share/info' \ + --mandir='${prefix}/share/man' \ + --with-computed-gotos \ + --with-dbmliborder="${dbmliborder}" \ + --with-libc="" \ + --enable-loadable-sqlite-extensions \ + --with-system-expat \ + --with-system-ffi +} + +src_compile() { + emake CPPFLAGS="" CFLAGS="" LDFLAGS="" || die "emake failed" + + # Work around bug 329499. See also bug 413751. + pax-mark m python +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # Byte compiling should be enabled here. + # Otherwise test_import fails. + python_enable_pyc + + # Skip failing tests. + local skipped_tests="gdb" + + for test in ${skipped_tests}; do + mv Lib/test/test_${test}.py "${T}" + done + + # Rerun failed tests in verbose mode (regrtest -w). + emake test EXTRATESTOPTS="-w" CPPFLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty + local result="$?" + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" Lib/test + done + + elog "The following tests have been skipped:" + for test in ${skipped_tests}; do + elog "test_${test}.py" + done + + elog "If you would like to run them, you may:" + elog "cd '${EPREFIX}$(python_get_libdir)/test'" + elog "and run the tests separately." + + python_disable_pyc + + if [[ "${result}" -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + emake DESTDIR="${D}" altinstall || die "emake altinstall failed" + python_clean_installation_image -q + + sed \ + -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ + -e "s/\(PY_LDFLAGS=\).*/\1/" \ + -i "${ED}$(python_get_libdir)/config-${SLOT}/Makefile" || die "sed failed" + + mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}" + + # Fix collisions between different slots of Python. + rm -f "${ED}usr/$(get_libdir)/libpython3.so" + + if use build; then + rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,sqlite3,test,tkinter} + else + use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/test" + use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} + use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,tkinter,test/test_tk*} + fi + + use threads || rm -fr "${ED}$(python_get_libdir)/multiprocessing" + use wininst || rm -f "${ED}$(python_get_libdir)/distutils/command/"wininst-*.exe + + dodoc Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed" + + if use examples; then + insinto /usr/share/doc/${PF}/examples + find Tools -name __pycache__ -print0 | xargs -0 rm -fr + doins -r Tools || die "doins failed" + fi + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed" + newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed" + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${SLOT}:" \ + -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" +} + +pkg_preinst() { + if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then + python_updater_warning="1" + fi +} + +eselect_python_update() { + if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then + eselect python update + fi + + if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then + eselect python update --python${PV%%.*} + fi +} + +pkg_postinst() { + eselect_python_update + + python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir) + + if [[ "${python_updater_warning}" == "1" ]]; then + ewarn "You have just upgraded from an older version of Python." + ewarn "You should switch active version of Python ${PV%%.*} and run" + ewarn "'python-updater [options]' to rebuild Python modules." + fi +} + +pkg_postrm() { + eselect_python_update + + python_mod_cleanup $(python_get_libdir) +} |