diff options
author | Mike Gilbert <floppym@gentoo.org> | 2015-03-03 03:11:48 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2015-03-03 03:11:48 +0000 |
commit | fdaafe7976b9abf8f1678197a64fb84fe43ceed4 (patch) | |
tree | 696ba2840c26bd2010de1ae1f070f3c0b88aa6ab /dev-lang/python | |
parent | Ensure new enough Net::SSH::AuthorizedKeysFile is brought in. (diff) | |
download | historical-fdaafe7976b9abf8f1678197a64fb84fe43ceed4.tar.gz historical-fdaafe7976b9abf8f1678197a64fb84fe43ceed4.tar.bz2 historical-fdaafe7976b9abf8f1678197a64fb84fe43ceed4.zip |
Version bump.
Package-Manager: portage-2.2.17/cvs/Linux x86_64
Manifest-Sign-Key: 0x0BBEEA1FEA4843A4
Diffstat (limited to 'dev-lang/python')
-rw-r--r-- | dev-lang/python/ChangeLog | 7 | ||||
-rw-r--r-- | dev-lang/python/Manifest | 21 | ||||
-rw-r--r-- | dev-lang/python/python-3.4.3.ebuild | 317 |
3 files changed, 330 insertions, 15 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog index d29c3adcf0ad..62fa15861bfb 100644 --- a/dev-lang/python/ChangeLog +++ b/dev-lang/python/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-lang/python # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.813 2015/02/09 15:33:48 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.814 2015/03/03 03:11:42 floppym Exp $ + +*python-3.4.3 (03 Mar 2015) + + 03 Mar 2015; Mike Gilbert <floppym@gentoo.org> +python-3.4.3.ebuild: + Version bump. 09 Feb 2015; Mike Frysinger <vapier@gentoo.org> python-2.7.9-r1.ebuild, python-3.4.1.ebuild: diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 621cc170c9a0..b65cf88b14ef 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -24,6 +24,7 @@ DIST Python-3.3.5.tar.xz 12116308 SHA256 abe99b484434503d8b23be0f243ec27139e743a DIST Python-3.4.0.tar.xz 14084912 SHA256 f13686c0a2d45e7146759e9d5d1cbd8097a0606483c0cf7730e1e13f58b14cbe SHA512 4fd4d3352e3b64ef8017ba083a2d894b99e89882581bcf30cdb218578f0f384aa6efc89211ffe44f5bb3d783c79763e26823242d27382fd05900099dd966ca31 WHIRLPOOL 82a1bb14a7683e2bce32221792923f334b61fabc75b0b293b0ecc0d810c8a4bebf05b75a061d85dd6612a8ca699c9b4f358e2aef5d14706aad1c18f42c9b8d55 DIST Python-3.4.1.tar.xz 14125788 SHA256 c595a163104399041fcbe1c5c04db4c1da94f917b82ce89e8944c8edff7aedc4 SHA512 09b6390c07334974f189fb1c90bc2310898aef76661b1cecaa2b4d50001fa3df0fa0c63d3471a5a0dc7f9e08dd559d38d3bc45a6c05a816d8b2ed6b2a20e5fa9 WHIRLPOOL c8f879bb5d42a759b0804aa58d90330d9be6f4c29652ec40f07ca7da31510eadbd6b4eceb2b213af9a1af031c8321fc25faccae77763a31814eb0569831b8bfd DIST Python-3.4.2.tar.xz 14223804 SHA256 1c6d9682d145c056537e477bbfa060ce727f9edd38df1827e0f970dcf04b2def SHA512 12de5309cfaf91f5292efd660b5abe31581b902fdcc302317b597ffa74c9f5ec14ec1dd55994bcccd50d40473ae344ae19bf917ccfb8ab4906c8777d6ea95b17 WHIRLPOOL 358a2ca605676a7b6decf7cc9edfcf5edd6e15eb7b08e48fbf5f78422d3470a1233830867e3986a6bd564e105726298d3664ad04b90a233f90a46d6b81d8d60f +DIST Python-3.4.3.tar.xz 14421964 SHA256 b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8 SHA512 55b2d7c07da8ad3a3971b4687da2e45809c6f1474732e93b0432f121f287d0b63ad8a9bf381987ea70f47a03d9474c3e55b7d86d14800bf7ef29b3324d8d35b9 WHIRLPOOL f851dedc6a1ea35adec83d60784a5fbcd9dfcf6aa8858bb5ada114fa2ff55add1fbf323ab94ec039ecdedb26d59e8f2e6e171cd9fc1ed41ad9cfa434a555cff3 DIST python-gentoo-patches-2.7.9-0.tar.xz 14020 SHA256 d1ae164ab14e265ff63d6a724e0c2b5519bdb790fe8b7796c2124a30cecc8ef8 SHA512 83aa867ce562ff3acf970a4b3ecf7132f34aca1ecf286b90575a20e6e044600b98ff1d7f1a7ee613d4429a6a71cfe8beaff144b64b6beb456ea8691ca00937b0 WHIRLPOOL 5b4f7bd2dcec3a45e12fe5baf1c196faf2b754376a6bccb555dd12a1af28a202d51a0d956e4450ff2f334df13b296ee27b36aa967cb179925c386cd58389050b DIST python-gentoo-patches-2.7.9-1.tar.xz 12872 SHA256 9d912c55db56b5bfe054a6164614969fc9605f48f2ffec8770941f798a16470a SHA512 cbbae0faa246516361cd39e55d841660471931bb26cae8396a7d3929c9f4b4a3d8d5a76f7fa295deeb6335c26ed95aab18399e34c2603a582743b6e760f2b280 WHIRLPOOL 422ace8a204481458acd9cfd3b3b85e4b02fb2fe656c8ef8473a76444d5a1b54cd9d690e0009904f8c251697f60105769ce6a97c26224548476c0ece6595e484 DIST python-gentoo-patches-3.2.5-1.tar.xz 14628 SHA256 0acc5531421781ab7f30e6fc8a502f202b79aa285b4f411eb16ea0a9e6d958c1 SHA512 1abbd53e92466d258802717309e1839ae931b8a4b0a5a27d4d0da748e71cf96ac47c6837bdbae5dd6921a46cee339c178f86ff3108afe95e6a0a42c4f4300791 WHIRLPOOL de003cccb8b311413889713d66b7987f28a1f906cc9642621d1fd2a379ceae4f0f901c137503d808dc3da7295ac611de09781bf8661cdbcd14c1d7c94ba489c2 @@ -31,6 +32,7 @@ DIST python-gentoo-patches-3.3.5-0.tar.xz 12892 SHA256 a7240de9598033cb40f8f273d DIST python-gentoo-patches-3.4.0-0.tar.xz 12900 SHA256 5e5ca54eaf446c7dde4155e5d792df5229c7790b32abb5aca38cbc4fc30f9c45 SHA512 be9851f9062f6aebbd2f23d91a4038dad1a8757049745ccbb1cc618ff6bc3dfab0326d520d27678541f4421e5db41d64f632fe6fb3e80f2cf4e73dadd3d5620b WHIRLPOOL df998b5588c928ca506f9f4434093a1f60637206f03f5e067444531dae02168f88b22c8de7d58e745bdb9d85e17abd667ed51f7f5651779c2c94da98f0925679 DIST python-gentoo-patches-3.4.1-0.tar.xz 11164 SHA256 7d88e40ed02bef2d26802516fc0138a28cca58e298204e6b1a32054f9224fcb6 SHA512 5ecdf6a1ccb8d12b5b7436e1b7f641a41afcd7fde573e9249e3dc0d438bacb1eb6a5255e149388194dbfd2951fee4f8c800199362dfd072ff96776bbbcad0bbe WHIRLPOOL 707f943f9af7c3fc6deed7cfca5a4198f65a34434893840ba8e4f4c2a3d055e8f927069cb8855b5fe20dff643b7e2d41f35f65e1f3f300e350c0f291b4df6bc2 DIST python-gentoo-patches-3.4.2-0.tar.xz 11568 SHA256 86028c50ecb16fdbaae68662d9749f8c5dbbad6359423ed02c7b379d4aaeb7e3 SHA512 786d74df8ca168655f38d052a3e79541fd1d9f58845f8fdc296246208f8ddc61e5a0d95d675432fcac77dda7c0ab419162790d0e39337bce2fb5c5d3f23c9ef4 WHIRLPOOL 5b26c7d5facd93ca334f23057e26e3a2af71d9d590ab270d4619bb57e0d14bc6465c08ea34c53e1ccf347f5938fd0199a0edf2ddada3c3a891a5568f1eb81227 +DIST python-gentoo-patches-3.4.3-0.tar.xz 11736 SHA256 917a9d98d40a91379c81ea57922a8632ba3c6f6db6f304ed6262bc88c5044946 SHA512 7ad1b30cf8bb7900fe518ed71e4ee55dd92ce7e23ae583a1f2f851b26cfa8c4f4271d28f418e780f3725a48d4ca8eeb8fd083f850810c66c29fb08c430828d72 WHIRLPOOL 074e8c0055b49a028eebda21d1acfb8a25ec968eb8b350c2bed37e042f9f354871e413db13e0ef2fe41d7e56d647178a7b3622019f36c4819c2c68f088366eb1 EBUILD python-2.7.9-r1.ebuild 10533 SHA256 45a880fb6c5586631488af628eec445a1b472a5fd703d0fb269ffd676b9f7a14 SHA512 0ec467ce3ad7e6f89a05f1a5fb1d279ce7e11d3a24346d836aeb8158cfebea47d64135e49ef8c39de96f6c14e6ed1cd9c2f04ba6bd44cb410f0b9ea6c3bab505 WHIRLPOOL 2226d8fd038ca6b943a5f3e1cc3402450de57cf97589753ab4e9b55c57a14f8f571c50015fa73f7361e13cdc4347f21d739f089ba82c8b3dba28aa8d72c2c28e EBUILD python-2.7.9-r2.ebuild 10547 SHA256 8589e7e9018e5406d71ebee41ee18f7adea3566fa22291acd45c36d9b8b09dea SHA512 67bd50ec5f6c7664c8656c7e1dbd40ce10fd4dcfe1f57223e7e81fcd3aacff1f5e68efa0fa3e047bde3ed0f7f96e21c7532432a11012ead2fc6d22067fa4f82b WHIRLPOOL aa05e58579f1645ddc8ab37072ba805597cc11e42d5364565b0f5b977a304ca976acfda27b28855effc386a3c42fde19042dddbbb9ac103d2243c5f037d557eb EBUILD python-3.2.5-r6.ebuild 11464 SHA256 1b4cca8c0d41fd10dc1e9fa685e6a2a5e1f829dd217f2b5e9384ac111b12f088 SHA512 ff1af6153b38bc8483b2a76d51b97d3ea080c9cd2dac31e20c50144ac0f5dcadc603991fee625623b7e819e0cb23e2504bfbea480165fa936c94e0aa4f6a0a8a WHIRLPOOL 3ea4ec2d7a8d8b3513f48a040a301d8343665a51f233769ca4b841134e9ba909132d566e39b02465b3b7869f3be7a50a267aa7b675a7da81de0cd7bc66e9b7a6 @@ -38,23 +40,14 @@ EBUILD python-3.3.5-r1.ebuild 9523 SHA256 27d6d0444e6b948b49e5438f53aaa0796a9c78 EBUILD python-3.4.0.ebuild 9308 SHA256 4af07645d7b8ab88742c10332fd1e16649c25abfb38638db3060ae087c9f1876 SHA512 a6c94c99a019f9bf68f69ec3ebea041a42cd833a1a7e1fe63bcc4756cd81184e895ccd120ba2d8adfd8158428a82e660132f6e5fdab70592c19eedad9557b366 WHIRLPOOL c6bfda5a4022ee5fb901ba376299b3c809b78a40a917feea5acf29e241c70e71d3fc801ee34b2a6d187257886f7aeb5ef77213d4403ad83185763e0c8ac13ef9 EBUILD python-3.4.1.ebuild 9229 SHA256 ee86a0a51e631553ec237e5ce349d7f82e1dac74cbb5f0dabccc2a2a96a1229d SHA512 4d08dd94c38df2ada10eb865c02ff8653800ca0edac556f327abb43c7af295237848830f7bc59c1ed9cd15ca0d28e139a872a0795f081b7dc780c36a996e8e5a WHIRLPOOL 474cae5ed8ec5d8fda4f062c768db26b8079d630a779c4cef66a0e08d6cc99ca1d9fd123f4a3ce41c3d53535c50a85fe3149dbb2f9a796c6cc94b6d635ecd492 EBUILD python-3.4.2.ebuild 9242 SHA256 312fc7a668ac3a821d5c561b04be2be0b10ac8e9cbe8d6a3170f477c355cf88e SHA512 74216fc9bd79b09b763b96026dfb88fbe83716944bd7c208003fd457cec11562e79088ab5620e8e7eb9cf226fbdd1770914b023a78719554425cbfb159a92f2c WHIRLPOOL e2a3910e38d75a29732a039dfe6d0d6a1ac850f391e580bcab24782665027ce51b82ac55483c8e3d16f2871b4beadd79c0c486f48ca01c6389efc777c1ad1f72 -MISC ChangeLog 39578 SHA256 1158db72b870f71236d5b441b137701c8c6d5478aeda9c64d4a99b7d8c69406a SHA512 3130e34e4b4c7aaac352f27bae56f2f7e748dffab9f223612148555d36f25738fbf1081c20839dc51ce04b879b97206d1adbf74f2b1ef60fc15a5935409fc16f WHIRLPOOL 8391af1fc4e67b51f910a8c4a3e7b52b65d36766e75c18226ebc5d8c834eacb12b80ab963dddb1bd7ba3c4927f532cbfd43d889d1f998db2e4448207f256fd7a +EBUILD python-3.4.3.ebuild 9210 SHA256 73a93227271c063be98ac8650c38d949b49ce0de958bcc5b65c264d1516ce9e5 SHA512 2a767181638420456f9e373c57ebf12380a024020f271ff66e1f133ee131f60a158f51763906b2a4223d478fca8d7f2c51e85216d3a6efd2755998c812e538b3 WHIRLPOOL f2a6f0e0f1b49c39b374a057cfb0f20de78eb639892d576d99ed1f0423db16b9e32d0c64af734fb06dc6a72493f721248f3ab77cb1082bb0cff14fa2afe38bb0 +MISC ChangeLog 39696 SHA256 ba5cf6310194c4068b63372ff879afe16074c75289d02cbafd856ec28b9a57ae SHA512 3af52ddd200e66b06629c5382b83ae9fb2790c17b891271ff9ed648c9826ce4a73d15a865298e59a26802bf3bdb2cf9c8e4296ff5302aefc036ed28738494b8d WHIRLPOOL 7771c82aa228aef39db8f31d48a87488fcd4647bbe4694c3b17d19a558b96fe6b8f98aac59369193e6ad31c291c45979762863d50b784a77ea2fc07abda268be 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 -iQIcBAEBCAAGBQJU2NNdAAoJEPGu1DbS6WIASwkP/AwAwXxWzvSGwEkS3mc6FwRY -15fP46qaTIYaCVB1RPfrupGVmFZ9EsfICcUauzJ9I6xLUfr4uKErumFoxpPf9XyY -uOwiEX5jF5hRdYkBhm7FHqlbomAv3i18vjXbPcEhfGzNTa2V038zoGRvrexK7cS9 -+3X8ibC0qROUrO22cmlH8Joz0FZ/azPRCX682CV5o7lBP4NEWapFOA6Ti4T8g5D4 -L/5oa7FaWXsTl8oheBPfx2IveMvU+QSPqheItNKRPgcswdK4xL4CWKxkKiycI8sG -DeYRsFw6oU42+1ocUHWmm2LAVJl/mptEUiCi97j40ebnawDkEE2pjqUmCa/a4MFH -uSf7DIzYzzftJtCqGaMMlME8e3wK1v7rczJ38xWT6TOGSRxrswibGNUvBg22VU/w -tMQOtTN/603x1UBzxPTU9oA2Xq9gs028UlUhKhkDcyy2n0Z2DC2v8JTT5hagIuFR -DaXT9FNGnZQZ75+x5x1Ze6e/yuSar/mLqA9wary3CQQ7CdpO/AGEEeMnotxmYzg/ -WzZnUPjvDhkdsT8SrdMc9ynsGEoEUuXQVSMAWbEEczQ8JegRrx5Cg/NXqb671Uec -+a8fBy9/YKGSerx9nLfor+J4Y8rt1IeqTYrWuQEw2mRUmW+OyUO6KkcTn1ttt2mt -53zEb5BwIWIXIqIr0g93 -=K2kU +iF4EAREIAAYFAlT1JnMACgkQC77qH+pIQ6TwUwEAyV/89uwzWVxIZyHs+iDhs/x7 +Tq7mmMo6Vdvoagx3uV0BAJJAcuWu+dJnAHBeyjmAFtFrIRW/N5ZzwA+HbHDvWiVH +=M9Io -----END PGP SIGNATURE----- diff --git a/dev-lang/python/python-3.4.3.ebuild b/dev-lang/python/python-3.4.3.ebuild new file mode 100644 index 000000000000..11fbd7d5a1c3 --- /dev/null +++ b/dev-lang/python/python-3.4.3.ebuild @@ -0,0 +1,317 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.4.3.ebuild,v 1.1 2015/03/03 03:11:42 floppym Exp $ + +EAPI="4" +WANT_LIBTOOL="none" + +inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing + +MY_P="Python-${PV/_/}" +PATCHSET_VERSION="3.4.3-0" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE="http://www.python.org/" +SRC_URI="http://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz + http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" + +LICENSE="PSF-2" +SLOT="3.4" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="build elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk wininst +xml" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND="app-arch/bzip2 + app-arch/xz-utils + >=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 ) + ssl? ( dev-libs/openssl ) + tk? ( + >=dev-lang/tk-8.0 + dev-tcltk/blt + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1 ) + ) + !!<sys-apps/sandbox-2.6-r1" +DEPEND="${RDEPEND} + virtual/pkgconfig + >=sys-devel/autoconf-2.65 + !sys-devel/gcc[libffi]" +RDEPEND+=" !build? ( app-misc/mime-types )" +PDEPEND="app-admin/eselect-python + app-admin/python-updater" + +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 + + if tc-is-cross-compiler; then + # Invokes BUILDPYTHON, which is built for the host arch + local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" + fi + + EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" + + 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" + + epatch_user + + eautoreconf +} + +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 + + # 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 + + BUILD_DIR="${WORKDIR}/${CHOST}" + mkdir -p "${BUILD_DIR}" || die + cd "${BUILD_DIR}" || die + + ECONF_SOURCE="${S}" OPT="" \ + econf \ + --with-fpectl \ + --enable-shared \ + $(use_enable ipv6) \ + $(use_with threads) \ + --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 \ + --without-ensurepip + + if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi +} + +src_compile() { + # Avoid invoking pgen for cross-compiles. + touch Include/graminit.h Python/graminit.c || die + + cd "${BUILD_DIR}" || die + emake CPPFLAGS="" CFLAGS="" LDFLAGS="" + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax_kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + cd "${BUILD_DIR}" || die + + # Skip failing tests. + local skipped_tests="gdb" + + for test in ${skipped_tests}; do + mv "${S}"/Lib/test/test_${test}.py "${T}" + done + + local -x PYTHONDONTWRITEBYTECODE= + emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local result=$? + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" "${S}"/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}/usr/$(get_libdir)/python${SLOT}/test'" + elog "and run the tests separately." + + if [[ ${result} -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + local libdir=${ED}/usr/$(get_libdir)/python${SLOT} + + cd "${BUILD_DIR}" || die + + emake DESTDIR="${D}" altinstall + + sed \ + -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ + -e "s/\(PY_LDFLAGS=\).*/\1/" \ + -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed" + + # Backwards compat with Gentoo divergence. + dosym python${SLOT}-config /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}" "${libdir}/"{idlelib,sqlite3,test,tkinter} + else + use elibc_uclibc && rm -fr "${libdir}/test" + use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} + use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*} + fi + + use threads || rm -fr "${libdir}/multiprocessing" + use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe + + dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + insinto /usr/share/doc/${PF}/examples + find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr + doins -r "${S}"/Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} + newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} + 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" + + # for python-exec + python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR + + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py + python_domodule epython.py +} + +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 + + if [[ "${python_updater_warning}" == "1" ]]; then + ewarn "You have just upgraded from an older version of Python." + ewarn + ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." + fi +} + +pkg_postrm() { + eselect_python_update +} |