1 |
commit: 08a16908f3bb7d9f19b68e2d786b74376add6a0a |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 23 01:38:09 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 23 01:38:09 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=08a16908 |
7 |
|
8 |
dev-lang/python: cleanup old |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
dev-lang/python/Manifest | 8 - |
13 |
dev-lang/python/python-3.8.7_p2.ebuild | 387 ------------------------------- |
14 |
dev-lang/python/python-3.9.1_p2.ebuild | 389 ------------------------------- |
15 |
dev-lang/python/python-3.9.3.ebuild | 406 --------------------------------- |
16 |
4 files changed, 1190 deletions(-) |
17 |
|
18 |
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest |
19 |
index 13cb36defe..c5e846887a 100644 |
20 |
--- a/dev-lang/python/Manifest |
21 |
+++ b/dev-lang/python/Manifest |
22 |
@@ -1,20 +1,12 @@ |
23 |
DIST Python-2.7.16.tar.xz 12752104 BLAKE2B 7d6b5b853f9974d44e04dd35ecdffaab87511e183b4b01dd4f8f4ee109c4b4ab208f045708f69717be9d3a706aa078b71438ed482c062c0b89c12730eae074ae SHA512 16e814e8dcffc707b595ca2919bd2fa3db0d15794c63d977364652c4a5b92e90e72b8c9e1cc83b5020398bd90a1b397dbdd7cb931c49f1aa4af6ef95414b43e0 |
24 |
-DIST Python-3.8.7.tar.xz 18261096 BLAKE2B 6ac20efef41e828cb796aabcb7808400d494b9b48759950c8c15ee90762394f6763163d8e37ab407c1c79ebb9cda09189eaa969a75f96c86a96ccee962443924 SHA512 6a27d8eab3076930df46b0cf127f9b664f8d4147349b2b98132f464deb7f69d87e0167e8ee8e6c64249125ad73760d965ecbc81c252b63a1e7aac95594c62b74 |
25 |
DIST Python-3.8.8.tar.xz 18271736 BLAKE2B af0ff1acd919b365a58278e82678324ff884cc8120bcaf12e0e3afb1bd978e6469e256335df131935f51ff481fb83dda04e4b6f1cd1746611f9ec944db73d692 SHA512 64181db5aa48281284a3230436ebfb8cb91b645a9dec956fd48c0048334498477073fc4e14d6b426d0ef7fbcdcfd5d59cbf01a504e6c9014dc9529494b9309fb |
26 |
DIST Python-3.8.8.tar.xz.asc 833 BLAKE2B a11188f9f68c518259de1a4e271bf56409d7356a7eb3dd8cbea7bbb0b5bc1b43f9aeb85bda4add65bbae906bef65cb20a30bcc77da04c0d383cd5b527821fd85 SHA512 0e6f11a310c1796dd056d9a4b63b5e03aa8dbd290088966e04a590a78c00003887dbfd7a7029a6cf8c5626ecd6ca91c1c16433bb0a41bf1225b02b8db8541b95 |
27 |
-DIST Python-3.9.1.tar.xz 18897104 BLAKE2B bcbce176510e8e7c6ba6070588bedc52121c21c5271f59b3d629dfb542c51ee62622b2ca53a6e2041f1a51b2d089368cc4de9bb749e8ebad9a2c4eb4de83538e SHA512 b90029d6825751685983e9dcf0e0ec9e46f18e6c7d37b0dd7a245a94316f8c0090308ad7c2b2b49ed2514b0b909177231dd5bcad03031bf4624e37136fcf8019 |
28 |
-DIST Python-3.9.3.tar.xz 18899676 BLAKE2B c879fc55e7e654413fbcddb4d032cf10b061c39a273428cdf281a7bf3505ce6de885cc38f73095b02f20126f551d18f94662893d71be01b0da40768d5beaf427 SHA512 420b07c272b8da4b97f6edc21c3b51ef8ee1fffd291eebb032991ec2da4fc40ace3e9b608d7cea0c43ad3716792640c508e84a807c29cfa5a40f89d294f7b0ab |
29 |
-DIST Python-3.9.3.tar.xz.asc 833 BLAKE2B 04ad005c7a41e02478659e65cce79053e962144f2bb3d47ca798a3478cc72ca162d0e199a8d96fe681079456e6553dd76323235c727954e1e3e04e97c3549c6b SHA512 6cc9fc77450a8d3781b24c13163f813f32e177bc70163a0f42949353b559a296a79e4da7b45d63928285f7d852021bcdcede885909235532ee9128468788d6c9 |
30 |
DIST Python-3.9.6.tar.xz 19051972 BLAKE2B 0d8586b2935088eeab7138cf2210c1a74f1bf7359359d25750af5f69de55eb39c92f518b887a8b749c772ed7d33e85b912928ae6d878514eb58d85ef210f54f0 SHA512 01c529e3207738d8771caeb5ed6217e10745c21aa39832fe3185e1c87fdb6aedead97ce38dbb11e02d873654028bd8071c3f345c18452769520723284efe9dc1 |
31 |
DIST Python-3.9.6.tar.xz.asc 833 BLAKE2B 41901bfb80a901f2f14e86769e6d08ded8f75656d347201345183162e180e61442da871a1067572a54da579551166a19bf5436e51581bb10cb78afc4d28773fc SHA512 0673c8833f302c829bfde97453c52744f6aa99b4a72520f4cc384d4aa9d6ffd28a1407ceafb0a1ec4462b3aa74b656bf39c67872c4e6a131429ea58c47ad0ecc |
32 |
DIST python-gentoo-patches-2.7.16.tar.xz 13904 BLAKE2B 218b46f8656f4a792dcd47eabca6d59a1558276b77676544991ee75914cd76dda84c36f43e72e477b850dd4cb52374d289f20dccd244a3b52ae5debaf3363432 SHA512 83f90545231c663a34c6925352a357a2b15997ac0362578a1893304c5070b5251922585ae8bc1bafb68d306bcddd4cdba4b6406648d473bd3e980eef65fe3ecd |
33 |
-DIST python-gentoo-patches-3.8.7_p2.tar.xz 17708 BLAKE2B 495a24e0496be246d2beddfaaa8886049197ca5973dadccfcd26b3b2237e4b06b85f0e4d418db411d055ca3d0c1173e03dd5a62e29f64c133e8da6261b17c99b SHA512 c06f2fc1fe48be010e8230ac3d474b9c8386bba8f762dbe35d128ad63eaa1a4c2a5a991ec6044564331d0dec4f248a71e37959ebe666b0693d6ed41f460a67f7 |
34 |
DIST python-gentoo-patches-3.8.8_p1.tar.xz 15456 BLAKE2B 7d9f55f951f97ef7e08d0245dddd21f5b8d126735c1c392ba6326ad1c18023b477f62e9b6663d8e5b6f0362e442137d0b6ed3ea13b279cca6734d36dbe6e654f SHA512 7fff74d03a0c4cd4b5c977761179c2b9a0ed472847ee9544f54331cef7549557ac4d6b78e676058bd2b01c96ca59d84f04c55beca8ddc45f16b11ce349210eea |
35 |
-DIST python-gentoo-patches-3.9.1_p2.tar.xz 15556 BLAKE2B 5e265ef8edee70694d73c6df6eb908a747be34e1e89b900d2470d41e7e043d179408bc643a52ade6e54e61a210ee8850d02a2cb452a9336f3973345c1d027158 SHA512 eabfd304b39975258705f5e9b238f709196ce0cbd3803f157dc77d864631a3eea380084a3a4de180e3ba7e92239608ae369e810f8066c0f1ff9fa251bbc1816c |
36 |
-DIST python-gentoo-patches-3.9.3.tar.xz 8820 BLAKE2B e46d910e4f427ea4cd4f912c5e2864140137c9414998a30fcf79509c231003a55ed480a5fd3eaccb6281f54c0a4f4a6ef76502761c91e37947b17a7a80bb5a94 SHA512 2e4204ca273b6ff0e3b97a73d018bf262c08c40f7e94b7b99fbff5299a799bb806f1410b0ca960efc6f2001e098954ea8b55e604bce451b2ccacd691ffcbe9ce |
37 |
DIST python-gentoo-patches-3.9.6_p1.tar.xz 12764 BLAKE2B 927718f1aadb5d5ef67e647a639a10bffdd48474bf01e50bd37ef1242bce57606b7b54c4823c1da3585ee76e737028163e38e9b4e19037585cc53f925e1c5fa7 SHA512 f06fb55786bd942e72e3225ee9ce218724aeee29f301279743588749007e991851a8f29db5b5dfd85435e3d763c00942947909a6fc60581bd0f3e8a6e913bff8 |
38 |
DIST python-prefix-2.7.16-gentoo-patches-r0.tar.xz 14636 BLAKE2B 54320f5197bb7adeca1e7c97447253e6535a11f380b6d66bc2ce46fa671fe23697aced8fd5619633a00e3ea19ae9dbc3ffe2981173d83dcab6b447d514555c43 SHA512 5380d9b92eb81603ec4d60ff9c940a3a061c06bd6f593d5837e600da5d4417b529d20d98d758aa95cef18fac10bdb5c33f90fa943deb15fdaf048492cf286581 |
39 |
DIST python-prefix-gentoo-3.8.7-patches-r2.tar.xz 8312 BLAKE2B 268f3cff62dc51d4f91994c3f6b05cea0e29edb1ccf39476ba52485fb94c3cad72b54ed5cd941c227bdad004a7ae0069d60ee6bbde5a30d16115263d0dc2a5c3 SHA512 e43ce1e9e851bebce968ee025f765fc9a558c8edc4ee2d51616043183fd12301ab3d5c7f92915238e53b5cf92f6c00617ab0fcf9859d4cebe0966271e6f64725 |
40 |
-DIST python-prefix-gentoo-3.9.1-patches-r2.tar.xz 6996 BLAKE2B 5de68537998c19d19cc1b2f630da73da3e70a88581c010028107cb7c9571c821637388022ab7659bd20992a8cf683199af22863cc5af25eb1030e2a5956e156d SHA512 c3d6998b3a00fb4bf7f84fe5fa6788b3f725120a73991075e7feb5762ff0186e27bfb455354365f3b84844ec28876792bf11baf124776a1ea3375ed2d0e1882e |
41 |
DIST python-prefix-gentoo-3.9.6_p1-patches-r0.tar.xz 6984 BLAKE2B 8b032d3000fd2dfcb8e099ac071c1a911ba2a0e30343788f7191043800f9d0088307cd7007b2b3f6cc7d2f315fc22bbac5990fed81f0dd8d60dca0314bd59b88 SHA512 76c56895c99ee203bd266f475766d2572659939abaf478932e7c9c65ddc52cb5e012e23c9455dd0a4bf0281a07c70e23a2fea8337c693b8a4ac8abb534e21982 |
42 |
DIST python2-cygwinports-7be648659ef46f33db6913ca0ca5a809219d5629.zip 9199 BLAKE2B 85803bc1677bd16650cb5fc4a2c54fdac0228326f25cfba4fcd098ac9d689312d3e0dde6fca57f720d5235361d6462461cf018325c23fda9139e0f1683055aff SHA512 cabc21d2d7379daf1f4bafe7ab00b70e5b4f707d3102496b96ff0dfdced26347097ad771c69e0b9488b7c54b1ef36f9bc019bee72f1ffcbb55dcd0e71095edfe |
43 |
|
44 |
diff --git a/dev-lang/python/python-3.8.7_p2.ebuild b/dev-lang/python/python-3.8.7_p2.ebuild |
45 |
deleted file mode 100644 |
46 |
index 462873fb58..0000000000 |
47 |
--- a/dev-lang/python/python-3.8.7_p2.ebuild |
48 |
+++ /dev/null |
49 |
@@ -1,387 +0,0 @@ |
50 |
-# Copyright 1999-2021 Gentoo Authors |
51 |
-# Distributed under the terms of the GNU General Public License v2 |
52 |
- |
53 |
-EAPI="7" |
54 |
-WANT_LIBTOOL="none" |
55 |
- |
56 |
-inherit autotools flag-o-matic multiprocessing pax-utils \ |
57 |
- python-utils-r1 toolchain-funcs |
58 |
- |
59 |
-MY_P="Python-${PV%_p*}" |
60 |
-PYVER=$(ver_cut 1-2) |
61 |
-PATCHSET="python-gentoo-patches-${PV}" |
62 |
-PREFIX_PATCHSET="python-prefix-gentoo-${PV%_p*}-patches-r2" |
63 |
- |
64 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
65 |
-HOMEPAGE="https://www.python.org/" |
66 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
67 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
68 |
- https://dev.gentoo.org/~grobian/distfiles/${PREFIX_PATCHSET}.tar.xz" |
69 |
-S="${WORKDIR}/${MY_P}" |
70 |
- |
71 |
-LICENSE="PSF-2" |
72 |
-SLOT="${PYVER}" |
73 |
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
74 |
-IUSE="aqua bluetooth build examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl test tk wininst +xml" |
75 |
-RESTRICT="!test? ( test )" |
76 |
- |
77 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
78 |
-# If you need to apply a patch which requires python for bootstrapping, please |
79 |
-# run the bootstrap code on your dev box and include the results in the |
80 |
-# patchset. See bug 447752. |
81 |
- |
82 |
-RDEPEND="app-arch/bzip2:= |
83 |
- app-arch/xz-utils:= |
84 |
- dev-libs/libffi:= |
85 |
- kernel_linux? ( sys-apps/util-linux:= ) |
86 |
- >=sys-libs/zlib-1.1.3:= |
87 |
- virtual/libcrypt:= |
88 |
- virtual/libintl |
89 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
90 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
91 |
- readline? ( >=sys-libs/readline-4.1:= ) |
92 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
93 |
- ssl? ( dev-libs/openssl:= ) |
94 |
- tk? ( |
95 |
- >=dev-lang/tcl-8.0:= |
96 |
- >=dev-lang/tk-8.0:= |
97 |
- dev-tcltk/blt:= |
98 |
- dev-tcltk/tix |
99 |
- ) |
100 |
- xml? ( >=dev-libs/expat-2.1:= )" |
101 |
-# bluetooth requires headers from bluez |
102 |
-DEPEND="${RDEPEND} |
103 |
- bluetooth? ( net-wireless/bluez ) |
104 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
105 |
- virtual/pkgconfig |
106 |
- !sys-devel/gcc[libffi(-)]" |
107 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
108 |
- |
109 |
-src_prepare() { |
110 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
111 |
- rm -fr Modules/expat || die |
112 |
- rm -fr Modules/_ctypes/libffi* || die |
113 |
- rm -fr Modules/zlib || die |
114 |
- |
115 |
- local PATCHES=( |
116 |
- "${WORKDIR}/${PATCHSET}" |
117 |
- # Prefix' round of patches |
118 |
- "${WORKDIR}"/${PREFIX_PATCHSET} |
119 |
- ) |
120 |
- |
121 |
- default |
122 |
- |
123 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
124 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
125 |
- |
126 |
- # force correct number of jobs |
127 |
- # https://bugs.gentoo.org/737660 |
128 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
129 |
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die |
130 |
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
131 |
- |
132 |
- # workaround a problem on ppc-macos with >=GCC-8 where dtoa gets |
133 |
- # miscompiled when optimisation is being used |
134 |
- if [[ ${CHOST} == powerpc*-darwin* ]] && \ |
135 |
- tc-is-gcc && [[ $(gcc-major-version) -ge 8 ]] ; |
136 |
- then |
137 |
- sed -i \ |
138 |
- -e '/^CFLAGS_ALIASING=/s/$/ -fno-tree-ter/' Makefile.pre.in || die |
139 |
- fi |
140 |
- |
141 |
- # Darwin 9's kqueue seems to act up (at least at this stage), so |
142 |
- # make Python's selectors resort to poll() or select() |
143 |
- if [[ ${CHOST} == powerpc*-darwin9 ]] ; then |
144 |
- sed -i \ |
145 |
- -e 's/KQUEUE/KQUEUE_DISABLED/' \ |
146 |
- configure.ac configure || die |
147 |
- fi |
148 |
- |
149 |
- # Python doesn't know about arm64-macos yet |
150 |
- if [[ ${CHOST} == arm64-*-darwin* ]] ; then |
151 |
- # Teach Python a new trick (arm64) |
152 |
- sed -i \ |
153 |
- -e "/Unexpected output of 'arch' on OSX/d" \ |
154 |
- configure.ac configure || die |
155 |
- fi |
156 |
- |
157 |
- eautoreconf |
158 |
-} |
159 |
- |
160 |
-src_configure() { |
161 |
- local disable |
162 |
- # disable automagic bluetooth headers detection |
163 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
164 |
- use gdbm || disable+=" gdbm" |
165 |
- use ncurses || disable+=" _curses _curses_panel" |
166 |
- use readline || disable+=" readline" |
167 |
- use sqlite || disable+=" _sqlite3" |
168 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
169 |
- use tk || disable+=" _tkinter" |
170 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
171 |
- export PYTHON_DISABLE_MODULES="${disable}" |
172 |
- |
173 |
- if ! use xml; then |
174 |
- ewarn "You have configured Python without XML support." |
175 |
- ewarn "This is NOT a recommended configuration as you" |
176 |
- ewarn "may face problems parsing any XML documents." |
177 |
- fi |
178 |
- |
179 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
180 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
181 |
- fi |
182 |
- |
183 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
184 |
- append-flags -fwrapv |
185 |
- fi |
186 |
- |
187 |
- filter-flags -malign-double |
188 |
- |
189 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
190 |
- if is-flagq -O3; then |
191 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
192 |
- use hardened && replace-flags -O3 -O2 |
193 |
- fi |
194 |
- |
195 |
- # https://bugs.gentoo.org/700012 |
196 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
197 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
198 |
- fi |
199 |
- |
200 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
201 |
- tc-export CXX |
202 |
- |
203 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
204 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
205 |
- # Please query BSD team before removing this! |
206 |
- append-ldflags "-L." |
207 |
- |
208 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
209 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
210 |
- use prefix && append-ldflags -L"${ESYSROOT}"/lib -L"${ESYSROOT}"/usr/lib |
211 |
- |
212 |
- local dbmliborder |
213 |
- if use gdbm; then |
214 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
215 |
- fi |
216 |
- |
217 |
- if use aqua ; then |
218 |
- ECONF_SOURCE="${S}" OPT="" \ |
219 |
- econf \ |
220 |
- --enable-framework="${EPREFIX}" \ |
221 |
- --config-cache |
222 |
- fi |
223 |
- |
224 |
- # flock on 32-bits sparc Solaris is broken |
225 |
- [[ ${CHOST} == sparc-*-solaris* ]] && \ |
226 |
- export ac_cv_flock_decl=no |
227 |
- |
228 |
- local myeconfargs=( |
229 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
230 |
- # Python on glibc upgrade, remove it proactively to give |
231 |
- # a chance for users rebuilding python before glibc |
232 |
- # except on non-glibc systems this breaks the build, so be |
233 |
- # conservative! |
234 |
- $(use elibc_glibc && echo ac_cv_header_stropts_h=no) |
235 |
- |
236 |
- $(use aqua && echo --config-cache) |
237 |
- --enable-shared |
238 |
- $(use_enable ipv6) |
239 |
- --infodir='${prefix}/share/info' |
240 |
- --mandir='${prefix}/share/man' |
241 |
- --with-computed-gotos |
242 |
- --with-dbmliborder="${dbmliborder}" |
243 |
- --with-libc= |
244 |
- --enable-loadable-sqlite-extensions |
245 |
- --without-ensurepip |
246 |
- --with-system-expat |
247 |
- --with-system-ffi |
248 |
- ) |
249 |
- |
250 |
- OPT="" econf "${myeconfargs[@]}" |
251 |
-} |
252 |
- |
253 |
-src_compile() { |
254 |
- # Ensure sed works as expected |
255 |
- # https://bugs.gentoo.org/594768 |
256 |
- local -x LC_ALL=C |
257 |
- |
258 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
259 |
- |
260 |
- # Work around bug 329499. See also bug 413751 and 457194. |
261 |
- if has_version dev-libs/libffi[pax_kernel]; then |
262 |
- pax-mark E python |
263 |
- else |
264 |
- pax-mark m python |
265 |
- fi |
266 |
-} |
267 |
- |
268 |
-src_test() { |
269 |
- # Tests will not work when cross compiling. |
270 |
- if tc-is-cross-compiler; then |
271 |
- elog "Disabling tests due to crosscompiling." |
272 |
- return |
273 |
- fi |
274 |
- |
275 |
- # Skip failing tests. |
276 |
- local skipped_tests="gdb" |
277 |
- |
278 |
- for test in ${skipped_tests}; do |
279 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
280 |
- done |
281 |
- |
282 |
- # bug 660358 |
283 |
- local -x COLUMNS=80 |
284 |
- local -x PYTHONDONTWRITEBYTECODE= |
285 |
- |
286 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
287 |
- |
288 |
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
289 |
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
290 |
- local result=$? |
291 |
- |
292 |
- for test in ${skipped_tests}; do |
293 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
294 |
- done |
295 |
- |
296 |
- elog "The following tests have been skipped:" |
297 |
- for test in ${skipped_tests}; do |
298 |
- elog "test_${test}.py" |
299 |
- done |
300 |
- |
301 |
- elog "If you would like to run them, you may:" |
302 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
303 |
- elog "and run the tests separately." |
304 |
- |
305 |
- if [[ ${result} -ne 0 ]]; then |
306 |
- die "emake test failed" |
307 |
- fi |
308 |
-} |
309 |
- |
310 |
-src_install() { |
311 |
- local libdir=${ED}/usr/lib/python${PYVER} |
312 |
- |
313 |
- emake DESTDIR="${D}" altinstall |
314 |
- |
315 |
- if use aqua ; then |
316 |
- # avoid config.status to be triggered |
317 |
- find Mac -name "Makefile" -exec touch \{\} + || die |
318 |
- |
319 |
- # Python_Launcher is kind of a wrapper, and we should fix it for |
320 |
- # Prefix (it uses /usr/bin/pythonw) so useless |
321 |
- # IDLE doesn't run, no idea, but definitely not used |
322 |
- emake DESTDIR="${D}" -C Mac install_Python || die |
323 |
- rmdir "${ED}"/Applications/Python* || die |
324 |
- rmdir "${ED}"/Applications || die |
325 |
- |
326 |
- local fwdir=/Frameworks/Python.framework/Versions/${PYVER} |
327 |
- ln -s "${EPREFIX}"/usr/include/python${PYVER} \ |
328 |
- "${ED}${fwdir}"/Headers || die |
329 |
- ln -s "${EPREFIX}"/usr/lib/libpython${PYVER}.dylib \ |
330 |
- "${ED}${fwdir}"/Python || die |
331 |
- fi |
332 |
- |
333 |
- # Remove static library |
334 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
335 |
- |
336 |
- sed \ |
337 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
338 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
339 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
340 |
- |
341 |
- # Fix collisions between different slots of Python. |
342 |
- rm -f "${ED}/usr/$(get_libdir)/libpython3$(get_libname)" || die |
343 |
- |
344 |
- # Cheap hack to get version with ABIFLAGS |
345 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
346 |
- if [[ ${abiver} != python${PYVER} ]]; then |
347 |
- # Replace python3.X with a symlink to python3.Xm |
348 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
349 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
350 |
- # Create python3.X-config symlink |
351 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
352 |
- # Create python-3.5m.pc symlink |
353 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
354 |
- fi |
355 |
- |
356 |
- # python seems to get rebuilt in src_install (bug 569908) |
357 |
- # Work around it for now. |
358 |
- if has_version dev-libs/libffi[pax_kernel]; then |
359 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
360 |
- else |
361 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
362 |
- fi |
363 |
- |
364 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
365 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
366 |
- |
367 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
368 |
- |
369 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
370 |
- |
371 |
- if use examples; then |
372 |
- docinto examples |
373 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
374 |
- dodoc -r Tools |
375 |
- fi |
376 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
377 |
- if use aqua ; then |
378 |
- # we do framework, so the emake trick below returns a pathname |
379 |
- # since that won't work here, use a (cheap) trick instead |
380 |
- local libname=libpython${PYVER} |
381 |
- else |
382 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
383 |
- emake --no-print-directory -s -f - 2>/dev/null) |
384 |
- fi |
385 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
386 |
- |
387 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
388 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
389 |
- sed \ |
390 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
391 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
392 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
393 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
394 |
- |
395 |
- local -x EPYTHON=python${PYVER} |
396 |
- # if not using a cross-compiler, use the fresh binary |
397 |
- if ! tc-is-cross-compiler; then |
398 |
- local -x PYTHON=./python$(sed -n '/BUILDEXE=/s/^.*=\s\+//p' Makefile) |
399 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
400 |
- local -x DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${PWD} |
401 |
- else |
402 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
403 |
- fi |
404 |
- |
405 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
406 |
- python_domodule epython.py |
407 |
- |
408 |
- # python-exec wrapping support |
409 |
- local pymajor=${PYVER%.*} |
410 |
- local scriptdir=${D}$(python_get_scriptdir) |
411 |
- mkdir -p "${scriptdir}" || die |
412 |
- # python and pythonX |
413 |
- ln -s "../../../bin/${abiver}" \ |
414 |
- "${scriptdir}/python${pymajor}" || die |
415 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
416 |
- # python-config and pythonX-config |
417 |
- # note: we need to create a wrapper rather than symlinking it due |
418 |
- # to some random dirname(argv[0]) magic performed by python-config |
419 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
420 |
- #!/bin/sh |
421 |
- exec "${abiver}-config" "\${@}" |
422 |
- EOF |
423 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
424 |
- ln -s "python${pymajor}-config" \ |
425 |
- "${scriptdir}/python-config" || die |
426 |
- # 2to3, pydoc |
427 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
428 |
- "${scriptdir}/2to3" || die |
429 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
430 |
- "${scriptdir}/pydoc" || die |
431 |
- # idle |
432 |
- if use tk; then |
433 |
- ln -s "../../../bin/idle${PYVER}" \ |
434 |
- "${scriptdir}/idle" || die |
435 |
- fi |
436 |
-} |
437 |
|
438 |
diff --git a/dev-lang/python/python-3.9.1_p2.ebuild b/dev-lang/python/python-3.9.1_p2.ebuild |
439 |
deleted file mode 100644 |
440 |
index e3f0b02d15..0000000000 |
441 |
--- a/dev-lang/python/python-3.9.1_p2.ebuild |
442 |
+++ /dev/null |
443 |
@@ -1,389 +0,0 @@ |
444 |
-# Copyright 1999-2021 Gentoo Authors |
445 |
-# Distributed under the terms of the GNU General Public License v2 |
446 |
- |
447 |
-EAPI="7" |
448 |
-WANT_LIBTOOL="none" |
449 |
- |
450 |
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ |
451 |
- python-utils-r1 toolchain-funcs |
452 |
- |
453 |
-MY_P="Python-${PV%_p*}" |
454 |
-PYVER=$(ver_cut 1-2) |
455 |
-PATCHSET="python-gentoo-patches-${PV}" |
456 |
-PREFIX_PATCHSET="python-prefix-gentoo-${PV%_p*}-patches-r2" |
457 |
- |
458 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
459 |
-HOMEPAGE="https://www.python.org/" |
460 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
461 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
462 |
- https://dev.gentoo.org/~grobian/distfiles/${PREFIX_PATCHSET}.tar.xz" |
463 |
-S="${WORKDIR}/${MY_P}" |
464 |
- |
465 |
-LICENSE="PSF-2" |
466 |
-SLOT="${PYVER}" |
467 |
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
468 |
-IUSE="aqua bluetooth build examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl test tk +xml" |
469 |
-RESTRICT="!test? ( test )" |
470 |
- |
471 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
472 |
-# If you need to apply a patch which requires python for bootstrapping, please |
473 |
-# run the bootstrap code on your dev box and include the results in the |
474 |
-# patchset. See bug 447752. |
475 |
- |
476 |
-RDEPEND="app-arch/bzip2:= |
477 |
- app-arch/xz-utils:= |
478 |
- dev-libs/libffi:= |
479 |
- kernel_linux? ( sys-apps/util-linux:= ) |
480 |
- >=sys-libs/zlib-1.1.3:= |
481 |
- virtual/libcrypt:= |
482 |
- virtual/libintl |
483 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
484 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
485 |
- readline? ( >=sys-libs/readline-4.1:= ) |
486 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
487 |
- ssl? ( dev-libs/openssl:= ) |
488 |
- tk? ( |
489 |
- >=dev-lang/tcl-8.0:= |
490 |
- >=dev-lang/tk-8.0:= |
491 |
- dev-tcltk/blt:= |
492 |
- dev-tcltk/tix |
493 |
- ) |
494 |
- xml? ( >=dev-libs/expat-2.1:= )" |
495 |
-# bluetooth requires headers from bluez |
496 |
-DEPEND="${RDEPEND} |
497 |
- bluetooth? ( net-wireless/bluez ) |
498 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
499 |
- virtual/pkgconfig |
500 |
- !sys-devel/gcc[libffi(-)]" |
501 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
502 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
503 |
- |
504 |
-# large file tests involve a 2.5G file being copied (duplicated) |
505 |
-CHECKREQS_DISK_BUILD=5500M |
506 |
- |
507 |
-pkg_pretend() { |
508 |
- use test && check-reqs_pkg_pretend |
509 |
-} |
510 |
- |
511 |
-pkg_setup() { |
512 |
- use test && check-reqs_pkg_setup |
513 |
-} |
514 |
- |
515 |
-src_prepare() { |
516 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
517 |
- rm -fr Modules/expat || die |
518 |
- rm -fr Modules/_ctypes/libffi* || die |
519 |
- rm -fr Modules/zlib || die |
520 |
- |
521 |
- local PATCHES=( |
522 |
- "${WORKDIR}/${PATCHSET}" |
523 |
- # Prefix' round of patches |
524 |
- "${WORKDIR}"/${PREFIX_PATCHSET} |
525 |
- ) |
526 |
- |
527 |
- default |
528 |
- |
529 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
530 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
531 |
- |
532 |
- # force correct number of jobs |
533 |
- # https://bugs.gentoo.org/737660 |
534 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
535 |
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die |
536 |
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
537 |
- |
538 |
- # workaround a problem on ppc-macos with >=GCC-8 where dtoa gets |
539 |
- # miscompiled when optimisation is being used |
540 |
- if [[ ${CHOST} == powerpc*-darwin* ]] && \ |
541 |
- tc-is-gcc && [[ $(gcc-major-version) -ge 8 ]] ; |
542 |
- then |
543 |
- sed -i \ |
544 |
- -e '/^CFLAGS_ALIASING=/s/$/ -fno-tree-ter/' Makefile.pre.in || die |
545 |
- fi |
546 |
- |
547 |
- # Darwin 9's kqueue seems to act up (at least at this stage), so |
548 |
- # make Python's selectors resort to poll() or select() |
549 |
- if [[ ${CHOST} == powerpc*-darwin9 ]] ; then |
550 |
- sed -i \ |
551 |
- -e 's/KQUEUE/KQUEUE_DISABLED/' \ |
552 |
- configure.ac configure || die |
553 |
- fi |
554 |
- |
555 |
- eautoreconf |
556 |
-} |
557 |
- |
558 |
-src_configure() { |
559 |
- local disable |
560 |
- # disable automagic bluetooth headers detection |
561 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
562 |
- use gdbm || disable+=" gdbm" |
563 |
- use ncurses || disable+=" _curses _curses_panel" |
564 |
- use readline || disable+=" readline" |
565 |
- use sqlite || disable+=" _sqlite3" |
566 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
567 |
- use tk || disable+=" _tkinter" |
568 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
569 |
- export PYTHON_DISABLE_MODULES="${disable}" |
570 |
- |
571 |
- if ! use xml; then |
572 |
- ewarn "You have configured Python without XML support." |
573 |
- ewarn "This is NOT a recommended configuration as you" |
574 |
- ewarn "may face problems parsing any XML documents." |
575 |
- fi |
576 |
- |
577 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
578 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
579 |
- fi |
580 |
- |
581 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
582 |
- append-flags -fwrapv |
583 |
- fi |
584 |
- |
585 |
- filter-flags -malign-double |
586 |
- |
587 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
588 |
- if is-flagq -O3; then |
589 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
590 |
- use hardened && replace-flags -O3 -O2 |
591 |
- fi |
592 |
- |
593 |
- # https://bugs.gentoo.org/700012 |
594 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
595 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
596 |
- fi |
597 |
- |
598 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
599 |
- tc-export CXX |
600 |
- |
601 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
602 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
603 |
- # Please query BSD team before removing this! |
604 |
- append-ldflags "-L." |
605 |
- |
606 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
607 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
608 |
- use prefix && append-ldflags -L"${ESYSROOT}"/lib -L"${ESYSROOT}"/usr/lib |
609 |
- |
610 |
- local dbmliborder |
611 |
- if use gdbm; then |
612 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
613 |
- fi |
614 |
- |
615 |
- if use aqua ; then |
616 |
- ECONF_SOURCE="${S}" OPT="" \ |
617 |
- econf \ |
618 |
- --enable-framework="${EPREFIX}" \ |
619 |
- --config-cache |
620 |
- fi |
621 |
- |
622 |
- # flock on 32-bits sparc Solaris is broken |
623 |
- [[ ${CHOST} == sparc-*-solaris* ]] && \ |
624 |
- export ac_cv_flock_decl=no |
625 |
- |
626 |
- local myeconfargs=( |
627 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
628 |
- # Python on glibc upgrade, remove it proactively to give |
629 |
- # a chance for users rebuilding python before glibc |
630 |
- # except on non-glibc systems this breaks the build, so be |
631 |
- # conservative! |
632 |
- $(use elibc_glibc && echo ac_cv_header_stropts_h=no) |
633 |
- |
634 |
- $(use aqua && echo --config-cache) |
635 |
- --enable-shared |
636 |
- $(use_enable ipv6) |
637 |
- --infodir='${prefix}/share/info' |
638 |
- --mandir='${prefix}/share/man' |
639 |
- --with-computed-gotos |
640 |
- --with-dbmliborder="${dbmliborder}" |
641 |
- --with-libc= |
642 |
- --enable-loadable-sqlite-extensions |
643 |
- --without-ensurepip |
644 |
- --with-system-expat |
645 |
- --with-system-ffi |
646 |
- ) |
647 |
- |
648 |
- OPT="" econf "${myeconfargs[@]}" |
649 |
-} |
650 |
- |
651 |
-src_compile() { |
652 |
- # Ensure sed works as expected |
653 |
- # https://bugs.gentoo.org/594768 |
654 |
- local -x LC_ALL=C |
655 |
- |
656 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
657 |
- |
658 |
- # Work around bug 329499. See also bug 413751 and 457194. |
659 |
- if has_version dev-libs/libffi[pax_kernel]; then |
660 |
- pax-mark E python |
661 |
- else |
662 |
- pax-mark m python |
663 |
- fi |
664 |
-} |
665 |
- |
666 |
-src_test() { |
667 |
- # Tests will not work when cross compiling. |
668 |
- if tc-is-cross-compiler; then |
669 |
- elog "Disabling tests due to crosscompiling." |
670 |
- return |
671 |
- fi |
672 |
- |
673 |
- # Skip failing tests. |
674 |
- local skipped_tests="gdb" |
675 |
- |
676 |
- for test in ${skipped_tests}; do |
677 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
678 |
- done |
679 |
- |
680 |
- # bug 660358 |
681 |
- local -x COLUMNS=80 |
682 |
- local -x PYTHONDONTWRITEBYTECODE= |
683 |
- |
684 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
685 |
- |
686 |
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
687 |
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
688 |
- local result=$? |
689 |
- |
690 |
- for test in ${skipped_tests}; do |
691 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
692 |
- done |
693 |
- |
694 |
- elog "The following tests have been skipped:" |
695 |
- for test in ${skipped_tests}; do |
696 |
- elog "test_${test}.py" |
697 |
- done |
698 |
- |
699 |
- elog "If you would like to run them, you may:" |
700 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
701 |
- elog "and run the tests separately." |
702 |
- |
703 |
- if [[ ${result} -ne 0 ]]; then |
704 |
- die "emake test failed" |
705 |
- fi |
706 |
-} |
707 |
- |
708 |
-src_install() { |
709 |
- local libdir=${ED}/usr/lib/python${PYVER} |
710 |
- |
711 |
- emake DESTDIR="${D}" altinstall |
712 |
- |
713 |
- if use aqua ; then |
714 |
- # avoid config.status to be triggered |
715 |
- find Mac -name "Makefile" -exec touch \{\} + || die |
716 |
- |
717 |
- # Python_Launcher is kind of a wrapper, and we should fix it for |
718 |
- # Prefix (it uses /usr/bin/pythonw) so useless |
719 |
- # IDLE doesn't run, no idea, but definitely not used |
720 |
- emake DESTDIR="${D}" -C Mac install_Python || die |
721 |
- rmdir "${ED}"/Applications/Python* || die |
722 |
- rmdir "${ED}"/Applications || die |
723 |
- |
724 |
- local fwdir=/Frameworks/Python.framework/Versions/${PYVER} |
725 |
- ln -s "${EPREFIX}"/usr/include/python${PYVER} \ |
726 |
- "${ED}${fwdir}"/Headers || die |
727 |
- ln -s "${EPREFIX}"/usr/lib/libpython${PYVER}.dylib \ |
728 |
- "${ED}${fwdir}"/Python || die |
729 |
- fi |
730 |
- |
731 |
- # Remove static library |
732 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
733 |
- |
734 |
- sed \ |
735 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
736 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
737 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
738 |
- |
739 |
- # Fix collisions between different slots of Python. |
740 |
- rm -f "${ED}/usr/$(get_libdir)/libpython3$(get_libname)" || die |
741 |
- |
742 |
- # Cheap hack to get version with ABIFLAGS |
743 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
744 |
- if [[ ${abiver} != python${PYVER} ]]; then |
745 |
- # Replace python3.X with a symlink to python3.Xm |
746 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
747 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
748 |
- # Create python3.X-config symlink |
749 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
750 |
- # Create python-3.5m.pc symlink |
751 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
752 |
- fi |
753 |
- |
754 |
- # python seems to get rebuilt in src_install (bug 569908) |
755 |
- # Work around it for now. |
756 |
- if has_version dev-libs/libffi[pax_kernel]; then |
757 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
758 |
- else |
759 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
760 |
- fi |
761 |
- |
762 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
763 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
764 |
- |
765 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
766 |
- |
767 |
- if use examples; then |
768 |
- docinto examples |
769 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
770 |
- dodoc -r Tools |
771 |
- fi |
772 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
773 |
- if use aqua ; then |
774 |
- # we do framework, so the emake trick below returns a pathname |
775 |
- # since that won't work here, use a (cheap) trick instead |
776 |
- local libname=libpython${PYVER} |
777 |
- else |
778 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
779 |
- emake --no-print-directory -s -f - 2>/dev/null) |
780 |
- fi |
781 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
782 |
- |
783 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
784 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
785 |
- sed \ |
786 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
787 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
788 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
789 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
790 |
- |
791 |
- local -x EPYTHON=python${PYVER} |
792 |
- # if not using a cross-compiler, use the fresh binary |
793 |
- if ! tc-is-cross-compiler; then |
794 |
- local -x PYTHON=./python$(sed -n '/BUILDEXE=/s/^.*=\s\+//p' Makefile) |
795 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
796 |
- local -x DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${PWD} |
797 |
- else |
798 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
799 |
- fi |
800 |
- |
801 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
802 |
- python_domodule epython.py |
803 |
- |
804 |
- # python-exec wrapping support |
805 |
- local pymajor=${PYVER%.*} |
806 |
- local scriptdir=${D}$(python_get_scriptdir) |
807 |
- mkdir -p "${scriptdir}" || die |
808 |
- # python and pythonX |
809 |
- ln -s "../../../bin/${abiver}" \ |
810 |
- "${scriptdir}/python${pymajor}" || die |
811 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
812 |
- # python-config and pythonX-config |
813 |
- # note: we need to create a wrapper rather than symlinking it due |
814 |
- # to some random dirname(argv[0]) magic performed by python-config |
815 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
816 |
- #!/bin/sh |
817 |
- exec "${abiver}-config" "\${@}" |
818 |
- EOF |
819 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
820 |
- ln -s "python${pymajor}-config" \ |
821 |
- "${scriptdir}/python-config" || die |
822 |
- # 2to3, pydoc |
823 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
824 |
- "${scriptdir}/2to3" || die |
825 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
826 |
- "${scriptdir}/pydoc" || die |
827 |
- # idle |
828 |
- if use tk; then |
829 |
- ln -s "../../../bin/idle${PYVER}" \ |
830 |
- "${scriptdir}/idle" || die |
831 |
- fi |
832 |
-} |
833 |
|
834 |
diff --git a/dev-lang/python/python-3.9.3.ebuild b/dev-lang/python/python-3.9.3.ebuild |
835 |
deleted file mode 100644 |
836 |
index 94dabce063..0000000000 |
837 |
--- a/dev-lang/python/python-3.9.3.ebuild |
838 |
+++ /dev/null |
839 |
@@ -1,406 +0,0 @@ |
840 |
-# Copyright 1999-2021 Gentoo Authors |
841 |
-# Distributed under the terms of the GNU General Public License v2 |
842 |
- |
843 |
-EAPI="7" |
844 |
-WANT_LIBTOOL="none" |
845 |
- |
846 |
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ |
847 |
- python-utils-r1 toolchain-funcs verify-sig |
848 |
- |
849 |
-MY_PV=${PV/_rc/rc} |
850 |
-MY_P="Python-${MY_PV%_p*}" |
851 |
-PYVER=$(ver_cut 1-2) |
852 |
-PATCHSET="python-gentoo-patches-${MY_PV}" |
853 |
-PREFIX_PATCHSET="python-prefix-gentoo-3.9.1-patches-r2" |
854 |
- |
855 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
856 |
-HOMEPAGE="https://www.python.org/" |
857 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
858 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
859 |
- https://dev.gentoo.org/~grobian/distfiles/${PREFIX_PATCHSET}.tar.xz |
860 |
- verify-sig? ( |
861 |
- https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc |
862 |
- )" |
863 |
-S="${WORKDIR}/${MY_P}" |
864 |
- |
865 |
-LICENSE="PSF-2" |
866 |
-SLOT="${PYVER}" |
867 |
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
868 |
-IUSE="aqua bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml" |
869 |
-RESTRICT="!test? ( test )" |
870 |
- |
871 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
872 |
-# If you need to apply a patch which requires python for bootstrapping, please |
873 |
-# run the bootstrap code on your dev box and include the results in the |
874 |
-# patchset. See bug 447752. |
875 |
- |
876 |
-RDEPEND="app-arch/bzip2:= |
877 |
- app-arch/xz-utils:= |
878 |
- dev-libs/libffi:= |
879 |
- kernel_linux? ( sys-apps/util-linux:= ) |
880 |
- >=sys-libs/zlib-1.1.3:= |
881 |
- virtual/libcrypt:= |
882 |
- virtual/libintl |
883 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
884 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
885 |
- readline? ( >=sys-libs/readline-4.1:= ) |
886 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
887 |
- ssl? ( dev-libs/openssl:= ) |
888 |
- tk? ( |
889 |
- >=dev-lang/tcl-8.0:= |
890 |
- >=dev-lang/tk-8.0:= |
891 |
- dev-tcltk/blt:= |
892 |
- dev-tcltk/tix |
893 |
- ) |
894 |
- xml? ( >=dev-libs/expat-2.1:= )" |
895 |
-# bluetooth requires headers from bluez |
896 |
-DEPEND="${RDEPEND} |
897 |
- bluetooth? ( net-wireless/bluez ) |
898 |
- test? ( app-arch/xz-utils[extra-filters(+)] )" |
899 |
-BDEPEND=" |
900 |
- virtual/pkgconfig |
901 |
- sys-devel/autoconf-archive |
902 |
- verify-sig? ( app-crypt/openpgp-keys-python ) |
903 |
- !sys-devel/gcc[libffi(-)]" |
904 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
905 |
-PDEPEND="app-eselect/eselect-python" |
906 |
- |
907 |
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc |
908 |
- |
909 |
-# large file tests involve a 2.5G file being copied (duplicated) |
910 |
-CHECKREQS_DISK_BUILD=5500M |
911 |
- |
912 |
-pkg_pretend() { |
913 |
- use test && check-reqs_pkg_pretend |
914 |
-} |
915 |
- |
916 |
-pkg_setup() { |
917 |
- use test && check-reqs_pkg_setup |
918 |
-} |
919 |
- |
920 |
-src_unpack() { |
921 |
- if use verify-sig; then |
922 |
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} |
923 |
- fi |
924 |
- default |
925 |
-} |
926 |
- |
927 |
-src_prepare() { |
928 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
929 |
- rm -fr Modules/expat || die |
930 |
- rm -fr Modules/_ctypes/libffi* || die |
931 |
- rm -fr Modules/zlib || die |
932 |
- |
933 |
- local PATCHES=( |
934 |
- "${WORKDIR}/${PATCHSET}" |
935 |
- # Prefix' round of patches |
936 |
- "${WORKDIR}"/${PREFIX_PATCHSET} |
937 |
- ) |
938 |
- |
939 |
- default |
940 |
- |
941 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
942 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
943 |
- |
944 |
- # force correct number of jobs |
945 |
- # https://bugs.gentoo.org/737660 |
946 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
947 |
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die |
948 |
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
949 |
- |
950 |
- # workaround a problem on ppc-macos with >=GCC-8 where dtoa gets |
951 |
- # miscompiled when optimisation is being used |
952 |
- if [[ ${CHOST} == powerpc*-darwin* ]] && \ |
953 |
- tc-is-gcc && [[ $(gcc-major-version) -ge 8 ]] ; |
954 |
- then |
955 |
- sed -i \ |
956 |
- -e '/^CFLAGS_ALIASING=/s/$/ -fno-tree-ter/' Makefile.pre.in || die |
957 |
- fi |
958 |
- |
959 |
- # Darwin 9's kqueue seems to act up (at least at this stage), so |
960 |
- # make Python's selectors resort to poll() or select() |
961 |
- if [[ ${CHOST} == powerpc*-darwin9 ]] ; then |
962 |
- sed -i \ |
963 |
- -e 's/KQUEUE/KQUEUE_DISABLED/' \ |
964 |
- configure.ac configure || die |
965 |
- fi |
966 |
- |
967 |
- eautoreconf |
968 |
-} |
969 |
- |
970 |
-src_configure() { |
971 |
- local disable |
972 |
- # disable automagic bluetooth headers detection |
973 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
974 |
- use gdbm || disable+=" gdbm" |
975 |
- use ncurses || disable+=" _curses _curses_panel" |
976 |
- use readline || disable+=" readline" |
977 |
- use sqlite || disable+=" _sqlite3" |
978 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
979 |
- use tk || disable+=" _tkinter" |
980 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
981 |
- export PYTHON_DISABLE_MODULES="${disable}" |
982 |
- |
983 |
- if ! use xml; then |
984 |
- ewarn "You have configured Python without XML support." |
985 |
- ewarn "This is NOT a recommended configuration as you" |
986 |
- ewarn "may face problems parsing any XML documents." |
987 |
- fi |
988 |
- |
989 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
990 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
991 |
- fi |
992 |
- |
993 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
994 |
- append-flags -fwrapv |
995 |
- fi |
996 |
- |
997 |
- filter-flags -malign-double |
998 |
- |
999 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
1000 |
- if is-flagq -O3; then |
1001 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
1002 |
- use hardened && replace-flags -O3 -O2 |
1003 |
- fi |
1004 |
- |
1005 |
- # https://bugs.gentoo.org/700012 |
1006 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
1007 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
1008 |
- fi |
1009 |
- |
1010 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
1011 |
- tc-export CXX |
1012 |
- |
1013 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
1014 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
1015 |
- use prefix && append-ldflags -L"${ESYSROOT}"/lib -L"${ESYSROOT}"/usr/lib |
1016 |
- |
1017 |
- local dbmliborder |
1018 |
- if use gdbm; then |
1019 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
1020 |
- fi |
1021 |
- |
1022 |
- if use aqua ; then |
1023 |
- ECONF_SOURCE="${S}" OPT="" \ |
1024 |
- econf \ |
1025 |
- --enable-framework="${EPREFIX}" \ |
1026 |
- --config-cache |
1027 |
- fi |
1028 |
- |
1029 |
- # flock on 32-bits sparc Solaris is broken |
1030 |
- [[ ${CHOST} == sparc-*-solaris* ]] && \ |
1031 |
- export ac_cv_flock_decl=no |
1032 |
- |
1033 |
- local myeconfargs=( |
1034 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
1035 |
- # Python on glibc upgrade, remove it proactively to give |
1036 |
- # a chance for users rebuilding python before glibc |
1037 |
- # except on non-glibc systems this breaks the build, so be |
1038 |
- # conservative! |
1039 |
- $(use elibc_glibc && echo ac_cv_header_stropts_h=no) |
1040 |
- |
1041 |
- $(use aqua && echo --config-cache) |
1042 |
- --enable-shared |
1043 |
- $(use_enable ipv6) |
1044 |
- --infodir='${prefix}/share/info' |
1045 |
- --mandir='${prefix}/share/man' |
1046 |
- --with-computed-gotos |
1047 |
- --with-dbmliborder="${dbmliborder}" |
1048 |
- --with-libc= |
1049 |
- --enable-loadable-sqlite-extensions |
1050 |
- --without-ensurepip |
1051 |
- --with-system-expat |
1052 |
- --with-system-ffi |
1053 |
- ) |
1054 |
- |
1055 |
- OPT="" econf "${myeconfargs[@]}" |
1056 |
- |
1057 |
- if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
1058 |
- eerror "configure has detected that the sem_open function is broken." |
1059 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
1060 |
- die "Broken sem_open function (bug 496328)" |
1061 |
- fi |
1062 |
-} |
1063 |
- |
1064 |
-src_compile() { |
1065 |
- # Ensure sed works as expected |
1066 |
- # https://bugs.gentoo.org/594768 |
1067 |
- local -x LC_ALL=C |
1068 |
- |
1069 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
1070 |
- |
1071 |
- # Work around bug 329499. See also bug 413751 and 457194. |
1072 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1073 |
- pax-mark E python |
1074 |
- else |
1075 |
- pax-mark m python |
1076 |
- fi |
1077 |
-} |
1078 |
- |
1079 |
-src_test() { |
1080 |
- # Tests will not work when cross compiling. |
1081 |
- if tc-is-cross-compiler; then |
1082 |
- elog "Disabling tests due to crosscompiling." |
1083 |
- return |
1084 |
- fi |
1085 |
- |
1086 |
- # Skip failing tests. |
1087 |
- local skipped_tests="gdb" |
1088 |
- |
1089 |
- for test in ${skipped_tests}; do |
1090 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
1091 |
- done |
1092 |
- |
1093 |
- # bug 660358 |
1094 |
- local -x COLUMNS=80 |
1095 |
- local -x PYTHONDONTWRITEBYTECODE= |
1096 |
- |
1097 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
1098 |
- |
1099 |
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
1100 |
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
1101 |
- local result=$? |
1102 |
- |
1103 |
- for test in ${skipped_tests}; do |
1104 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
1105 |
- done |
1106 |
- |
1107 |
- elog "The following tests have been skipped:" |
1108 |
- for test in ${skipped_tests}; do |
1109 |
- elog "test_${test}.py" |
1110 |
- done |
1111 |
- |
1112 |
- elog "If you would like to run them, you may:" |
1113 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
1114 |
- elog "and run the tests separately." |
1115 |
- |
1116 |
- if [[ ${result} -ne 0 ]]; then |
1117 |
- die "emake test failed" |
1118 |
- fi |
1119 |
-} |
1120 |
- |
1121 |
-src_install() { |
1122 |
- local libdir=${ED}/usr/lib/python${PYVER} |
1123 |
- |
1124 |
- emake DESTDIR="${D}" altinstall |
1125 |
- |
1126 |
- if use aqua ; then |
1127 |
- # avoid config.status to be triggered |
1128 |
- find Mac -name "Makefile" -exec touch \{\} + || die |
1129 |
- |
1130 |
- # Python_Launcher is kind of a wrapper, and we should fix it for |
1131 |
- # Prefix (it uses /usr/bin/pythonw) so useless |
1132 |
- # IDLE doesn't run, no idea, but definitely not used |
1133 |
- emake DESTDIR="${D}" -C Mac install_Python || die |
1134 |
- rmdir "${ED}"/Applications/Python* || die |
1135 |
- rmdir "${ED}"/Applications || die |
1136 |
- |
1137 |
- local fwdir=/Frameworks/Python.framework/Versions/${PYVER} |
1138 |
- ln -s "${EPREFIX}"/usr/include/python${PYVER} \ |
1139 |
- "${ED}${fwdir}"/Headers || die |
1140 |
- ln -s "${EPREFIX}"/usr/lib/libpython${PYVER}.dylib \ |
1141 |
- "${ED}${fwdir}"/Python || die |
1142 |
- fi |
1143 |
- |
1144 |
- # Remove static library |
1145 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
1146 |
- |
1147 |
- sed \ |
1148 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1149 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1150 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1151 |
- |
1152 |
- # Fix collisions between different slots of Python. |
1153 |
- rm -f "${ED}/usr/$(get_libdir)/libpython3$(get_libname)" || die |
1154 |
- |
1155 |
- # Cheap hack to get version with ABIFLAGS |
1156 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
1157 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1158 |
- # Replace python3.X with a symlink to python3.Xm |
1159 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
1160 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1161 |
- # Create python3.X-config symlink |
1162 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1163 |
- # Create python-3.5m.pc symlink |
1164 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1165 |
- fi |
1166 |
- |
1167 |
- # python seems to get rebuilt in src_install (bug 569908) |
1168 |
- # Work around it for now. |
1169 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1170 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
1171 |
- else |
1172 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
1173 |
- fi |
1174 |
- |
1175 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
1176 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
1177 |
- |
1178 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
1179 |
- |
1180 |
- if use examples; then |
1181 |
- docinto examples |
1182 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
1183 |
- dodoc -r Tools |
1184 |
- fi |
1185 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1186 |
- if use aqua ; then |
1187 |
- # we do framework, so the emake trick below returns a pathname |
1188 |
- # since that won't work here, use a (cheap) trick instead |
1189 |
- local libname=libpython${PYVER} |
1190 |
- else |
1191 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1192 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1193 |
- fi |
1194 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1195 |
- |
1196 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1197 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1198 |
- sed \ |
1199 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1200 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1201 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
1202 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1203 |
- |
1204 |
- local -x EPYTHON=python${PYVER} |
1205 |
- # if not using a cross-compiler, use the fresh binary |
1206 |
- if ! tc-is-cross-compiler; then |
1207 |
- local -x PYTHON=./python$(sed -n '/BUILDEXE=/s/^.*=\s\+//p' Makefile) |
1208 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1209 |
- local -x DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${PWD} |
1210 |
- else |
1211 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
1212 |
- fi |
1213 |
- |
1214 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1215 |
- python_domodule epython.py |
1216 |
- |
1217 |
- # python-exec wrapping support |
1218 |
- local pymajor=${PYVER%.*} |
1219 |
- local scriptdir=${D}$(python_get_scriptdir) |
1220 |
- mkdir -p "${scriptdir}" || die |
1221 |
- # python and pythonX |
1222 |
- ln -s "../../../bin/${abiver}" \ |
1223 |
- "${scriptdir}/python${pymajor}" || die |
1224 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
1225 |
- # python-config and pythonX-config |
1226 |
- # note: we need to create a wrapper rather than symlinking it due |
1227 |
- # to some random dirname(argv[0]) magic performed by python-config |
1228 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
1229 |
- #!/bin/sh |
1230 |
- exec "${abiver}-config" "\${@}" |
1231 |
- EOF |
1232 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
1233 |
- ln -s "python${pymajor}-config" \ |
1234 |
- "${scriptdir}/python-config" || die |
1235 |
- # 2to3, pydoc |
1236 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1237 |
- "${scriptdir}/2to3" || die |
1238 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1239 |
- "${scriptdir}/pydoc" || die |
1240 |
- # idle |
1241 |
- if use tk; then |
1242 |
- ln -s "../../../bin/idle${PYVER}" \ |
1243 |
- "${scriptdir}/idle" || die |
1244 |
- fi |
1245 |
-} |