1 |
commit: 4339b61bff3536024d21e4cf8f58f194142f926e |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 20 06:48:37 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 20 06:51:19 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4339b61b |
7 |
|
8 |
dev-lang/python: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-lang/python/Manifest | 6 - |
13 |
dev-lang/python/python-3.6.14.ebuild | 337 -------------------------------- |
14 |
dev-lang/python/python-3.7.11.ebuild | 329 ------------------------------- |
15 |
dev-lang/python/python-3.8.11.ebuild | 335 -------------------------------- |
16 |
dev-lang/python/python-3.9.6_p1.ebuild | 344 --------------------------------- |
17 |
5 files changed, 1351 deletions(-) |
18 |
|
19 |
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest |
20 |
index 09426262c1a..3eb6d4e893a 100644 |
21 |
--- a/dev-lang/python/Manifest |
22 |
+++ b/dev-lang/python/Manifest |
23 |
@@ -12,8 +12,6 @@ DIST Python-3.7.11.tar.xz 17393380 BLAKE2B 6394d69935950366da7c4cecd4816d7625417 |
24 |
DIST Python-3.7.11.tar.xz.asc 833 BLAKE2B 8af6b3e58b607a34c91f57af2fbe9c3f3c7cb6fa5e435e963edd7edcf7649e70c3a76bd346ff8ef1b3c890d8a92d3b2fed27ee01b512c579ff8ce80be61274fb SHA512 f19db95e88c9269174a2b4ac4d8c68fa7ed666b6698af26d2da202e30d145686e8679be763eecba9f8a0c34a207639724094463cffce659c3855ed4b133b0a59 |
25 |
DIST Python-3.7.12.tar.xz 17401916 BLAKE2B f01b5cc54cd0ffe2e8756767c624dda8d2fbf24e90f22a16b5a406dad995ef218613db10f0b3fb2da0ece50ccb02c8a8e007ceb0842ce9e93ee9df7348ef1528 SHA512 e1a5942908c1d1469c0ab129fb4287d4ba6eb2a030e88fd71c043fe187a1bc86c00878dab29147199617a361a0c60d9e720fe3bc58bc7bc4cc8ec4bb50c7ea2a |
26 |
DIST Python-3.7.12.tar.xz.asc 833 BLAKE2B 587fcf019f4b07b811834d7279b9861eb709731a431be9cbe8f5b868ac72b6d9a4de8b24e3fefd6b339813299514a0ac12b5f627acd04c185ff8dea22a044723 SHA512 a47003dd5c784eca4e3c34dc8705d1171043e060f3a97e4dd63ce4aec2bceac56d7e808924d63b2a38f9a020bf799cf29e5055fb444b9b2c3f03976d47122355 |
27 |
-DIST Python-3.8.11.tar.xz 18437648 BLAKE2B 957c553ced3387d19c1d1baf2eea7d41e9abfbf398c4514f475eadae29336dc02dbd2cdf7b90ab5fee1e49c083a366c113dcd73149445b663fcdf81a3b2b04f6 SHA512 c8c17491b05d83a9f8940474019034780a6b1ff4148654cd62c8f708c539718a0312cf0665efa2b8c42ed773f4306080bd105701a211ed56e6cab40837d5b2df |
28 |
-DIST Python-3.8.11.tar.xz.asc 833 BLAKE2B 52239149331a6529351714db10b5f6b2a37e9a9ce13470e0ab8ae4bf439544878df095995bdc28a534d55039a539c400f532aec8fb7d9b9ce7132167f0e39529 SHA512 40381e83a1bef996333d5044a361ce441c4631725457f8382588e9a86f586a9539ee139b8398aff3d988a317041fa87476f29cf6fcd2b31fe0e9b4cd21ede68a |
29 |
DIST Python-3.8.12.tar.xz 18443568 BLAKE2B 73413aee7a31347ac4342718a54d23d4036220262c4cd41cd50b06c3b1698d52d11cf7ac2c781b919f2cdb0dcb6397d623c463dcdcd1edca99abbbce239a3c6e SHA512 2f93fe5ff83f470c7b6a1b7f29f499a2a010fabd649e9fe65ad3fbfa21b6e1966e77c9b7ac012d978159bc3fe63fec2d64bc6982fc2ee1714d3fa0e47631f279 |
30 |
DIST Python-3.8.12.tar.xz.asc 833 BLAKE2B 33f59aa667555832ee510d2a7295079f34a3983dfa84beab20b33ec691ea3eecfcc4a62591fe233fc30622d0236ee69a3d41b8922ee2f4c632df3523d565c3ec SHA512 ef552b716a721f410abb14387594c8b0ddc65ce4b8a6ae6bf920c1db2ea9ddf6bbf547e93d3716495ae31848eb1049aae4257016e888393681bbfb6f6529bc12 |
31 |
DIST Python-3.9.6.tar.xz 19051972 BLAKE2B 0d8586b2935088eeab7138cf2210c1a74f1bf7359359d25750af5f69de55eb39c92f518b887a8b749c772ed7d33e85b912928ae6d878514eb58d85ef210f54f0 SHA512 01c529e3207738d8771caeb5ed6217e10745c21aa39832fe3185e1c87fdb6aedead97ce38dbb11e02d873654028bd8071c3f345c18452769520723284efe9dc1 |
32 |
@@ -25,14 +23,10 @@ DIST python-gentoo-patches-2.7.18_p13.tar.xz 33296 BLAKE2B 91b711458aff4f6337ee1 |
33 |
DIST python-gentoo-patches-3.10.0rc1_p1.tar.xz 8496 BLAKE2B b3b771a8894e5bfeabb3bee10cf60c068dca28341784f0914bb2190f67f10007c2e4e3b18dc31ac7dd791e06314cd3f8cda6776261c6e83da380c492bbc53e89 SHA512 bb22cc121d3b915b98de32244926188dd9717054f32437822a59652be001ac3b6309cb1aba79ce158a486d33e761a31861aed56b5a7976bc83aee18174903248 |
34 |
DIST python-gentoo-patches-3.10.0rc1_p2.tar.xz 10548 BLAKE2B b0a78e3b5e45ead483391c4382c3d6046b4a03e43c1ab5fcd1569f05afc271dde6278078cec852756364663111c38f0ecedca99ef2f2bb233714406505ed8e79 SHA512 1e0129903a3756b6ab087b982269197b64028432f81592b887d8431f429f864918eaa611c7b671e303de7603fd835fb4563219fedd3ee1dbd42e843e66d4fccd |
35 |
DIST python-gentoo-patches-3.10.0rc2.tar.xz 8488 BLAKE2B d7c1e45e63bf5bfe5d41823ea183608f4bcb44694feb18ee6d315250f1563684ce87dec29f46c16da223b6bbd1d20e75791d347ae6ac1d4b5130ba3f08c55ca1 SHA512 c2ca3b60f33131b20037fc0f53a5ce655e9978c5fa42d0b8e2c6b56aec24f6f37d8997fa146a446e5fd72b5d2c4b017d5e4fb71318a51dbb45f5d3b0ea4ed4ad |
36 |
-DIST python-gentoo-patches-3.6.14.tar.xz 14744 BLAKE2B b9482f9d2b7ada60eff9a5672ed21556c00b473a7cfdb543dce8253fb0ff1539e635a35569478c496012ecde4eef78a257da28f7a80bff99da10249708262229 SHA512 246f83911c8e52ea83a9bf453faa0bc0ea0c29bbf3b666a938e3790c6147f71e617ff9cb27501c5f0b89172eb9e7819e3f2ef0a5bae271cc938d2c0c2b93f7ae |
37 |
DIST python-gentoo-patches-3.6.14_p1.tar.xz 16576 BLAKE2B 902a9073e6d3e40cfba105680d9947b64a4bfa1632381bc71afbd2691350dccb36f498bf17ac7dfc8ce331dfc3fb7e3cdd539cea3f5e9db1c49210ad4d124182 SHA512 4aa354f1ca8d9bb3c30b666ef61cac8380741342102aeb9ea77cc06ae62179f595acc1c2e6321e9c2395abbc3fbc649ecc93b80443d139859924524989539992 |
38 |
DIST python-gentoo-patches-3.6.15.tar.xz 15300 BLAKE2B f49fd96f6ad1a1c94fea6b83acd229a81754b86061e243044ead4b9a9d5122a2e43b270b68722c359c084c05a566a3ad70aa46588ab7a005ee560ee118b92b8b SHA512 cc33491a33f3f1d990cf494d53b91b74db761142e8aebe1bd4b128ef10a268ff945e5ba08daad39cee095612a8e52265d6988873ecf9c073377cbbc10735aa39 |
39 |
-DIST python-gentoo-patches-3.7.11.tar.xz 16708 BLAKE2B 4f74b38f400c20b4112f080447021e7140704b282d6369a1479886740d12a17e7818b52a382a4b115238847bb08df0260b092b6ead491623b869c3d3a56f4cc2 SHA512 b96d7af8c9f7fb4b246a8b66e6440336a7d123678d990dd259d7ffb87d79ce74295ff350e220fee38d1b12f1ca94533899c2d2ce700391b3eac907722a79bba6 |
40 |
DIST python-gentoo-patches-3.7.11_p1.tar.xz 18540 BLAKE2B 717f3b279368faa355e9b306ede5aa3cf750b7a862e50553caf4efe19b6b8d40431974fbb510414291c4c91623addebff54fd6d4f7f7553c686c5382174bc81f SHA512 e403d2364bbe600d7c3dba8f70157b1f243b00848e3826e6f350d7dbbdd0966229fbf9aa11e0e87fb5ab93b8ea69893f389e5b92c22d7315f99657d69695ded2 |
41 |
DIST python-gentoo-patches-3.7.12.tar.xz 17292 BLAKE2B f2e6629c8386c352254f8335fbfc53ddd5e7d86e1b6b71d57b6ff84f11974bf58ab894e687e866c4af60c25f43db01b11427f10c0755b494fa1f579af1b68750 SHA512 d6a1fb5e9ecf2691060f24078039dcbdafa4a27f17b7ede843bbda45016e86756a57e453da3e370b57c74d05c6dc894aa201f356e13ce94d3d9776fcbb673ed2 |
42 |
-DIST python-gentoo-patches-3.8.11.tar.xz 16932 BLAKE2B aaa1df33997f4077916fb7cca2ec3a2b2ac1c0ead3db7c638a5152a82cfaaf5fc2768a10ac7235c417e25b2b735c53628ec096878f08eef0d211b03f4747103c SHA512 d2639b95c5a32f7145f92e52a94aec7c63f3ed4a66036ff73f052ff6836742d1e1dd7180f8634b65b4a44a10bf336092695bcc2230a7fd8be35bae870ed64b08 |
43 |
DIST python-gentoo-patches-3.8.12.tar.xz 14936 BLAKE2B 1cb6cdb0bb659b1bc3f8a4ecd80da74b41a9fa2f4d5646ac4b48ddecd5124677cb24574a425404fedab4fb9c7faba4b1cb54cc3482785559a54fa3e9b3ca13f1 SHA512 86c30622bbf6847efcdf2bc43d916b05ee78ab17f45b93148a01cf4c181592029ecc52e8c4887112d97aeece63a92ee0f685a689287c133443cf51b3f8171fb9 |
44 |
-DIST python-gentoo-patches-3.9.6_p1.tar.xz 12764 BLAKE2B 927718f1aadb5d5ef67e647a639a10bffdd48474bf01e50bd37ef1242bce57606b7b54c4823c1da3585ee76e737028163e38e9b4e19037585cc53f925e1c5fa7 SHA512 f06fb55786bd942e72e3225ee9ce218724aeee29f301279743588749007e991851a8f29db5b5dfd85435e3d763c00942947909a6fc60581bd0f3e8a6e913bff8 |
45 |
DIST python-gentoo-patches-3.9.6_p2.tar.xz 14720 BLAKE2B e14634229b65a29f5294694949c138bfa6146810349d1207a07d84eeca529571eb9c760b58ddbe6e8d96d50d1a3e0d1dfe42328c53c977a9eeb22ecd553317dc SHA512 5d84b8bb4e5584e3ef8e6298af000e772240ad93ed0aaadf1d785db947f1e79aecae7313b8dbeb65849212c9930e683be6e18e42ef6c41a3c27d60f75df08a01 |
46 |
DIST python-gentoo-patches-3.9.7.tar.xz 12764 BLAKE2B 0cdd255ee1b90f117a7b11cf3ce96d48fe6e8b7b0d43958c473c23489fa4b512f7d8c385fc7c67ba0e62946fd22a608c3f088a3220934136c056bdd14e802752 SHA512 64ba96a5b07ff986b07c2694cd917d5542513cdf2d8ec96940bc2a730a479538968789121e6608feb1bae5465eafbae176726d79f2ddf025a0b7f59b67404b07 |
47 |
|
48 |
diff --git a/dev-lang/python/python-3.6.14.ebuild b/dev-lang/python/python-3.6.14.ebuild |
49 |
deleted file mode 100644 |
50 |
index 0ef9bffd77f..00000000000 |
51 |
--- a/dev-lang/python/python-3.6.14.ebuild |
52 |
+++ /dev/null |
53 |
@@ -1,337 +0,0 @@ |
54 |
-# Copyright 1999-2021 Gentoo Authors |
55 |
-# Distributed under the terms of the GNU General Public License v2 |
56 |
- |
57 |
-EAPI="7" |
58 |
-WANT_LIBTOOL="none" |
59 |
- |
60 |
-inherit autotools flag-o-matic multiprocessing pax-utils \ |
61 |
- python-utils-r1 toolchain-funcs verify-sig |
62 |
- |
63 |
-MY_P="Python-${PV%_p*}" |
64 |
-PYVER=$(ver_cut 1-2) |
65 |
-PATCHSET="python-gentoo-patches-${PV}" |
66 |
- |
67 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
68 |
-HOMEPAGE="https://www.python.org/" |
69 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
70 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
71 |
- verify-sig? ( |
72 |
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc |
73 |
- )" |
74 |
-S="${WORKDIR}/${MY_P}" |
75 |
- |
76 |
-LICENSE="PSF-2" |
77 |
-SLOT="${PYVER}/${PYVER}m" |
78 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" |
79 |
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test +threads tk wininst +xml" |
80 |
-RESTRICT="!test? ( test )" |
81 |
- |
82 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
83 |
-# If you need to apply a patch which requires python for bootstrapping, please |
84 |
-# run the bootstrap code on your dev box and include the results in the |
85 |
-# patchset. See bug 447752. |
86 |
- |
87 |
-RDEPEND="app-arch/bzip2:= |
88 |
- app-arch/xz-utils:= |
89 |
- dev-libs/libffi:= |
90 |
- >=sys-libs/zlib-1.1.3:= |
91 |
- virtual/libcrypt:= |
92 |
- virtual/libintl |
93 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
94 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
95 |
- readline? ( >=sys-libs/readline-4.1:= ) |
96 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
97 |
- ssl? ( dev-libs/openssl:= ) |
98 |
- tk? ( |
99 |
- >=dev-lang/tcl-8.0:= |
100 |
- >=dev-lang/tk-8.0:= |
101 |
- dev-tcltk/blt:= |
102 |
- dev-tcltk/tix |
103 |
- ) |
104 |
- xml? ( >=dev-libs/expat-2.1:= )" |
105 |
-# bluetooth requires headers from bluez |
106 |
-DEPEND="${RDEPEND} |
107 |
- bluetooth? ( net-wireless/bluez ) |
108 |
- test? ( app-arch/xz-utils[extra-filters(+)] )" |
109 |
-BDEPEND=" |
110 |
- virtual/pkgconfig |
111 |
- verify-sig? ( app-crypt/openpgp-keys-python ) |
112 |
- !sys-devel/gcc[libffi(-)]" |
113 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
114 |
- |
115 |
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc |
116 |
- |
117 |
-src_unpack() { |
118 |
- if use verify-sig; then |
119 |
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} |
120 |
- fi |
121 |
- default |
122 |
-} |
123 |
- |
124 |
-src_prepare() { |
125 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
126 |
- rm -fr Modules/expat || die |
127 |
- rm -fr Modules/_ctypes/libffi* || die |
128 |
- rm -fr Modules/zlib || die |
129 |
- |
130 |
- local PATCHES=( |
131 |
- "${WORKDIR}/${PATCHSET}" |
132 |
- ) |
133 |
- |
134 |
- default |
135 |
- |
136 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
137 |
- Lib/distutils/command/install.py \ |
138 |
- Lib/distutils/sysconfig.py \ |
139 |
- Lib/site.py \ |
140 |
- Lib/sysconfig.py \ |
141 |
- Lib/test/test_site.py \ |
142 |
- Makefile.pre.in \ |
143 |
- Modules/Setup.dist \ |
144 |
- Modules/getpath.c \ |
145 |
- configure.ac \ |
146 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
147 |
- |
148 |
- # force correct number of jobs |
149 |
- # https://bugs.gentoo.org/737660 |
150 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
151 |
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
152 |
- |
153 |
- eautoreconf |
154 |
-} |
155 |
- |
156 |
-src_configure() { |
157 |
- local disable |
158 |
- # disable automagic bluetooth headers detection |
159 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
160 |
- use gdbm || disable+=" gdbm" |
161 |
- use ncurses || disable+=" _curses _curses_panel" |
162 |
- use readline || disable+=" readline" |
163 |
- use sqlite || disable+=" _sqlite3" |
164 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
165 |
- use tk || disable+=" _tkinter" |
166 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
167 |
- export PYTHON_DISABLE_MODULES="${disable}" |
168 |
- |
169 |
- if ! use xml; then |
170 |
- ewarn "You have configured Python without XML support." |
171 |
- ewarn "This is NOT a recommended configuration as you" |
172 |
- ewarn "may face problems parsing any XML documents." |
173 |
- fi |
174 |
- |
175 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
176 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
177 |
- fi |
178 |
- |
179 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
180 |
- append-flags -fwrapv |
181 |
- fi |
182 |
- |
183 |
- filter-flags -malign-double |
184 |
- |
185 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
186 |
- if is-flagq -O3; then |
187 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
188 |
- use hardened && replace-flags -O3 -O2 |
189 |
- fi |
190 |
- |
191 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
192 |
- tc-export CXX |
193 |
- |
194 |
- local dbmliborder |
195 |
- if use gdbm; then |
196 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
197 |
- fi |
198 |
- |
199 |
- local myeconfargs=( |
200 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
201 |
- # Python on glibc upgrade, remove it proactively to give |
202 |
- # a chance for users rebuilding python before glibc |
203 |
- ac_cv_header_stropts_h=no |
204 |
- |
205 |
- --with-fpectl |
206 |
- --enable-shared |
207 |
- $(use_enable ipv6) |
208 |
- $(use_with threads) |
209 |
- --infodir='${prefix}/share/info' |
210 |
- --mandir='${prefix}/share/man' |
211 |
- --with-computed-gotos |
212 |
- --with-dbmliborder="${dbmliborder}" |
213 |
- --with-libc= |
214 |
- --enable-loadable-sqlite-extensions |
215 |
- --without-ensurepip |
216 |
- --with-system-expat |
217 |
- --with-system-ffi |
218 |
- ) |
219 |
- |
220 |
- OPT="" econf "${myeconfargs[@]}" |
221 |
- |
222 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
223 |
- eerror "configure has detected that the sem_open function is broken." |
224 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
225 |
- die "Broken sem_open function (bug 496328)" |
226 |
- fi |
227 |
-} |
228 |
- |
229 |
-src_compile() { |
230 |
- # Ensure sed works as expected |
231 |
- # https://bugs.gentoo.org/594768 |
232 |
- local -x LC_ALL=C |
233 |
- |
234 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
235 |
- |
236 |
- # Work around bug 329499. See also bug 413751 and 457194. |
237 |
- if has_version dev-libs/libffi[pax-kernel]; then |
238 |
- pax-mark E python |
239 |
- else |
240 |
- pax-mark m python |
241 |
- fi |
242 |
-} |
243 |
- |
244 |
-src_test() { |
245 |
- # Tests will not work when cross compiling. |
246 |
- if tc-is-cross-compiler; then |
247 |
- elog "Disabling tests due to crosscompiling." |
248 |
- return |
249 |
- fi |
250 |
- |
251 |
- # Skip failing tests. |
252 |
- local skipped_tests="gdb faulthandler" |
253 |
- |
254 |
- for test in ${skipped_tests}; do |
255 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
256 |
- done |
257 |
- |
258 |
- # bug 660358 |
259 |
- local -x COLUMNS=80 |
260 |
- local -x PYTHONDONTWRITEBYTECODE= |
261 |
- |
262 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
263 |
- |
264 |
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
265 |
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
266 |
- local result=$? |
267 |
- |
268 |
- for test in ${skipped_tests}; do |
269 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
270 |
- done |
271 |
- |
272 |
- elog "The following tests have been skipped:" |
273 |
- for test in ${skipped_tests}; do |
274 |
- elog "test_${test}.py" |
275 |
- done |
276 |
- |
277 |
- elog "If you would like to run them, you may:" |
278 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" |
279 |
- elog "and run the tests separately." |
280 |
- |
281 |
- if [[ ${result} -ne 0 ]]; then |
282 |
- die "emake test failed" |
283 |
- fi |
284 |
-} |
285 |
- |
286 |
-src_install() { |
287 |
- local libdir=${ED}/usr/$(get_libdir)/python${PYVER} |
288 |
- |
289 |
- emake DESTDIR="${D}" altinstall |
290 |
- |
291 |
- # Remove static library |
292 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
293 |
- |
294 |
- sed \ |
295 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
296 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
297 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
298 |
- |
299 |
- # Fix collisions between different slots of Python. |
300 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
301 |
- |
302 |
- # Cheap hack to get version with ABIFLAGS |
303 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
304 |
- if [[ ${abiver} != python${PYVER} ]]; then |
305 |
- # Replace python3.X with a symlink to python3.Xm |
306 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
307 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
308 |
- # Create python3.X-config symlink |
309 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
310 |
- # Create python-3.5m.pc symlink |
311 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
312 |
- fi |
313 |
- |
314 |
- # python seems to get rebuilt in src_install (bug 569908) |
315 |
- # Work around it for now. |
316 |
- if has_version dev-libs/libffi[pax-kernel]; then |
317 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
318 |
- else |
319 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
320 |
- fi |
321 |
- |
322 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
323 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
324 |
- |
325 |
- use threads || rm -r "${libdir}/multiprocessing" || die |
326 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
327 |
- |
328 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
329 |
- |
330 |
- if use examples; then |
331 |
- docinto examples |
332 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
333 |
- dodoc -r Tools |
334 |
- fi |
335 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
336 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
337 |
- emake --no-print-directory -s -f - 2>/dev/null) |
338 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
339 |
- |
340 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
341 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
342 |
- sed \ |
343 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
344 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
345 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
346 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
347 |
- |
348 |
- local -x EPYTHON=python${PYVER} |
349 |
- # if not using a cross-compiler, use the fresh binary |
350 |
- if ! tc-is-cross-compiler; then |
351 |
- local -x PYTHON=./python |
352 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
353 |
- else |
354 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
355 |
- fi |
356 |
- |
357 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
358 |
- python_domodule epython.py |
359 |
- |
360 |
- # python-exec wrapping support |
361 |
- local pymajor=${PYVER%.*} |
362 |
- local scriptdir=${D}$(python_get_scriptdir) |
363 |
- mkdir -p "${scriptdir}" || die |
364 |
- # python and pythonX |
365 |
- ln -s "../../../bin/${abiver}" \ |
366 |
- "${scriptdir}/python${pymajor}" || die |
367 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
368 |
- # python-config and pythonX-config |
369 |
- # note: we need to create a wrapper rather than symlinking it due |
370 |
- # to some random dirname(argv[0]) magic performed by python-config |
371 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
372 |
- #!/bin/sh |
373 |
- exec "${abiver}-config" "\${@}" |
374 |
- EOF |
375 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
376 |
- ln -s "python${pymajor}-config" \ |
377 |
- "${scriptdir}/python-config" || die |
378 |
- # 2to3, pydoc, pyvenv |
379 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
380 |
- "${scriptdir}/2to3" || die |
381 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
382 |
- "${scriptdir}/pydoc" || die |
383 |
- ln -s "../../../bin/pyvenv-${PYVER}" \ |
384 |
- "${scriptdir}/pyvenv" || die |
385 |
- # idle |
386 |
- if use tk; then |
387 |
- ln -s "../../../bin/idle${PYVER}" \ |
388 |
- "${scriptdir}/idle" || die |
389 |
- fi |
390 |
-} |
391 |
|
392 |
diff --git a/dev-lang/python/python-3.7.11.ebuild b/dev-lang/python/python-3.7.11.ebuild |
393 |
deleted file mode 100644 |
394 |
index 82cadf93c1b..00000000000 |
395 |
--- a/dev-lang/python/python-3.7.11.ebuild |
396 |
+++ /dev/null |
397 |
@@ -1,329 +0,0 @@ |
398 |
-# Copyright 1999-2021 Gentoo Authors |
399 |
-# Distributed under the terms of the GNU General Public License v2 |
400 |
- |
401 |
-EAPI="7" |
402 |
-WANT_LIBTOOL="none" |
403 |
- |
404 |
-inherit autotools flag-o-matic multiprocessing pax-utils \ |
405 |
- python-utils-r1 toolchain-funcs verify-sig |
406 |
- |
407 |
-MY_P="Python-${PV%_p*}" |
408 |
-PYVER=$(ver_cut 1-2) |
409 |
-PATCHSET="python-gentoo-patches-${PV}" |
410 |
- |
411 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
412 |
-HOMEPAGE="https://www.python.org/" |
413 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
414 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
415 |
- verify-sig? ( |
416 |
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc |
417 |
- )" |
418 |
-S="${WORKDIR}/${MY_P}" |
419 |
- |
420 |
-LICENSE="PSF-2" |
421 |
-SLOT="${PYVER}/${PYVER}m" |
422 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" |
423 |
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml" |
424 |
-RESTRICT="!test? ( test )" |
425 |
- |
426 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
427 |
-# If you need to apply a patch which requires python for bootstrapping, please |
428 |
-# run the bootstrap code on your dev box and include the results in the |
429 |
-# patchset. See bug 447752. |
430 |
- |
431 |
-RDEPEND="app-arch/bzip2:= |
432 |
- app-arch/xz-utils:= |
433 |
- dev-libs/libffi:= |
434 |
- sys-apps/util-linux:= |
435 |
- >=sys-libs/zlib-1.1.3:= |
436 |
- virtual/libcrypt:= |
437 |
- virtual/libintl |
438 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
439 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
440 |
- readline? ( >=sys-libs/readline-4.1:= ) |
441 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
442 |
- ssl? ( >=dev-libs/openssl-1.1.1:= ) |
443 |
- tk? ( |
444 |
- >=dev-lang/tcl-8.0:= |
445 |
- >=dev-lang/tk-8.0:= |
446 |
- dev-tcltk/blt:= |
447 |
- dev-tcltk/tix |
448 |
- ) |
449 |
- xml? ( >=dev-libs/expat-2.1:= )" |
450 |
-# bluetooth requires headers from bluez |
451 |
-DEPEND="${RDEPEND} |
452 |
- bluetooth? ( net-wireless/bluez ) |
453 |
- test? ( app-arch/xz-utils[extra-filters(+)] )" |
454 |
-BDEPEND=" |
455 |
- virtual/pkgconfig |
456 |
- verify-sig? ( app-crypt/openpgp-keys-python ) |
457 |
- !sys-devel/gcc[libffi(-)]" |
458 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
459 |
- |
460 |
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc |
461 |
- |
462 |
-src_unpack() { |
463 |
- if use verify-sig; then |
464 |
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} |
465 |
- fi |
466 |
- default |
467 |
-} |
468 |
- |
469 |
-src_prepare() { |
470 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
471 |
- rm -fr Modules/expat || die |
472 |
- rm -fr Modules/_ctypes/libffi* || die |
473 |
- rm -fr Modules/zlib || die |
474 |
- |
475 |
- local PATCHES=( |
476 |
- "${WORKDIR}/${PATCHSET}" |
477 |
- ) |
478 |
- |
479 |
- default |
480 |
- |
481 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
482 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
483 |
- |
484 |
- # force correct number of jobs |
485 |
- # https://bugs.gentoo.org/737660 |
486 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
487 |
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
488 |
- |
489 |
- eautoreconf |
490 |
-} |
491 |
- |
492 |
-src_configure() { |
493 |
- local disable |
494 |
- # disable automagic bluetooth headers detection |
495 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
496 |
- use gdbm || disable+=" gdbm" |
497 |
- use ncurses || disable+=" _curses _curses_panel" |
498 |
- use readline || disable+=" readline" |
499 |
- use sqlite || disable+=" _sqlite3" |
500 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
501 |
- use tk || disable+=" _tkinter" |
502 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
503 |
- export PYTHON_DISABLE_MODULES="${disable}" |
504 |
- |
505 |
- if ! use xml; then |
506 |
- ewarn "You have configured Python without XML support." |
507 |
- ewarn "This is NOT a recommended configuration as you" |
508 |
- ewarn "may face problems parsing any XML documents." |
509 |
- fi |
510 |
- |
511 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
512 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
513 |
- fi |
514 |
- |
515 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
516 |
- append-flags -fwrapv |
517 |
- fi |
518 |
- |
519 |
- filter-flags -malign-double |
520 |
- |
521 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
522 |
- if is-flagq -O3; then |
523 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
524 |
- use hardened && replace-flags -O3 -O2 |
525 |
- fi |
526 |
- |
527 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
528 |
- tc-export CXX |
529 |
- |
530 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
531 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
532 |
- |
533 |
- local dbmliborder |
534 |
- if use gdbm; then |
535 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
536 |
- fi |
537 |
- |
538 |
- local myeconfargs=( |
539 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
540 |
- # Python on glibc upgrade, remove it proactively to give |
541 |
- # a chance for users rebuilding python before glibc |
542 |
- ac_cv_header_stropts_h=no |
543 |
- |
544 |
- --enable-shared |
545 |
- $(use_enable ipv6) |
546 |
- --infodir='${prefix}/share/info' |
547 |
- --mandir='${prefix}/share/man' |
548 |
- --with-computed-gotos |
549 |
- --with-dbmliborder="${dbmliborder}" |
550 |
- --with-libc= |
551 |
- --enable-loadable-sqlite-extensions |
552 |
- --without-ensurepip |
553 |
- --with-system-expat |
554 |
- --with-system-ffi |
555 |
- ) |
556 |
- |
557 |
- OPT="" econf "${myeconfargs[@]}" |
558 |
- |
559 |
- if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
560 |
- eerror "configure has detected that the sem_open function is broken." |
561 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
562 |
- die "Broken sem_open function (bug 496328)" |
563 |
- fi |
564 |
-} |
565 |
- |
566 |
-src_compile() { |
567 |
- # Ensure sed works as expected |
568 |
- # https://bugs.gentoo.org/594768 |
569 |
- local -x LC_ALL=C |
570 |
- |
571 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
572 |
- |
573 |
- # Work around bug 329499. See also bug 413751 and 457194. |
574 |
- if has_version dev-libs/libffi[pax-kernel]; then |
575 |
- pax-mark E python |
576 |
- else |
577 |
- pax-mark m python |
578 |
- fi |
579 |
-} |
580 |
- |
581 |
-src_test() { |
582 |
- # Tests will not work when cross compiling. |
583 |
- if tc-is-cross-compiler; then |
584 |
- elog "Disabling tests due to crosscompiling." |
585 |
- return |
586 |
- fi |
587 |
- |
588 |
- # Skip failing tests. |
589 |
- local skipped_tests="gdb" |
590 |
- |
591 |
- for test in ${skipped_tests}; do |
592 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
593 |
- done |
594 |
- |
595 |
- # bug 660358 |
596 |
- local -x COLUMNS=80 |
597 |
- local -x PYTHONDONTWRITEBYTECODE= |
598 |
- |
599 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
600 |
- |
601 |
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
602 |
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
603 |
- local result=$? |
604 |
- |
605 |
- for test in ${skipped_tests}; do |
606 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
607 |
- done |
608 |
- |
609 |
- elog "The following tests have been skipped:" |
610 |
- for test in ${skipped_tests}; do |
611 |
- elog "test_${test}.py" |
612 |
- done |
613 |
- |
614 |
- elog "If you would like to run them, you may:" |
615 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
616 |
- elog "and run the tests separately." |
617 |
- |
618 |
- if [[ ${result} -ne 0 ]]; then |
619 |
- die "emake test failed" |
620 |
- fi |
621 |
-} |
622 |
- |
623 |
-src_install() { |
624 |
- local libdir=${ED}/usr/lib/python${PYVER} |
625 |
- |
626 |
- emake DESTDIR="${D}" altinstall |
627 |
- |
628 |
- # Remove static library |
629 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
630 |
- |
631 |
- sed \ |
632 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
633 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
634 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
635 |
- |
636 |
- # Fix collisions between different slots of Python. |
637 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
638 |
- |
639 |
- # Cheap hack to get version with ABIFLAGS |
640 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
641 |
- if [[ ${abiver} != python${PYVER} ]]; then |
642 |
- # Replace python3.X with a symlink to python3.Xm |
643 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
644 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
645 |
- # Create python3.X-config symlink |
646 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
647 |
- # Create python-3.5m.pc symlink |
648 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
649 |
- fi |
650 |
- |
651 |
- # python seems to get rebuilt in src_install (bug 569908) |
652 |
- # Work around it for now. |
653 |
- if has_version dev-libs/libffi[pax-kernel]; then |
654 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
655 |
- else |
656 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
657 |
- fi |
658 |
- |
659 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
660 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
661 |
- |
662 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
663 |
- |
664 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
665 |
- |
666 |
- if use examples; then |
667 |
- docinto examples |
668 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
669 |
- dodoc -r Tools |
670 |
- fi |
671 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
672 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
673 |
- emake --no-print-directory -s -f - 2>/dev/null) |
674 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
675 |
- |
676 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
677 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
678 |
- sed \ |
679 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
680 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
681 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
682 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
683 |
- |
684 |
- local -x EPYTHON=python${PYVER} |
685 |
- # if not using a cross-compiler, use the fresh binary |
686 |
- if ! tc-is-cross-compiler; then |
687 |
- local -x PYTHON=./python |
688 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
689 |
- else |
690 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
691 |
- fi |
692 |
- |
693 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
694 |
- python_domodule epython.py |
695 |
- |
696 |
- # python-exec wrapping support |
697 |
- local pymajor=${PYVER%.*} |
698 |
- local scriptdir=${D}$(python_get_scriptdir) |
699 |
- mkdir -p "${scriptdir}" || die |
700 |
- # python and pythonX |
701 |
- ln -s "../../../bin/${abiver}" \ |
702 |
- "${scriptdir}/python${pymajor}" || die |
703 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
704 |
- # python-config and pythonX-config |
705 |
- # note: we need to create a wrapper rather than symlinking it due |
706 |
- # to some random dirname(argv[0]) magic performed by python-config |
707 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
708 |
- #!/bin/sh |
709 |
- exec "${abiver}-config" "\${@}" |
710 |
- EOF |
711 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
712 |
- ln -s "python${pymajor}-config" \ |
713 |
- "${scriptdir}/python-config" || die |
714 |
- # 2to3, pydoc, pyvenv |
715 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
716 |
- "${scriptdir}/2to3" || die |
717 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
718 |
- "${scriptdir}/pydoc" || die |
719 |
- ln -s "../../../bin/pyvenv-${PYVER}" \ |
720 |
- "${scriptdir}/pyvenv" || die |
721 |
- # idle |
722 |
- if use tk; then |
723 |
- ln -s "../../../bin/idle${PYVER}" \ |
724 |
- "${scriptdir}/idle" || die |
725 |
- fi |
726 |
-} |
727 |
|
728 |
diff --git a/dev-lang/python/python-3.8.11.ebuild b/dev-lang/python/python-3.8.11.ebuild |
729 |
deleted file mode 100644 |
730 |
index f078d9d9b5c..00000000000 |
731 |
--- a/dev-lang/python/python-3.8.11.ebuild |
732 |
+++ /dev/null |
733 |
@@ -1,335 +0,0 @@ |
734 |
-# Copyright 1999-2021 Gentoo Authors |
735 |
-# Distributed under the terms of the GNU General Public License v2 |
736 |
- |
737 |
-EAPI="7" |
738 |
-WANT_LIBTOOL="none" |
739 |
- |
740 |
-inherit autotools flag-o-matic multiprocessing pax-utils \ |
741 |
- python-utils-r1 toolchain-funcs verify-sig |
742 |
- |
743 |
-MY_PV=${PV/_rc/rc} |
744 |
-MY_P="Python-${MY_PV%_p*}" |
745 |
-PYVER=$(ver_cut 1-2) |
746 |
-PATCHSET="python-gentoo-patches-${MY_PV}" |
747 |
- |
748 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
749 |
-HOMEPAGE="https://www.python.org/" |
750 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
751 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
752 |
- verify-sig? ( |
753 |
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc |
754 |
- )" |
755 |
-S="${WORKDIR}/${MY_P}" |
756 |
- |
757 |
-LICENSE="PSF-2" |
758 |
-SLOT="${PYVER}" |
759 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" |
760 |
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml" |
761 |
-RESTRICT="!test? ( test )" |
762 |
- |
763 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
764 |
-# If you need to apply a patch which requires python for bootstrapping, please |
765 |
-# run the bootstrap code on your dev box and include the results in the |
766 |
-# patchset. See bug 447752. |
767 |
- |
768 |
-RDEPEND="app-arch/bzip2:= |
769 |
- app-arch/xz-utils:= |
770 |
- dev-libs/libffi:= |
771 |
- sys-apps/util-linux:= |
772 |
- >=sys-libs/zlib-1.1.3:= |
773 |
- virtual/libcrypt:= |
774 |
- virtual/libintl |
775 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
776 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
777 |
- readline? ( >=sys-libs/readline-4.1:= ) |
778 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
779 |
- ssl? ( >=dev-libs/openssl-1.1.1:= ) |
780 |
- tk? ( |
781 |
- >=dev-lang/tcl-8.0:= |
782 |
- >=dev-lang/tk-8.0:= |
783 |
- dev-tcltk/blt:= |
784 |
- dev-tcltk/tix |
785 |
- ) |
786 |
- xml? ( >=dev-libs/expat-2.1:= )" |
787 |
-# bluetooth requires headers from bluez |
788 |
-DEPEND="${RDEPEND} |
789 |
- bluetooth? ( net-wireless/bluez ) |
790 |
- test? ( app-arch/xz-utils[extra-filters(+)] )" |
791 |
-BDEPEND=" |
792 |
- virtual/pkgconfig |
793 |
- sys-devel/autoconf-archive |
794 |
- verify-sig? ( app-crypt/openpgp-keys-python ) |
795 |
- !sys-devel/gcc[libffi(-)]" |
796 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
797 |
- |
798 |
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc |
799 |
- |
800 |
-src_unpack() { |
801 |
- if use verify-sig; then |
802 |
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} |
803 |
- fi |
804 |
- default |
805 |
-} |
806 |
- |
807 |
-src_prepare() { |
808 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
809 |
- rm -fr Modules/expat || die |
810 |
- rm -fr Modules/_ctypes/libffi* || die |
811 |
- rm -fr Modules/zlib || die |
812 |
- |
813 |
- local PATCHES=( |
814 |
- "${WORKDIR}/${PATCHSET}" |
815 |
- ) |
816 |
- |
817 |
- default |
818 |
- |
819 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
820 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
821 |
- |
822 |
- # force correct number of jobs |
823 |
- # https://bugs.gentoo.org/737660 |
824 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
825 |
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die |
826 |
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
827 |
- |
828 |
- eautoreconf |
829 |
-} |
830 |
- |
831 |
-src_configure() { |
832 |
- local disable |
833 |
- # disable automagic bluetooth headers detection |
834 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
835 |
- use gdbm || disable+=" gdbm" |
836 |
- use ncurses || disable+=" _curses _curses_panel" |
837 |
- use readline || disable+=" readline" |
838 |
- use sqlite || disable+=" _sqlite3" |
839 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
840 |
- use tk || disable+=" _tkinter" |
841 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
842 |
- export PYTHON_DISABLE_MODULES="${disable}" |
843 |
- |
844 |
- if ! use xml; then |
845 |
- ewarn "You have configured Python without XML support." |
846 |
- ewarn "This is NOT a recommended configuration as you" |
847 |
- ewarn "may face problems parsing any XML documents." |
848 |
- fi |
849 |
- |
850 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
851 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
852 |
- fi |
853 |
- |
854 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
855 |
- append-flags -fwrapv |
856 |
- fi |
857 |
- |
858 |
- filter-flags -malign-double |
859 |
- |
860 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
861 |
- if is-flagq -O3; then |
862 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
863 |
- use hardened && replace-flags -O3 -O2 |
864 |
- fi |
865 |
- |
866 |
- # https://bugs.gentoo.org/700012 |
867 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
868 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
869 |
- fi |
870 |
- |
871 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
872 |
- tc-export CXX |
873 |
- |
874 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
875 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
876 |
- |
877 |
- local dbmliborder |
878 |
- if use gdbm; then |
879 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
880 |
- fi |
881 |
- |
882 |
- local myeconfargs=( |
883 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
884 |
- # Python on glibc upgrade, remove it proactively to give |
885 |
- # a chance for users rebuilding python before glibc |
886 |
- ac_cv_header_stropts_h=no |
887 |
- |
888 |
- --enable-shared |
889 |
- $(use_enable ipv6) |
890 |
- --infodir='${prefix}/share/info' |
891 |
- --mandir='${prefix}/share/man' |
892 |
- --with-computed-gotos |
893 |
- --with-dbmliborder="${dbmliborder}" |
894 |
- --with-libc= |
895 |
- --enable-loadable-sqlite-extensions |
896 |
- --without-ensurepip |
897 |
- --with-system-expat |
898 |
- --with-system-ffi |
899 |
- ) |
900 |
- |
901 |
- OPT="" econf "${myeconfargs[@]}" |
902 |
- |
903 |
- if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
904 |
- eerror "configure has detected that the sem_open function is broken." |
905 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
906 |
- die "Broken sem_open function (bug 496328)" |
907 |
- fi |
908 |
-} |
909 |
- |
910 |
-src_compile() { |
911 |
- # Ensure sed works as expected |
912 |
- # https://bugs.gentoo.org/594768 |
913 |
- local -x LC_ALL=C |
914 |
- |
915 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
916 |
- |
917 |
- # Work around bug 329499. See also bug 413751 and 457194. |
918 |
- if has_version dev-libs/libffi[pax-kernel]; then |
919 |
- pax-mark E python |
920 |
- else |
921 |
- pax-mark m python |
922 |
- fi |
923 |
-} |
924 |
- |
925 |
-src_test() { |
926 |
- # Tests will not work when cross compiling. |
927 |
- if tc-is-cross-compiler; then |
928 |
- elog "Disabling tests due to crosscompiling." |
929 |
- return |
930 |
- fi |
931 |
- |
932 |
- # Skip failing tests. |
933 |
- local skipped_tests="gdb" |
934 |
- |
935 |
- for test in ${skipped_tests}; do |
936 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
937 |
- done |
938 |
- |
939 |
- # bug 660358 |
940 |
- local -x COLUMNS=80 |
941 |
- local -x PYTHONDONTWRITEBYTECODE= |
942 |
- |
943 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
944 |
- |
945 |
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
946 |
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
947 |
- local result=$? |
948 |
- |
949 |
- for test in ${skipped_tests}; do |
950 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
951 |
- done |
952 |
- |
953 |
- elog "The following tests have been skipped:" |
954 |
- for test in ${skipped_tests}; do |
955 |
- elog "test_${test}.py" |
956 |
- done |
957 |
- |
958 |
- elog "If you would like to run them, you may:" |
959 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
960 |
- elog "and run the tests separately." |
961 |
- |
962 |
- if [[ ${result} -ne 0 ]]; then |
963 |
- die "emake test failed" |
964 |
- fi |
965 |
-} |
966 |
- |
967 |
-src_install() { |
968 |
- local libdir=${ED}/usr/lib/python${PYVER} |
969 |
- |
970 |
- emake DESTDIR="${D}" altinstall |
971 |
- |
972 |
- # Remove static library |
973 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
974 |
- |
975 |
- sed \ |
976 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
977 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
978 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
979 |
- |
980 |
- # Fix collisions between different slots of Python. |
981 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
982 |
- |
983 |
- # Cheap hack to get version with ABIFLAGS |
984 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
985 |
- if [[ ${abiver} != python${PYVER} ]]; then |
986 |
- # Replace python3.X with a symlink to python3.Xm |
987 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
988 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
989 |
- # Create python3.X-config symlink |
990 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
991 |
- # Create python-3.5m.pc symlink |
992 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
993 |
- fi |
994 |
- |
995 |
- # python seems to get rebuilt in src_install (bug 569908) |
996 |
- # Work around it for now. |
997 |
- if has_version dev-libs/libffi[pax-kernel]; then |
998 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
999 |
- else |
1000 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
1001 |
- fi |
1002 |
- |
1003 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
1004 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
1005 |
- |
1006 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
1007 |
- |
1008 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
1009 |
- |
1010 |
- if use examples; then |
1011 |
- docinto examples |
1012 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
1013 |
- dodoc -r Tools |
1014 |
- fi |
1015 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1016 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1017 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1018 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1019 |
- |
1020 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1021 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1022 |
- sed \ |
1023 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1024 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1025 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
1026 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1027 |
- |
1028 |
- local -x EPYTHON=python${PYVER} |
1029 |
- # if not using a cross-compiler, use the fresh binary |
1030 |
- if ! tc-is-cross-compiler; then |
1031 |
- local -x PYTHON=./python |
1032 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1033 |
- else |
1034 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
1035 |
- fi |
1036 |
- |
1037 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1038 |
- python_domodule epython.py |
1039 |
- |
1040 |
- # python-exec wrapping support |
1041 |
- local pymajor=${PYVER%.*} |
1042 |
- local scriptdir=${D}$(python_get_scriptdir) |
1043 |
- mkdir -p "${scriptdir}" || die |
1044 |
- # python and pythonX |
1045 |
- ln -s "../../../bin/${abiver}" \ |
1046 |
- "${scriptdir}/python${pymajor}" || die |
1047 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
1048 |
- # python-config and pythonX-config |
1049 |
- # note: we need to create a wrapper rather than symlinking it due |
1050 |
- # to some random dirname(argv[0]) magic performed by python-config |
1051 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
1052 |
- #!/bin/sh |
1053 |
- exec "${abiver}-config" "\${@}" |
1054 |
- EOF |
1055 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
1056 |
- ln -s "python${pymajor}-config" \ |
1057 |
- "${scriptdir}/python-config" || die |
1058 |
- # 2to3, pydoc |
1059 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1060 |
- "${scriptdir}/2to3" || die |
1061 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1062 |
- "${scriptdir}/pydoc" || die |
1063 |
- # idle |
1064 |
- if use tk; then |
1065 |
- ln -s "../../../bin/idle${PYVER}" \ |
1066 |
- "${scriptdir}/idle" || die |
1067 |
- fi |
1068 |
-} |
1069 |
|
1070 |
diff --git a/dev-lang/python/python-3.9.6_p1.ebuild b/dev-lang/python/python-3.9.6_p1.ebuild |
1071 |
deleted file mode 100644 |
1072 |
index c31c0c1d895..00000000000 |
1073 |
--- a/dev-lang/python/python-3.9.6_p1.ebuild |
1074 |
+++ /dev/null |
1075 |
@@ -1,344 +0,0 @@ |
1076 |
-# Copyright 1999-2021 Gentoo Authors |
1077 |
-# Distributed under the terms of the GNU General Public License v2 |
1078 |
- |
1079 |
-EAPI="7" |
1080 |
-WANT_LIBTOOL="none" |
1081 |
- |
1082 |
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ |
1083 |
- python-utils-r1 toolchain-funcs verify-sig |
1084 |
- |
1085 |
-MY_PV=${PV/_rc/rc} |
1086 |
-MY_P="Python-${MY_PV%_p*}" |
1087 |
-PYVER=$(ver_cut 1-2) |
1088 |
-PATCHSET="python-gentoo-patches-${MY_PV}" |
1089 |
- |
1090 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
1091 |
-HOMEPAGE="https://www.python.org/" |
1092 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
1093 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
1094 |
- verify-sig? ( |
1095 |
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc |
1096 |
- )" |
1097 |
-S="${WORKDIR}/${MY_P}" |
1098 |
- |
1099 |
-LICENSE="PSF-2" |
1100 |
-SLOT="${PYVER}" |
1101 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" |
1102 |
-IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml" |
1103 |
-RESTRICT="!test? ( test )" |
1104 |
- |
1105 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
1106 |
-# If you need to apply a patch which requires python for bootstrapping, please |
1107 |
-# run the bootstrap code on your dev box and include the results in the |
1108 |
-# patchset. See bug 447752. |
1109 |
- |
1110 |
-RDEPEND="app-arch/bzip2:= |
1111 |
- app-arch/xz-utils:= |
1112 |
- dev-libs/libffi:= |
1113 |
- sys-apps/util-linux:= |
1114 |
- >=sys-libs/zlib-1.1.3:= |
1115 |
- virtual/libcrypt:= |
1116 |
- virtual/libintl |
1117 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
1118 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
1119 |
- readline? ( >=sys-libs/readline-4.1:= ) |
1120 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
1121 |
- ssl? ( >=dev-libs/openssl-1.1.1:= ) |
1122 |
- tk? ( |
1123 |
- >=dev-lang/tcl-8.0:= |
1124 |
- >=dev-lang/tk-8.0:= |
1125 |
- dev-tcltk/blt:= |
1126 |
- dev-tcltk/tix |
1127 |
- ) |
1128 |
- xml? ( >=dev-libs/expat-2.1:= )" |
1129 |
-# bluetooth requires headers from bluez |
1130 |
-DEPEND="${RDEPEND} |
1131 |
- bluetooth? ( net-wireless/bluez ) |
1132 |
- test? ( app-arch/xz-utils[extra-filters(+)] )" |
1133 |
-BDEPEND=" |
1134 |
- virtual/pkgconfig |
1135 |
- sys-devel/autoconf-archive |
1136 |
- verify-sig? ( app-crypt/openpgp-keys-python ) |
1137 |
- !sys-devel/gcc[libffi(-)]" |
1138 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
1139 |
- |
1140 |
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc |
1141 |
- |
1142 |
-# large file tests involve a 2.5G file being copied (duplicated) |
1143 |
-CHECKREQS_DISK_BUILD=5500M |
1144 |
- |
1145 |
-pkg_pretend() { |
1146 |
- use test && check-reqs_pkg_pretend |
1147 |
-} |
1148 |
- |
1149 |
-pkg_setup() { |
1150 |
- use test && check-reqs_pkg_setup |
1151 |
-} |
1152 |
- |
1153 |
-src_unpack() { |
1154 |
- if use verify-sig; then |
1155 |
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} |
1156 |
- fi |
1157 |
- default |
1158 |
-} |
1159 |
- |
1160 |
-src_prepare() { |
1161 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
1162 |
- rm -fr Modules/expat || die |
1163 |
- rm -fr Modules/_ctypes/libffi* || die |
1164 |
- rm -fr Modules/zlib || die |
1165 |
- |
1166 |
- local PATCHES=( |
1167 |
- "${WORKDIR}/${PATCHSET}" |
1168 |
- ) |
1169 |
- |
1170 |
- default |
1171 |
- |
1172 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
1173 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
1174 |
- |
1175 |
- # force correct number of jobs |
1176 |
- # https://bugs.gentoo.org/737660 |
1177 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
1178 |
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die |
1179 |
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
1180 |
- |
1181 |
- eautoreconf |
1182 |
-} |
1183 |
- |
1184 |
-src_configure() { |
1185 |
- local disable |
1186 |
- # disable automagic bluetooth headers detection |
1187 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
1188 |
- use gdbm || disable+=" gdbm" |
1189 |
- use ncurses || disable+=" _curses _curses_panel" |
1190 |
- use readline || disable+=" readline" |
1191 |
- use sqlite || disable+=" _sqlite3" |
1192 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
1193 |
- use tk || disable+=" _tkinter" |
1194 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
1195 |
- export PYTHON_DISABLE_MODULES="${disable}" |
1196 |
- |
1197 |
- if ! use xml; then |
1198 |
- ewarn "You have configured Python without XML support." |
1199 |
- ewarn "This is NOT a recommended configuration as you" |
1200 |
- ewarn "may face problems parsing any XML documents." |
1201 |
- fi |
1202 |
- |
1203 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
1204 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
1205 |
- fi |
1206 |
- |
1207 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
1208 |
- append-flags -fwrapv |
1209 |
- fi |
1210 |
- |
1211 |
- filter-flags -malign-double |
1212 |
- |
1213 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
1214 |
- if is-flagq -O3; then |
1215 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
1216 |
- use hardened && replace-flags -O3 -O2 |
1217 |
- fi |
1218 |
- |
1219 |
- # https://bugs.gentoo.org/700012 |
1220 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
1221 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
1222 |
- fi |
1223 |
- |
1224 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
1225 |
- tc-export CXX |
1226 |
- |
1227 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
1228 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
1229 |
- |
1230 |
- local dbmliborder |
1231 |
- if use gdbm; then |
1232 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
1233 |
- fi |
1234 |
- |
1235 |
- local myeconfargs=( |
1236 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
1237 |
- # Python on glibc upgrade, remove it proactively to give |
1238 |
- # a chance for users rebuilding python before glibc |
1239 |
- ac_cv_header_stropts_h=no |
1240 |
- |
1241 |
- --enable-shared |
1242 |
- $(use_enable ipv6) |
1243 |
- --infodir='${prefix}/share/info' |
1244 |
- --mandir='${prefix}/share/man' |
1245 |
- --with-computed-gotos |
1246 |
- --with-dbmliborder="${dbmliborder}" |
1247 |
- --with-libc= |
1248 |
- --enable-loadable-sqlite-extensions |
1249 |
- --without-ensurepip |
1250 |
- --with-system-expat |
1251 |
- --with-system-ffi |
1252 |
- ) |
1253 |
- |
1254 |
- OPT="" econf "${myeconfargs[@]}" |
1255 |
- |
1256 |
- if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
1257 |
- eerror "configure has detected that the sem_open function is broken." |
1258 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
1259 |
- die "Broken sem_open function (bug 496328)" |
1260 |
- fi |
1261 |
-} |
1262 |
- |
1263 |
-src_compile() { |
1264 |
- # Ensure sed works as expected |
1265 |
- # https://bugs.gentoo.org/594768 |
1266 |
- local -x LC_ALL=C |
1267 |
- |
1268 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
1269 |
- |
1270 |
- # Work around bug 329499. See also bug 413751 and 457194. |
1271 |
- if has_version dev-libs/libffi[pax-kernel]; then |
1272 |
- pax-mark E python |
1273 |
- else |
1274 |
- pax-mark m python |
1275 |
- fi |
1276 |
-} |
1277 |
- |
1278 |
-src_test() { |
1279 |
- # Tests will not work when cross compiling. |
1280 |
- if tc-is-cross-compiler; then |
1281 |
- elog "Disabling tests due to crosscompiling." |
1282 |
- return |
1283 |
- fi |
1284 |
- |
1285 |
- # Skip failing tests. |
1286 |
- local skipped_tests="gdb" |
1287 |
- |
1288 |
- for test in ${skipped_tests}; do |
1289 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
1290 |
- done |
1291 |
- |
1292 |
- # bug 660358 |
1293 |
- local -x COLUMNS=80 |
1294 |
- local -x PYTHONDONTWRITEBYTECODE= |
1295 |
- |
1296 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
1297 |
- |
1298 |
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
1299 |
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
1300 |
- local result=$? |
1301 |
- |
1302 |
- for test in ${skipped_tests}; do |
1303 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
1304 |
- done |
1305 |
- |
1306 |
- elog "The following tests have been skipped:" |
1307 |
- for test in ${skipped_tests}; do |
1308 |
- elog "test_${test}.py" |
1309 |
- done |
1310 |
- |
1311 |
- elog "If you would like to run them, you may:" |
1312 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
1313 |
- elog "and run the tests separately." |
1314 |
- |
1315 |
- if [[ ${result} -ne 0 ]]; then |
1316 |
- die "emake test failed" |
1317 |
- fi |
1318 |
-} |
1319 |
- |
1320 |
-src_install() { |
1321 |
- local libdir=${ED}/usr/lib/python${PYVER} |
1322 |
- |
1323 |
- emake DESTDIR="${D}" altinstall |
1324 |
- |
1325 |
- # Remove static library |
1326 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
1327 |
- |
1328 |
- sed \ |
1329 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1330 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1331 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1332 |
- |
1333 |
- # Fix collisions between different slots of Python. |
1334 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
1335 |
- |
1336 |
- # Cheap hack to get version with ABIFLAGS |
1337 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
1338 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1339 |
- # Replace python3.X with a symlink to python3.Xm |
1340 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
1341 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1342 |
- # Create python3.X-config symlink |
1343 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1344 |
- # Create python-3.5m.pc symlink |
1345 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1346 |
- fi |
1347 |
- |
1348 |
- # python seems to get rebuilt in src_install (bug 569908) |
1349 |
- # Work around it for now. |
1350 |
- if has_version dev-libs/libffi[pax-kernel]; then |
1351 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
1352 |
- else |
1353 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
1354 |
- fi |
1355 |
- |
1356 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
1357 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
1358 |
- |
1359 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
1360 |
- |
1361 |
- if use examples; then |
1362 |
- docinto examples |
1363 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
1364 |
- dodoc -r Tools |
1365 |
- fi |
1366 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1367 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1368 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1369 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1370 |
- |
1371 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1372 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1373 |
- sed \ |
1374 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1375 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1376 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
1377 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1378 |
- |
1379 |
- local -x EPYTHON=python${PYVER} |
1380 |
- # if not using a cross-compiler, use the fresh binary |
1381 |
- if ! tc-is-cross-compiler; then |
1382 |
- local -x PYTHON=./python |
1383 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1384 |
- else |
1385 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
1386 |
- fi |
1387 |
- |
1388 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1389 |
- python_domodule epython.py |
1390 |
- |
1391 |
- # python-exec wrapping support |
1392 |
- local pymajor=${PYVER%.*} |
1393 |
- local scriptdir=${D}$(python_get_scriptdir) |
1394 |
- mkdir -p "${scriptdir}" || die |
1395 |
- # python and pythonX |
1396 |
- ln -s "../../../bin/${abiver}" \ |
1397 |
- "${scriptdir}/python${pymajor}" || die |
1398 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
1399 |
- # python-config and pythonX-config |
1400 |
- # note: we need to create a wrapper rather than symlinking it due |
1401 |
- # to some random dirname(argv[0]) magic performed by python-config |
1402 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
1403 |
- #!/bin/sh |
1404 |
- exec "${abiver}-config" "\${@}" |
1405 |
- EOF |
1406 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
1407 |
- ln -s "python${pymajor}-config" \ |
1408 |
- "${scriptdir}/python-config" || die |
1409 |
- # 2to3, pydoc |
1410 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1411 |
- "${scriptdir}/2to3" || die |
1412 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1413 |
- "${scriptdir}/pydoc" || die |
1414 |
- # idle |
1415 |
- if use tk; then |
1416 |
- ln -s "../../../bin/idle${PYVER}" \ |
1417 |
- "${scriptdir}/idle" || die |
1418 |
- fi |
1419 |
-} |