summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-06-16 13:11:53 +0200
committerMichał Górny <mgorny@gentoo.org>2021-06-16 13:14:24 +0200
commit76a84888fe2930dd74363799743fc170e927a3b0 (patch)
treea932d5d1f349b2e04e3079ce40d0f1eb6a83a61b /dev-lang/python
parentdev-python/python-docs: Remove old (diff)
downloadgentoo-76a84888fe2930dd74363799743fc170e927a3b0.tar.gz
gentoo-76a84888fe2930dd74363799743fc170e927a3b0.tar.bz2
gentoo-76a84888fe2930dd74363799743fc170e927a3b0.zip
dev-lang/python: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/Manifest18
-rw-r--r--dev-lang/python/python-2.7.18_p9.ebuild355
-rw-r--r--dev-lang/python/python-3.10.0_beta1.ebuild347
-rw-r--r--dev-lang/python/python-3.6.13_p3.ebuild338
-rw-r--r--dev-lang/python/python-3.6.13_p4.ebuild338
-rw-r--r--dev-lang/python/python-3.7.10_p3.ebuild330
-rw-r--r--dev-lang/python/python-3.7.10_p4.ebuild330
-rw-r--r--dev-lang/python/python-3.8.10.ebuild336
-rw-r--r--dev-lang/python/python-3.8.10_p1.ebuild336
-rw-r--r--dev-lang/python/python-3.8.9_p2.ebuild336
-rw-r--r--dev-lang/python/python-3.9.4_p1.ebuild345
-rw-r--r--dev-lang/python/python-3.9.5.ebuild345
-rw-r--r--dev-lang/python/python-3.9.5_p1.ebuild345
13 files changed, 0 insertions, 4099 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 79ad587f404c..18c7bd8afc1f 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,7 +1,5 @@
DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381998256a1a002d316b38288349884d5960de35c49352d03129ed0bae599e641ec2225898158ebce50a7a2fd74d2c SHA512 a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c
DIST Python-2.7.18.tar.xz.asc 833 BLAKE2B 1d98770e46171971fb99994508d238c01d2755281d2f94353314014d9e83e0ec5f0b3e3950ea1fdf5fce9ba6b8f55312355845c2a3fc4291c27ee56fe6215448 SHA512 c2a5f5a52f47dec52460ad3275758d4e5de6e7075c3def4353c988d74d563a39b42cae2d5eb24e2a23a6247cef69100f91620b11a49c2359fbf99b203c9cbda8
-DIST Python-3.10.0b1.tar.xz 18545252 BLAKE2B e078e3a29d874949d49447b5c176873091b7eb82e1b46cabdc13ba815e97f0f0d5a75bd25af0b3e874503c155e29583c78262ffa446f25f0db098be345f5cbfa SHA512 b8366f1fd92690bf78dc8ce07724d1b79a8c7f246e9a13ba3043687c5553b52d4d7baf48bf96f9fe088de73baef1df2131e2704ffed9a7549890723a7898c4c5
-DIST Python-3.10.0b1.tar.xz.asc 833 BLAKE2B 70f15521ac3e117709b4ff7583563893612c5ee72c05071e056010ee3b654b9e7e97c4044d377e439328947ffdedc2e4689f00466d97092bc95851b72941239c SHA512 7e22dd9ddf37d0c2116cfb9f08050f0909ccc04f1a63e67b96f0cec743845c492659a661af518fd76d513fa36d08da11fe3a1166ede31de583369b4c3389de57
DIST Python-3.10.0b2.tar.xz 18651420 BLAKE2B 6433723e789c04cfe09e7b966b1d5ad1687bf28674d83145a99ab6c1ce3f75beb25a4ef3da1b096cb48e0f34409e7c86e9922f16feb09f4eaa3e0ae5d43b3fbd SHA512 ace86ef11608fbb016d0b8efc7d20cccede4663cd09f07a07e067530537b1e4989379a6c18e7aa9b86b87b108d65efedc39eaf946d27df6ea474a829c763ebdd
DIST Python-3.10.0b2.tar.xz.asc 833 BLAKE2B 7fe4061350b27e0d0dd466cc80804a56126620649b4753cfe0ed1fc3a292aad30ab07f177f5bf893cd51112b6a54232a64b30d2bc2f8f66a9c2621efce3ae6da SHA512 9a84ab98a5215f13302c7a983e9224096d15c07d9a7899b28daff49405c46efdf7770263ca57e6e0f85ce1cbc0cafec373baf1675ade6ddb0eb268e99753907d
DIST Python-3.6.13.tar.xz 17213520 BLAKE2B 7c1938f92616d428d107a70397a9f7fc82377d0e3d26c2da4f5bcb79a54115f71498a5e7b5f601b6cff6f362ec1f689c3ac920eb248956e1e4f6c21602514dd1 SHA512 0482b3e7eea22b0635b61f06753e77c832c9431385c5ea1ecb8f60868262afd2b45c239badb8e906a33f035ffbf347b4a499fe6f0f008f1fa9ecc9de66c63947
@@ -10,27 +8,11 @@ DIST Python-3.7.10.tar.xz 17392580 BLAKE2B b030db731d141b97f1be794a19382cc252c5b
DIST Python-3.7.10.tar.xz.asc 833 BLAKE2B a528daa1638b52f08fd69d197a2d4f8af59a620939957d450da6f5f8947b8eefbfb48ee50bb6327c8f3a352415dedc6e91ef23075fabbfd38c65575857065c74 SHA512 5d0fdcf60f0f4113b3055dd4097814b8b969d6cba4f2cc4cef6cd013b0e728375549b9d7818e6e94e6f0d4888188e751f4659a18f905e6e4c75783e2f323c4ef
DIST Python-3.8.10.tar.xz 18433456 BLAKE2B 57318da9ca049559594911a8873141f89d40c0326f8f278ef47b64195a0d51400f24f91dc68633d628f99dc0a9e280565ff830df66801afbc8734593d0fc3162 SHA512 0be69705483ff9692e12048a96180e586f9d84c8d53066629f7fb2389585eb75c0f3506bb8182936e322508f58b71f4d8c6dfebbab9049b31b49da11d3b98e80
DIST Python-3.8.10.tar.xz.asc 833 BLAKE2B ab1ea0d26f51bc3b88ef5130238f7695bd12383193d1f312b000e997e48beb63f75787a3545b7b635ef515e4896e6ec2994cce564126f3b698495a51f5e34038 SHA512 ebc363df372031aba9c547b4929c98e5065ecf53604897a83df134dfbf7c3f3e9e0de1c072bee2e7c2f4db0f90610fa3931ed6d5a5ed877ab15712becd63deaf
-DIST Python-3.8.9.tar.xz 18271948 BLAKE2B 67802a8ea0f4e7f6d33abfe0efab7de9f6bdd20077541c6f76a460325c8027d9338fc630221f39193ffe1eab85e192db997c1764b2a1f876b819f42de8363299 SHA512 e7872a6767f9a8941e8fd76d384fc1a528bcee18514ad13fcb4d3d59f6075c6283e4c933a728b9ae68b9606da2f0a3ae0208e46fbefe3bd7899ced61da5dcf47
-DIST Python-3.8.9.tar.xz.asc 833 BLAKE2B f898d41768b0cbb77a25cbf08128aa773120869be004e14986d287585b1a22a412802172dbef7567b3c1998c7d7a2cfb042e36820e256133fa20848935dcb527 SHA512 2adb1acca13ff9b7fdad40efb38c0a824f98f9a5061a43e05b1813637214df1e75883f53bb7d54a3e35805ff0ea52b3b89c0ed44567f15a0ade771c79f16b2ae
-DIST Python-3.9.4.tar.xz 18900304 BLAKE2B deb69a4e821163b3cb64b6fd5b3dbd7a8ad4bb0c33fb0342b5618db569ae3f763f154e60f2d859578ac531744c3d20a1371a60540136d5360a9e2a348fb5028f SHA512 3d8a5a38de0df6edc074d141e0b4a12b79d80439e4341cd4519218aa4bb7317be2736a17058ceec43fc987fc17ea5167c19eeafbdeef732a2f1656fe2f0f0d39
-DIST Python-3.9.4.tar.xz.asc 833 BLAKE2B aa261d09200f150522ae9fb15e75f3a927ed48d19561fce9a7c8cf6a34c21e89b0f00ad2d619ec0bdb75ccf5c5881229349bb0248642ddc134711e8336ef0731 SHA512 9cf2909ebd178cea5a6dee9f6a8622ed91c33b943f1e7f7dcf0f7ae67f552e767393f833e9a4e1e62ff059fb265582d83a85dafefbb10df7ae3da0b73669d4cd
DIST Python-3.9.5.tar.xz 19058600 BLAKE2B 0072376ac69728436ee422da58c1680170cd60c76ac7d623d7a29c9001e6acace1a8d75a1805e65c9b11a30c55c9e67ed66712ec22b0b94ee6873995c935141d SHA512 7b581af1b3e73695f124ff6a3a960e22104153a5d920ca930c046f42ea313b1e7ec77e39876db2bf5d5da6d7412cb072ff8ae7814dda12c14f9da6c570fb0995
DIST Python-3.9.5.tar.xz.asc 833 BLAKE2B d044e2019edc4854db22eebda182528e88a0c4d71cc17b78e603b43191a882f176a9fa46549845ee09ff9aa56ddf69efa008cd7ae3040b24fed7956c52bb11e9 SHA512 cfee8c161447544d6f18c3490b96ce12c8df5e9b143fca09734066f3606abe767cd7b4d05315c691f41c0e565d9585456774c10770ffe2ef7983a911bbcfdb83
DIST python-gentoo-patches-2.7.18_p10.tar.xz 30436 BLAKE2B 24610a09037ce43a4cdb9a97e44e731fbf5215a63c55bacba8bb00c543bd3f482657fde6ed4b739bf5225ba123cc9960c8c842e4742e0769ee7554c23129f85b SHA512 f2b6b0cfb452c32bea07894b9365941545539aa240cb97660930578d8f1ae1744eb137c1c46b1ece4d1a874dded98395049145d3d5ee473bd1c67bc1dd92311c
-DIST python-gentoo-patches-2.7.18_p9.tar.xz 30188 BLAKE2B 4f9f80e0a967a980d247b50ac3c38419e70fd2dafada4e4b5593935915b17f09aec1a88b0baac58cbc0c2fcf73eee6dbd5fa5f378a8e3e1923a0028c2c3a1f5a SHA512 874e88142570fd62437b043a2763b32667dfd9856a7cc8884f5d3c09e7a8520e1cdeb5eb5b6bbb884fbc3bfad03abb83e1c260969f4b9520ce99334cfaeb76fb
-DIST python-gentoo-patches-3.10.0b1.tar.xz 8116 BLAKE2B aba4856d2463e57187680780cf5b5ae24547413acb8c2439c03ac9a33d4908b547cc40e3d9752c6a76494d47d2b824677e28b543a2fcf8cc1913395d05327f1c SHA512 b62b3fb00a76e3eac842e45d10b3d1cafbcad20659db54e11011d9dfca70c34e28bf187fa7fcdbc4e0bdcf66efbb7f8a6eb2a8d1b28f6e8c1e639e63c203f215
DIST python-gentoo-patches-3.10.0b2.tar.xz 8124 BLAKE2B 6b707ef911c0573e6e87792b4ba1d37e5620723c7b22759c78ac20d88414390a7317546c41d867cd9decb6247c004a9df8eb25ab0999db9c7b431b03b64609e9 SHA512 9a95a1f8a6e4461107e9580e6017956ade47be90fbcd94cbb2eb83a871702308058a402c1eafc8e0d54c2a1910b9030edd9f71b051e846b1219e9f7bd11274b6
-DIST python-gentoo-patches-3.6.13_p3.tar.xz 17640 BLAKE2B 255e96f61ad8adb7fdf1cc9f11ca99c8368601dfe9bab4c96adf1e77472dfdf365a6ce197ecc72b574849e2a6235063d63558711049e9e7407862871dc0f2f20 SHA512 7b9a39cd65129c495c513e1b8c259a88194b8877b891cedaa5289bedcc44dbcb5e63e3b9922ef085321e7f4db73b5a5090d30725b456491a98d7ef40b85601eb
-DIST python-gentoo-patches-3.6.13_p4.tar.xz 17896 BLAKE2B 768ed3860766b212d21718d2f83fe2852dd297aaeaa2d76d93357012513b2aa66e8ff8fc8edf7375ae10ecf0864560e7b4df168f916cba06c67e329612d404f8 SHA512 7ec640280244c7fe8e5c5b3e8c7fd396ec37b920fe1a77d99e85bef20bc335cfc0bf818c58b8f203c15ce343f50d4b8c7ab7591ecfd21380c9cb15d87ed81ca4
DIST python-gentoo-patches-3.6.13_p5.tar.xz 21940 BLAKE2B f6753f2c4383fbf0de0433040dae812f35bf550c60ac4a042c62afcff158619ebdc47d013dfa62d9b3dd446e8401ad50aaaeb212fb048a884a1c436b73b7afe2 SHA512 260d6abb2c24726fcddbe3ae828e96e315f90b6d486c11868066a25635968214a8c25a89737a9737c32ca110892a28f6b12badbeceb5e4d8d4a2a996b3ce7352
-DIST python-gentoo-patches-3.7.10_p3.tar.xz 16804 BLAKE2B 1db238e4b928332d459b5f3c36ecb7f3bc3d3b754fd82e4434c91843ef7574306aef044df9a2644749a17b14ce9fefcd3c3dd44cafaa4ace0b7dc62fb66e73c8 SHA512 61a262a05d1f8e9b08875285db989160362eec66123a15345dd16b8c1f1161aeed31b20df8f69d27ae71902ae2e678328b82e511881d9a5560932619234bbe7d
-DIST python-gentoo-patches-3.7.10_p4.tar.xz 17076 BLAKE2B 628d82f5fc24ee68b4d529ab6d2fcaf7361d55a99dccd699a2fd027e86a731e641ff1573c7639d3d513b2030f8e8629adab84c13a9dd1ba5e2a84bdb16e92c44 SHA512 856ff2e3a73d56888bc1a3b2a28e2ca284a2a40ac3df4d060616fee47e95052b535e697d1d77c58ed850da105c7accfe3093a41492e63f6642349f7a6c80a3ea
DIST python-gentoo-patches-3.7.10_p6.tar.xz 23868 BLAKE2B 3b3786030a461d06a96dbe0987d05c35215bb5e7b0b95e1337a05a311ad6f3c6db68cc7082128c56eea3eff4b98f74d213dde1f48517e07791815b73dcdcd5b8 SHA512 b817a9bc1469675c14555ce50bb004e8c1426465997a72a94859ab10df7c2a036b33b332c9e6b9f49df1addd899a37afd28fe60bf6ce90b4b21f4a28a27aca25
-DIST python-gentoo-patches-3.8.10.tar.xz 15180 BLAKE2B 1f8c57c6ed8d49c5ff42ecaaf19f470567db7fc68ed95eb44a89e9e85a542c085708207f02a1e50ebd7e6fc5e876e232ccd47f49e7653d338ec0520b7dac1a3d SHA512 65e3ec0a0fd49c0c6e96eb07c98b93ce5168e430bbfcd1e62185f6df6bd42fb1a5b5752cbe8bde93101510c0cfd37e604dde40549703b1d1c0e37d24cc327472
-DIST python-gentoo-patches-3.8.10_p1.tar.xz 15504 BLAKE2B 63bd3e4928853a80a57ff922c42c434990b38a5c1dc639a277b8dcd01dabf1e0ff745750859b2ee47d30f84afd2bece81e4ba72b89a9ec690300de42e2a5f590 SHA512 955f7647bb05572a1f77cc8a8c35b7690ae914b9b22d30da553502ccc018b4134a7b647dd088b8b75c46a6971bf64dd750e47ceb1b3b219dd58260bf7b67860f
DIST python-gentoo-patches-3.8.10_p2.tar.xz 20288 BLAKE2B 4d9db5c8d5c27673d5a026149e5678c2b4072d6d0326ae015bf4fd5b5065beeff0cd6ee0a061f79ab3258d3d156d555a38cbdca2e5e05b4405038847dcc97c8e SHA512 165a4e3b537538e792a98141a8e4af6b5cde369e6322155731ecb1b55d0e609f06208d88d68dbb1fbe59a5127ae7ac49d76d8fb6505ccf835931b2a802cd85de
-DIST python-gentoo-patches-3.8.9_p2.tar.xz 16600 BLAKE2B 895eebdfabfe9cc4a30d87255112033b506511a8def7cecb03e37b0bde350f1c4b53f06a7e8ead53218c29e2cf4866f2ddfc9d30a07e9f5c67e4c7c271c18cba SHA512 5751c4bcdd1f637f9678d3fa3455c701b2dec051e12d5a1fa6468d7745c1387fb0485672e53dc619b4244435897f21702699c64b63ad9a0422ed91edd7fb2491
-DIST python-gentoo-patches-3.9.4_p1.tar.xz 14472 BLAKE2B c8bd49c2eb77eb00377e6c6e63a2f6b1108a2c8d4eb45cc943ad2d0a2b4457e00002f90d2597032716af5268f33d24902d4634cf8e98778c1d15bf8dda5d7215 SHA512 9a12c1935be31b1663e4ab6c1f7aca51ba62ef4033600885678ce436ecab688e2df82742125b4885b1cb8da9c68140c5ca4ee1684360ac87d82c6491bce5d0a0
-DIST python-gentoo-patches-3.9.5.tar.xz 8820 BLAKE2B 177234776f00c3efa6b76fefc1ef0001225ded1dd8ba916e3dc8498a7e845467bf387ba8a4f82da713a51bff627420a084f6627218863f70e1273cce58ca7252 SHA512 37b7e25a1703184556f12202da9cba1a8e2fb1c059d75195ef2997f55948229f164642a580e33c59f5877fe36d4c62f1735f95df318b36d92c528eb98f42e55f
-DIST python-gentoo-patches-3.9.5_p1.tar.xz 9124 BLAKE2B ab2f51c2d10c679022b563efa8b2494499d8d69b7617ec5229c3af546b1a9589e8aa064e9c025e19f658a316fba4134086ac8f357de97042288ee7b8f34ba9c7 SHA512 16da4a4736acd0ceb263766d14781a034a374372c7ab603a966fa364350b28e8c168f2e38c276d8e03cbdc2f3f9dde691fe959ca3db20533b036cc664a3cefe1
DIST python-gentoo-patches-3.9.5_p2.tar.xz 14728 BLAKE2B b6b0a0c316d99e8282bdbb5e62a90f84880ff89b0b1e236a5bce37fbdd3c3b187f7964873882dbcbc8c9765af107377240e8aac544987452830f0069aff471c0 SHA512 42e4dd48f4b93bd45a70093b447b4862ab286c1b5adc32d22a3e3d08e67db13bfa829bdbcf989fac9b7c8634a4735cfb4a7b16bfc40bdff0c11bc5a768bbeaf8
diff --git a/dev-lang/python/python-2.7.18_p9.ebuild b/dev-lang/python/python-2.7.18_p9.ebuild
deleted file mode 100644
index 7a8c21f525e7..000000000000
--- a/dev-lang/python/python-2.7.18_p9.ebuild
+++ /dev/null
@@ -1,355 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_P="Python-${PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
- )"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
-IUSE="berkdb bluetooth build elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl +threads tk +wide-unicode 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:=
- dev-libs/libffi:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- berkdb? ( || (
- sys-libs/db:5.3
- sys-libs/db:5.1
- sys-libs/db:4.8
- sys-libs/db:4.7
- sys-libs/db:4.6
- sys-libs/db:4.5
- sys-libs/db:4.4
- sys-libs/db:4.3
- sys-libs/db:4.2
- ) )
- 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/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )"
-BDEPEND="
- virtual/pkgconfig
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-PDEPEND="app-eselect/eselect-python"
-RDEPEND+="
- !build? ( app-misc/mime-types )
- !<=dev-lang/python-exec-2.4.6-r1"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-pkg_setup() {
- if use berkdb; then
- ewarn "'bsddb' module is out-of-date and no longer maintained inside"
- ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally"
- ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module"
- ewarn "is provided by dev-python/bsddb3."
- else
- if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then
- ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"
- ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
- ewarn "You might need to migrate your databases."
- fi
- fi
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- 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@@"
-
- eautoreconf
-}
-
-src_configure() {
- # dbm module can be linked against berkdb or gdbm.
- # Defaults to gdbm when both are enabled, #204343.
- local disable
- use berkdb || use gdbm || disable+=" dbm"
- use berkdb || disable+=" _bsddb"
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- 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
-
- 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
-
- # 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
- # Force some tests that try to poke fs paths.
- export ac_cv_file__dev_ptc=no
- export ac_cv_file__dev_ptmx=yes
- fi
-
- # Export CXX so it ends up in /usr/lib/python2.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)
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
- if use berkdb; then
- dbmliborder+="${dbmliborder:+:}bdb"
- fi
-
- local myeconfargs=(
- # The check is broken on clang, and gives false positive:
- # https://bugs.gentoo.org/596798
- # (upstream dropped this flag in 3.2a4 anyway)
- ac_cv_opt_olimit_ok=no
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --with-fpectl
- --enable-shared
- $(use_enable ipv6)
- $(use_with threads)
- $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2")
- --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
- )
-
- OPT="" econf "${myeconfargs[@]}"
-
- 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() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- # Avoid invoking pgen for cross-compiles.
- touch Include/graminit.h Python/graminit.c
-
- emake
-
- # 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
-
- # Skip failing tests.
- local skipped_tests="distutils gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
-
- # Daylight saving time problem
- # https://bugs.python.org/issue22067
- # https://bugs.gentoo.org/610628
- local -x TZ=UTC
-
- # Rerun failed tests in verbose mode (regrtest -w).
- emake test EXTRATESTOPTS="-w" < /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${PYVER}/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${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die
-
- # Fix collisions between different slots of Python.
- mv "${ED}/usr/bin/2to3" "${ED}/usr/bin/2to3-${PYVER}" || die
- mv "${ED}/usr/bin/pydoc" "${ED}/usr/bin/pydoc${PYVER}" || die
- mv "${ED}/usr/bin/idle" "${ED}/usr/bin/idle${PYVER}" || die
- rm "${ED}/usr/bin/smtpd.py" || die
-
- use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,lib-tk} || die
- use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test}
-
- use threads || rm -r "${libdir}/multiprocessing" || die
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- dodoc -r 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-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python
- ln -s "../../../bin/python${PYVER}" \
- "${scriptdir}/python" || die
- # python-config
- ln -s "../../../bin/python${PYVER}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc, pyvenv
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-
- # python2* is no longer wrapped, so just symlink it
- local pymajor=${PYVER%.*}
- dosym "python${PYVER}" "/usr/bin/python${pymajor}"
- dosym "python${PYVER}-config" "/usr/bin/python${pymajor}-config"
-}
diff --git a/dev-lang/python/python-3.10.0_beta1.ebuild b/dev-lang/python/python-3.10.0_beta1.ebuild
deleted file mode 100644
index e20ed1b73034..000000000000
--- a/dev-lang/python/python-3.10.0_beta1.ebuild
+++ /dev/null
@@ -1,347 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_beta/b}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- 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/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )
- !!<sys-apps/sandbox-2.21"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
- sys-devel/autoconf-archive
- virtual/pkgconfig
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-PDEPEND="app-eselect/eselect-python"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- 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
-
- 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
-
- # 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
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- --without-static-libpython
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-
- if 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() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- 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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite /usr/lib/python3.10/site-packages
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- 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/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r 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-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.6.13_p3.ebuild b/dev-lang/python/python-3.6.13_p3.ebuild
deleted file mode 100644
index e24be42012b1..000000000000
--- a/dev-lang/python/python-3.6.13_p3.ebuild
+++ /dev/null
@@ -1,338 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_P="Python-${PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
- )"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}/${PYVER}m"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test +threads tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
- dev-libs/libffi:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- 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/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )"
-BDEPEND="
- virtual/pkgconfig
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-PDEPEND="app-eselect/eselect-python"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- 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 \
- configure.ac \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- 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
-
- 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
-
- # 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
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --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
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-
- 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() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- 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
-
- # Skip failing tests.
- local skipped_tests="gdb faulthandler"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- 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${PYVER}/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${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- use threads || rm -r "${libdir}/multiprocessing" || die
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r 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-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc, pyvenv
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- ln -s "../../../bin/pyvenv-${PYVER}" \
- "${scriptdir}/pyvenv" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.6.13_p4.ebuild b/dev-lang/python/python-3.6.13_p4.ebuild
deleted file mode 100644
index bbce0c2bb3a4..000000000000
--- a/dev-lang/python/python-3.6.13_p4.ebuild
+++ /dev/null
@@ -1,338 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_P="Python-${PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
- )"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}/${PYVER}m"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test +threads tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
- dev-libs/libffi:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- 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/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )"
-BDEPEND="
- virtual/pkgconfig
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-PDEPEND="app-eselect/eselect-python"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- 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 \
- configure.ac \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- 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
-
- 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
-
- # 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
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --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
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-
- 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() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- 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
-
- # Skip failing tests.
- local skipped_tests="gdb faulthandler"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- 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${PYVER}/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${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- use threads || rm -r "${libdir}/multiprocessing" || die
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r 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-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc, pyvenv
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- ln -s "../../../bin/pyvenv-${PYVER}" \
- "${scriptdir}/pyvenv" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.7.10_p3.ebuild b/dev-lang/python/python-3.7.10_p3.ebuild
deleted file mode 100644
index 0e99aadfd9c4..000000000000
--- a/dev-lang/python/python-3.7.10_p3.ebuild
+++ /dev/null
@@ -1,330 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_P="Python-${PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
- )"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}/${PYVER}m"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- 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/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )"
-BDEPEND="
- virtual/pkgconfig
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-PDEPEND="app-eselect/eselect-python"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- 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
-
- 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
-
- # 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
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-
- if 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() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- 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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- 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/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r 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-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc, pyvenv
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- ln -s "../../../bin/pyvenv-${PYVER}" \
- "${scriptdir}/pyvenv" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.7.10_p4.ebuild b/dev-lang/python/python-3.7.10_p4.ebuild
deleted file mode 100644
index 1cfc503ae0f0..000000000000
--- a/dev-lang/python/python-3.7.10_p4.ebuild
+++ /dev/null
@@ -1,330 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_P="Python-${PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
- )"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}/${PYVER}m"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- 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/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )"
-BDEPEND="
- virtual/pkgconfig
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-PDEPEND="app-eselect/eselect-python"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- 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
-
- 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
-
- # 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
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-
- if 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() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- 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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- 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/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r 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-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc, pyvenv
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- ln -s "../../../bin/pyvenv-${PYVER}" \
- "${scriptdir}/pyvenv" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.8.10.ebuild b/dev-lang/python/python-3.8.10.ebuild
deleted file mode 100644
index 0a87aec91800..000000000000
--- a/dev-lang/python/python-3.8.10.ebuild
+++ /dev/null
@@ -1,336 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
- )"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- 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/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )"
-BDEPEND="
- virtual/pkgconfig
- sys-devel/autoconf-archive
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-PDEPEND="app-eselect/eselect-python"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- 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
-
- 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
-
- # 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
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-
- if 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() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- 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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- 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/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r 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-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.8.10_p1.ebuild b/dev-lang/python/python-3.8.10_p1.ebuild
deleted file mode 100644
index 0a87aec91800..000000000000
--- a/dev-lang/python/python-3.8.10_p1.ebuild
+++ /dev/null
@@ -1,336 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
- )"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- 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/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )"
-BDEPEND="
- virtual/pkgconfig
- sys-devel/autoconf-archive
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-PDEPEND="app-eselect/eselect-python"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- 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
-
- 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
-
- # 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
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-
- if 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() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- 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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- 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/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r 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-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.8.9_p2.ebuild b/dev-lang/python/python-3.8.9_p2.ebuild
deleted file mode 100644
index b1c4a316ec34..000000000000
--- a/dev-lang/python/python-3.8.9_p2.ebuild
+++ /dev/null
@@ -1,336 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
- )"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- 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/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )"
-BDEPEND="
- virtual/pkgconfig
- sys-devel/autoconf-archive
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-PDEPEND="app-eselect/eselect-python"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- 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
-
- 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
-
- # 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
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-
- if 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() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- 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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- 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/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r 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-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.9.4_p1.ebuild b/dev-lang/python/python-3.9.4_p1.ebuild
deleted file mode 100644
index ba35fe24eebb..000000000000
--- a/dev-lang/python/python-3.9.4_p1.ebuild
+++ /dev/null
@@ -1,345 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
- )"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- 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/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )"
-BDEPEND="
- virtual/pkgconfig
- sys-devel/autoconf-archive
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND="app-eselect/eselect-python"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- 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
-
- 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
-
- # 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
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-
- if 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() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- 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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- 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/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r 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-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.9.5.ebuild b/dev-lang/python/python-3.9.5.ebuild
deleted file mode 100644
index 444f9d6d14b5..000000000000
--- a/dev-lang/python/python-3.9.5.ebuild
+++ /dev/null
@@ -1,345 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
- )"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- 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/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )"
-BDEPEND="
- virtual/pkgconfig
- sys-devel/autoconf-archive
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND="app-eselect/eselect-python"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- 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
-
- 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
-
- # 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
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-
- if 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() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- 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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- 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/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r 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-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}
diff --git a/dev-lang/python/python-3.9.5_p1.ebuild b/dev-lang/python/python-3.9.5_p1.ebuild
deleted file mode 100644
index 444f9d6d14b5..000000000000
--- a/dev-lang/python/python-3.9.5_p1.ebuild
+++ /dev/null
@@ -1,345 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
- )"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- 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/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )"
-BDEPEND="
- virtual/pkgconfig
- sys-devel/autoconf-archive
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND="app-eselect/eselect-python"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- 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
-
- 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
-
- # 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
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-
- if 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() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- 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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- 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/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r 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-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc
- ln -s "../../../bin/2to3-${PYVER}" \
- "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${scriptdir}/idle" || die
- fi
-}