1 |
commit: 133e641abdc5b919065a5f3dc049955f03f423ec |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 1 20:36:57 2021 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 1 20:36:57 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=133e641a |
7 |
|
8 |
dev-lang/python-3.9.1: slot bump |
9 |
|
10 |
Closes: https://bugs.gentoo.org/760135 |
11 |
Package-Manager: Portage-3.0.12-prefix, Repoman-3.0.2 |
12 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
13 |
|
14 |
dev-lang/python/Manifest | 3 + |
15 |
dev-lang/python/python-3.9.1.ebuild | 409 ++++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 412 insertions(+) |
17 |
|
18 |
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest |
19 |
index 045a9e220c..bee0dc0408 100644 |
20 |
--- a/dev-lang/python/Manifest |
21 |
+++ b/dev-lang/python/Manifest |
22 |
@@ -2,13 +2,16 @@ DIST Python-2.7.16.tar.xz 12752104 BLAKE2B 7d6b5b853f9974d44e04dd35ecdffaab87511 |
23 |
DIST Python-3.7.8.tar.xz 17399552 BLAKE2B 4bf6c47b1132b6d31a79232002c4d38e2cd123ac05d52b21d6bfba5a4e19ec9130b8df8698d5ce6627e4297c4cf756643f036e694e36364c235306c72ef34bf8 SHA512 d2ba299e3cf8ed0f8fed9317f42bcd8d9af7e0e6175939b4be1be289c1658418bed17899e2608d762ffb15575021956cf6bf2054d7863c04b3bd7642f5b8c7ea |
24 |
DIST Python-3.8.6.tar.xz 18233864 BLAKE2B c8a8ef6055e344dda30eb808804cfa62016b4f840257cffd5a495e5932f5696e50579d49b8181a487c9cd4a89bdb95656e80981039783a21d20f7980aa2c9883 SHA512 22faec84f6e172e1ac7c6bd6fd37e9b6ae4afc91cf5136aa8cac8ebbed8d18793f9196e8749b8ccc43447cb6c41cb450f65ea72dd363c06dfaeb14e0455f5560 |
25 |
DIST Python-3.8.7.tar.xz 18261096 BLAKE2B 6ac20efef41e828cb796aabcb7808400d494b9b48759950c8c15ee90762394f6763163d8e37ab407c1c79ebb9cda09189eaa969a75f96c86a96ccee962443924 SHA512 6a27d8eab3076930df46b0cf127f9b664f8d4147349b2b98132f464deb7f69d87e0167e8ee8e6c64249125ad73760d965ecbc81c252b63a1e7aac95594c62b74 |
26 |
+DIST Python-3.9.1.tar.xz 18897104 BLAKE2B bcbce176510e8e7c6ba6070588bedc52121c21c5271f59b3d629dfb542c51ee62622b2ca53a6e2041f1a51b2d089368cc4de9bb749e8ebad9a2c4eb4de83538e SHA512 b90029d6825751685983e9dcf0e0ec9e46f18e6c7d37b0dd7a245a94316f8c0090308ad7c2b2b49ed2514b0b909177231dd5bcad03031bf4624e37136fcf8019 |
27 |
DIST python-gentoo-patches-2.7.16.tar.xz 13904 BLAKE2B 218b46f8656f4a792dcd47eabca6d59a1558276b77676544991ee75914cd76dda84c36f43e72e477b850dd4cb52374d289f20dccd244a3b52ae5debaf3363432 SHA512 83f90545231c663a34c6925352a357a2b15997ac0362578a1893304c5070b5251922585ae8bc1bafb68d306bcddd4cdba4b6406648d473bd3e980eef65fe3ecd |
28 |
DIST python-gentoo-patches-3.7.8-r3.tar.xz 13232 BLAKE2B 9df47b1f61d08f62a80221bc48d73ec27cd74a9ade8219912c5b02eaea919b70d91b1154837cd03c0129a5839186e9c970167ca3398129c044c25c7853f1f920 SHA512 e1477d425cb6125ca2286d816f4aa4e9e3c789d6a4f4907bd7b78549598356cae5766f642e2cad9e7c3abe2e82c12cf3cb7db3513be68aa213cb64cc0abc678a |
29 |
DIST python-gentoo-patches-3.8.6-r1.tar.xz 15880 BLAKE2B 9a08cd23af56bcc2ed0dffe4850698be6e0bcf7c44d3eafeb250e328a93833dc3e9ce084f1be89450d1e123cd72d81c6271edfe34046d1bab3d7c10a98d0d9c5 SHA512 83474915cab0928d1d2f4229832bef7c093b2943770fa900a7445bfaa633544f50791aa8b4bc4191662af56feef166814d98eb6fad2c0a0eb9db1f8f4806e689 |
30 |
DIST python-gentoo-patches-3.8.6.tar.xz 10956 BLAKE2B e3241d97f886d0a37f85735102db8f00902df59ee12e8501b6c7f549dd4b26a6289bf34ff8dba02b369ed7875fad3d18e177afe9e367db4cb06f2ee908482f9e SHA512 7afa8e54f7b7e6ab35edc16d4214384b8ad8a03068d1984656876d6477b278af931e8c797d03d1bed2f10f9d58ac387db1a43921e54fb17cf4b779f33820abc0 |
31 |
+DIST python-gentoo-patches-3.9.0rc1.tar.xz 8856 BLAKE2B 7bd032dfd047640c6a53633b5b9ee7b24199106b985230f772dda978d3b79fe0406eea64c4a842603a20afb71a90469befa7ec59a5ef1f793e4c901aa85952d1 SHA512 85a7d4397abf2a0f3c3d07a94a3e184ba3dcb347f3b70ee2cb77e81aac63846b01323a0228afd0fd1d32b3cafb64b18f82e6f5bfd88e4d564261ddae11e747eb |
32 |
DIST python-prefix-2.7.16-gentoo-patches-r0.tar.xz 14636 BLAKE2B 54320f5197bb7adeca1e7c97447253e6535a11f380b6d66bc2ce46fa671fe23697aced8fd5619633a00e3ea19ae9dbc3ffe2981173d83dcab6b447d514555c43 SHA512 5380d9b92eb81603ec4d60ff9c940a3a061c06bd6f593d5837e600da5d4417b529d20d98d758aa95cef18fac10bdb5c33f90fa943deb15fdaf048492cf286581 |
33 |
DIST python-prefix-gentoo-3.7.8-patches-r0.tar.xz 13068 BLAKE2B 32e8baf8a0d5bdcb973ba880dbc35a3bd5c6cba88bf2f647e18fc4839fe8bae94658e403e050bcecc5dd5ddadf5beaf8a489829bc2835589d77b968628c29233 SHA512 1a7c17424edc43b36867d45ac019f48734444328bf17b5eddd07a2b63ef26e74147dea83e1286a9e45372acc85640a8d72fed33cbe551170acd785fe12b43d74 |
34 |
DIST python-prefix-gentoo-3.8.6-patches-r2.tar.xz 8132 BLAKE2B 07b2fed42257a89612c2f402e1adadaef171d483f7f28b85a5a9548713406ad97267a5df6ce39f0e363f76850266292d4b7c43854ef6067e09758d8939411131 SHA512 505f4ade99e4c5ca3f6bef84bc1c97e7197d5b5d6ed4229823df1d142ce00241a7f0f0c336bd01065e4834919dc162ec6797d5272a3c753e0507663eb9b6a94c |
35 |
DIST python-prefix-gentoo-3.8.7-patches-r0.tar.xz 7856 BLAKE2B b392e61e4188076f6e6458b658f98231a06add0ed9e4c24c2e1e4eb426572c9af22ac0d89bcade83c3aa7193d00503334271f8949bbee80a526f792540c5e5be SHA512 7f50c8ffb0970a74911a38081aeef9404025725fe0a6fc44284737e1381701a3f69016535e5009b11804ad553e1de6f2bc715427079fc62cd14d82f86d3b0948 |
36 |
+DIST python-prefix-gentoo-3.9.1-patches-r0.tar.xz 7636 BLAKE2B 8a1fc37ea12fe1eb39dbc4038d4a91fa06a74c2f786b358aec1b2dc77cdd7a7ef568c4b0cf420168151c7cbc2dd2a4e1438f69c1774ac326b44c679c7c049768 SHA512 43f547ea4151d4caa93f5f9d2842244af86054060a4e76c6c565f8c20adb9292325b4e1bc0c8355e043a46c841f1f030d6beffa32c79f57bd2de472cb4cb5056 |
37 |
DIST python2-cygwinports-7be648659ef46f33db6913ca0ca5a809219d5629.zip 9199 BLAKE2B 85803bc1677bd16650cb5fc4a2c54fdac0228326f25cfba4fcd098ac9d689312d3e0dde6fca57f720d5235361d6462461cf018325c23fda9139e0f1683055aff SHA512 cabc21d2d7379daf1f4bafe7ab00b70e5b4f707d3102496b96ff0dfdced26347097ad771c69e0b9488b7c54b1ef36f9bc019bee72f1ffcbb55dcd0e71095edfe |
38 |
DIST python37-cygwinports-6df749d21f131eeafa485d40eb1294b28d30ba6a.tar.gz 8102 BLAKE2B 7331142fc9c2fd71e5ec5ae45d6aaebe8e39430b5719d01a673966a5ba10b344bba924d6f7f05cc444cedbf28b11cef2db1c2613ebf45fcceb90354895b9b42c SHA512 da669c3a518af73c4caa7c9cc35af2fd971f98e7ba9b91ae0223b2f031e74acc70644fb2411ad5a8d4b39e2c449b5c256bea4877d957030cb81c0d08e84b38dd |
39 |
|
40 |
diff --git a/dev-lang/python/python-3.9.1.ebuild b/dev-lang/python/python-3.9.1.ebuild |
41 |
new file mode 100644 |
42 |
index 0000000000..5ba405b9a9 |
43 |
--- /dev/null |
44 |
+++ b/dev-lang/python/python-3.9.1.ebuild |
45 |
@@ -0,0 +1,409 @@ |
46 |
+# Copyright 1999-2021 Gentoo Authors |
47 |
+# Distributed under the terms of the GNU General Public License v2 |
48 |
+ |
49 |
+EAPI="7" |
50 |
+WANT_LIBTOOL="none" |
51 |
+ |
52 |
+inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ |
53 |
+ python-utils-r1 toolchain-funcs |
54 |
+ |
55 |
+MY_P="Python-${PV/_/}" |
56 |
+PYVER=$(ver_cut 1-2) |
57 |
+PATCHSET="python-gentoo-patches-3.9.0rc1" |
58 |
+PREFIX_PATCHSET="python-prefix-gentoo-${PV}-patches-r0" |
59 |
+ |
60 |
+DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
61 |
+HOMEPAGE="https://www.python.org/" |
62 |
+SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
63 |
+ https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
64 |
+ https://dev.gentoo.org/~grobian/distfiles/${PREFIX_PATCHSET}.tar.xz" |
65 |
+S="${WORKDIR}/${MY_P}" |
66 |
+ |
67 |
+LICENSE="PSF-2" |
68 |
+SLOT="${PYVER}" |
69 |
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
70 |
+IUSE="aqua bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk +xml" |
71 |
+RESTRICT="!test? ( test )" |
72 |
+ |
73 |
+# Do not add a dependency on dev-lang/python to this ebuild. |
74 |
+# If you need to apply a patch which requires python for bootstrapping, please |
75 |
+# run the bootstrap code on your dev box and include the results in the |
76 |
+# patchset. See bug 447752. |
77 |
+ |
78 |
+RDEPEND="app-arch/bzip2:= |
79 |
+ app-arch/xz-utils:= |
80 |
+ dev-libs/libffi:= |
81 |
+ kernel_linux? ( sys-apps/util-linux:= ) |
82 |
+ >=sys-libs/zlib-1.1.3:= |
83 |
+ virtual/libcrypt:= |
84 |
+ virtual/libintl |
85 |
+ gdbm? ( sys-libs/gdbm:=[berkdb] ) |
86 |
+ ncurses? ( >=sys-libs/ncurses-5.2:= ) |
87 |
+ readline? ( >=sys-libs/readline-4.1:= ) |
88 |
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
89 |
+ ssl? ( |
90 |
+ !libressl? ( dev-libs/openssl:= ) |
91 |
+ libressl? ( dev-libs/libressl:= ) |
92 |
+ ) |
93 |
+ tk? ( |
94 |
+ >=dev-lang/tcl-8.0:= |
95 |
+ >=dev-lang/tk-8.0:= |
96 |
+ dev-tcltk/blt:= |
97 |
+ dev-tcltk/tix |
98 |
+ ) |
99 |
+ xml? ( >=dev-libs/expat-2.1:= )" |
100 |
+# bluetooth requires headers from bluez |
101 |
+DEPEND="${RDEPEND} |
102 |
+ bluetooth? ( net-wireless/bluez ) |
103 |
+ test? ( app-arch/xz-utils[extra-filters(+)] ) |
104 |
+ virtual/pkgconfig |
105 |
+ !sys-devel/gcc[libffi(-)]" |
106 |
+RDEPEND+=" !build? ( app-misc/mime-types )" |
107 |
+PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
108 |
+ |
109 |
+# large file tests involve a 2.5G file being copied (duplicated) |
110 |
+CHECKREQS_DISK_BUILD=5500M |
111 |
+ |
112 |
+pkg_pretend() { |
113 |
+ use test && check-reqs_pkg_pretend |
114 |
+} |
115 |
+ |
116 |
+pkg_setup() { |
117 |
+ use test && check-reqs_pkg_setup |
118 |
+} |
119 |
+ |
120 |
+src_prepare() { |
121 |
+ # Ensure that internal copies of expat, libffi and zlib are not used. |
122 |
+ rm -fr Modules/expat || die |
123 |
+ rm -fr Modules/_ctypes/libffi* || die |
124 |
+ rm -fr Modules/zlib || die |
125 |
+ |
126 |
+ local PATCHES=( |
127 |
+ "${WORKDIR}/${PATCHSET}" |
128 |
+ # Prefix' round of patches |
129 |
+ "${WORKDIR}"/${PREFIX_PATCHSET} |
130 |
+ ) |
131 |
+ |
132 |
+ default |
133 |
+ |
134 |
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
135 |
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
136 |
+ |
137 |
+ # force correct number of jobs |
138 |
+ # https://bugs.gentoo.org/737660 |
139 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
140 |
+ sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die |
141 |
+ sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
142 |
+ |
143 |
+ # workaround a problem on ppc-macos with >=GCC-8 where dtoa gets |
144 |
+ # miscompiled when optimisation is being used |
145 |
+ if [[ ${CHOST} == powerpc*-darwin* ]] && \ |
146 |
+ tc-is-gcc && [[ $(gcc-major-version) -ge 8 ]] ; |
147 |
+ then |
148 |
+ sed -i \ |
149 |
+ -e '/^CFLAGS_ALIASING=/s/$/ -fno-tree-ter/' Makefile.pre.in || die |
150 |
+ fi |
151 |
+ |
152 |
+ # Darwin 9's kqueue seems to act up (at least at this stage), so |
153 |
+ # make Python's selectors resort to poll() or select() |
154 |
+ if [[ ${CHOST} == powerpc*-darwin9 ]] ; then |
155 |
+ sed -i \ |
156 |
+ -e 's/KQUEUE/KQUEUE_DISABLED/' \ |
157 |
+ configure.ac configure || die |
158 |
+ fi |
159 |
+ |
160 |
+ # Python doesn't know about arm64-macos yet |
161 |
+ if [[ ${CHOST} == arm64-*-darwin* ]] ; then |
162 |
+ # Teach Python a new trick (arm64) |
163 |
+ sed -i \ |
164 |
+ -e "/Unexpected output of 'arch' on OSX/d" \ |
165 |
+ configure.ac configure || die |
166 |
+ fi |
167 |
+ |
168 |
+ # side-effect of disabling scproxy (see below), make sure we don't |
169 |
+ # try to use it on Darwin either |
170 |
+ sed -i -e '/sys.platform/s/darwin/disabled-darwin/' \ |
171 |
+ Lib/urllib/request.py || die |
172 |
+ |
173 |
+ # disable SDK usage on Darwin/macOS |
174 |
+ sed -i -e '/^MACOS = /s/darwin/no-darwin/' setup.py || die |
175 |
+ |
176 |
+ eautoreconf |
177 |
+} |
178 |
+ |
179 |
+src_configure() { |
180 |
+ local disable |
181 |
+ # disable automagic bluetooth headers detection |
182 |
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
183 |
+ use gdbm || disable+=" gdbm" |
184 |
+ use ncurses || disable+=" _curses _curses_panel" |
185 |
+ use readline || disable+=" readline" |
186 |
+ use sqlite || disable+=" _sqlite3" |
187 |
+ use ssl || export PYTHON_DISABLE_SSL="1" |
188 |
+ use tk || disable+=" _tkinter" |
189 |
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
190 |
+ [[ ${CHOST} == *-darwin* ]] && disable+=" _scproxy" # header issue |
191 |
+ export PYTHON_DISABLE_MODULES="${disable}" |
192 |
+ |
193 |
+ if ! use xml; then |
194 |
+ ewarn "You have configured Python without XML support." |
195 |
+ ewarn "This is NOT a recommended configuration as you" |
196 |
+ ewarn "may face problems parsing any XML documents." |
197 |
+ fi |
198 |
+ |
199 |
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
200 |
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
201 |
+ fi |
202 |
+ |
203 |
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then |
204 |
+ append-flags -fwrapv |
205 |
+ fi |
206 |
+ |
207 |
+ filter-flags -malign-double |
208 |
+ |
209 |
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
210 |
+ if is-flagq -O3; then |
211 |
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
212 |
+ use hardened && replace-flags -O3 -O2 |
213 |
+ fi |
214 |
+ |
215 |
+ # https://bugs.gentoo.org/700012 |
216 |
+ if is-flagq -flto || is-flagq '-flto=*'; then |
217 |
+ append-cflags $(test-flags-CC -ffat-lto-objects) |
218 |
+ fi |
219 |
+ |
220 |
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
221 |
+ tc-export CXX |
222 |
+ |
223 |
+ # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
224 |
+ # Needed on FreeBSD unless Python 3.2 is already installed. |
225 |
+ # Please query BSD team before removing this! |
226 |
+ append-ldflags "-L." |
227 |
+ |
228 |
+ # Fix implicit declarations on cross and prefix builds. Bug #674070. |
229 |
+ use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
230 |
+ use prefix && append-ldflags -L"${ESYSROOT}"/lib -L"${ESYSROOT}"/usr/lib |
231 |
+ |
232 |
+ local dbmliborder |
233 |
+ if use gdbm; then |
234 |
+ dbmliborder+="${dbmliborder:+:}gdbm" |
235 |
+ fi |
236 |
+ |
237 |
+ if use aqua ; then |
238 |
+ ECONF_SOURCE="${S}" OPT="" \ |
239 |
+ econf \ |
240 |
+ --enable-framework="${EPREFIX}" \ |
241 |
+ --config-cache |
242 |
+ fi |
243 |
+ |
244 |
+ # flock on 32-bits sparc Solaris is broken |
245 |
+ [[ ${CHOST} == sparc-*-solaris* ]] && \ |
246 |
+ export ac_cv_flock_decl=no |
247 |
+ |
248 |
+ local myeconfargs=( |
249 |
+ # glibc-2.30 removes it; since we can't cleanly force-rebuild |
250 |
+ # Python on glibc upgrade, remove it proactively to give |
251 |
+ # a chance for users rebuilding python before glibc |
252 |
+ # except on non-glibc systems this breaks the build, so be |
253 |
+ # conservative! |
254 |
+ $(use elibc_glibc && echo ac_cv_header_stropts_h=no) |
255 |
+ |
256 |
+ $(use aqua && echo --config-cache) |
257 |
+ --enable-shared |
258 |
+ $(use_enable ipv6) |
259 |
+ --infodir='${prefix}/share/info' |
260 |
+ --mandir='${prefix}/share/man' |
261 |
+ --with-computed-gotos |
262 |
+ --with-dbmliborder="${dbmliborder}" |
263 |
+ --with-libc= |
264 |
+ --enable-loadable-sqlite-extensions |
265 |
+ --without-ensurepip |
266 |
+ --with-system-expat |
267 |
+ --with-system-ffi |
268 |
+ ) |
269 |
+ |
270 |
+ OPT="" econf "${myeconfargs[@]}" |
271 |
+} |
272 |
+ |
273 |
+src_compile() { |
274 |
+ # Ensure sed works as expected |
275 |
+ # https://bugs.gentoo.org/594768 |
276 |
+ local -x LC_ALL=C |
277 |
+ |
278 |
+ emake CPPFLAGS= CFLAGS= LDFLAGS= |
279 |
+ |
280 |
+ # Work around bug 329499. See also bug 413751 and 457194. |
281 |
+ if has_version dev-libs/libffi[pax_kernel]; then |
282 |
+ pax-mark E python |
283 |
+ else |
284 |
+ pax-mark m python |
285 |
+ fi |
286 |
+} |
287 |
+ |
288 |
+src_test() { |
289 |
+ # Tests will not work when cross compiling. |
290 |
+ if tc-is-cross-compiler; then |
291 |
+ elog "Disabling tests due to crosscompiling." |
292 |
+ return |
293 |
+ fi |
294 |
+ |
295 |
+ # Skip failing tests. |
296 |
+ local skipped_tests="gdb" |
297 |
+ |
298 |
+ for test in ${skipped_tests}; do |
299 |
+ mv "${S}"/Lib/test/test_${test}.py "${T}" |
300 |
+ done |
301 |
+ |
302 |
+ # bug 660358 |
303 |
+ local -x COLUMNS=80 |
304 |
+ local -x PYTHONDONTWRITEBYTECODE= |
305 |
+ |
306 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
307 |
+ |
308 |
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
309 |
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
310 |
+ local result=$? |
311 |
+ |
312 |
+ for test in ${skipped_tests}; do |
313 |
+ mv "${T}/test_${test}.py" "${S}"/Lib/test |
314 |
+ done |
315 |
+ |
316 |
+ elog "The following tests have been skipped:" |
317 |
+ for test in ${skipped_tests}; do |
318 |
+ elog "test_${test}.py" |
319 |
+ done |
320 |
+ |
321 |
+ elog "If you would like to run them, you may:" |
322 |
+ elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
323 |
+ elog "and run the tests separately." |
324 |
+ |
325 |
+ if [[ ${result} -ne 0 ]]; then |
326 |
+ die "emake test failed" |
327 |
+ fi |
328 |
+} |
329 |
+ |
330 |
+src_install() { |
331 |
+ local libdir=${ED}/usr/lib/python${PYVER} |
332 |
+ |
333 |
+ emake DESTDIR="${D}" altinstall |
334 |
+ |
335 |
+ if use aqua ; then |
336 |
+ # avoid config.status to be triggered |
337 |
+ find Mac -name "Makefile" -exec touch \{\} + || die |
338 |
+ |
339 |
+ # Python_Launcher is kind of a wrapper, and we should fix it for |
340 |
+ # Prefix (it uses /usr/bin/pythonw) so useless |
341 |
+ # IDLE doesn't run, no idea, but definitely not used |
342 |
+ emake DESTDIR="${D}" -C Mac install_Python || die |
343 |
+ rmdir "${ED}"/Applications/Python* || die |
344 |
+ rmdir "${ED}"/Applications || die |
345 |
+ |
346 |
+ local fwdir=/Frameworks/Python.framework/Versions/${PYVER} |
347 |
+ ln -s "${EPREFIX}"/usr/include/python${PYVER} \ |
348 |
+ "${ED}${fwdir}"/Headers || die |
349 |
+ ln -s "${EPREFIX}"/usr/lib/libpython${PYVER}.dylib \ |
350 |
+ "${ED}${fwdir}"/Python || die |
351 |
+ fi |
352 |
+ |
353 |
+ # Remove static library |
354 |
+ rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
355 |
+ |
356 |
+ sed \ |
357 |
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
358 |
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
359 |
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
360 |
+ |
361 |
+ # Fix collisions between different slots of Python. |
362 |
+ rm -f "${ED}/usr/$(get_libdir)/libpython3$(get_libname)" || die |
363 |
+ |
364 |
+ # Cheap hack to get version with ABIFLAGS |
365 |
+ local abiver=$(cd "${ED}/usr/include"; echo python*) |
366 |
+ if [[ ${abiver} != python${PYVER} ]]; then |
367 |
+ # Replace python3.X with a symlink to python3.Xm |
368 |
+ rm "${ED}/usr/bin/python${PYVER}" || die |
369 |
+ dosym "${abiver}" "/usr/bin/python${PYVER}" |
370 |
+ # Create python3.X-config symlink |
371 |
+ dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
372 |
+ # Create python-3.5m.pc symlink |
373 |
+ dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
374 |
+ fi |
375 |
+ |
376 |
+ # python seems to get rebuilt in src_install (bug 569908) |
377 |
+ # Work around it for now. |
378 |
+ if has_version dev-libs/libffi[pax_kernel]; then |
379 |
+ pax-mark E "${ED}/usr/bin/${abiver}" |
380 |
+ else |
381 |
+ pax-mark m "${ED}/usr/bin/${abiver}" |
382 |
+ fi |
383 |
+ |
384 |
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
385 |
+ use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
386 |
+ |
387 |
+ dodoc Misc/{ACKS,HISTORY,NEWS} |
388 |
+ |
389 |
+ if use examples; then |
390 |
+ docinto examples |
391 |
+ find Tools -name __pycache__ -exec rm -fr {} + || die |
392 |
+ dodoc -r Tools |
393 |
+ fi |
394 |
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
395 |
+ if use aqua ; then |
396 |
+ # we do framework, so the emake trick below returns a pathname |
397 |
+ # since that won't work here, use a (cheap) trick instead |
398 |
+ local libname=libpython${PYVER} |
399 |
+ else |
400 |
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
401 |
+ emake --no-print-directory -s -f - 2>/dev/null) |
402 |
+ fi |
403 |
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
404 |
+ |
405 |
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
406 |
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
407 |
+ sed \ |
408 |
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
409 |
+ -e "s:@PYDOC@:pydoc${PYVER}:" \ |
410 |
+ -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
411 |
+ "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
412 |
+ |
413 |
+ local -x EPYTHON=python${PYVER} |
414 |
+ # if not using a cross-compiler, use the fresh binary |
415 |
+ if ! tc-is-cross-compiler; then |
416 |
+ local -x PYTHON=./python$(sed -n '/BUILDEXE=/s/^.*=\s\+//p' Makefile) |
417 |
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
418 |
+ local -x DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${PWD} |
419 |
+ else |
420 |
+ local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
421 |
+ fi |
422 |
+ |
423 |
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die |
424 |
+ python_domodule epython.py |
425 |
+ |
426 |
+ # python-exec wrapping support |
427 |
+ local pymajor=${PYVER%.*} |
428 |
+ local scriptdir=${D}$(python_get_scriptdir) |
429 |
+ mkdir -p "${scriptdir}" || die |
430 |
+ # python and pythonX |
431 |
+ ln -s "../../../bin/${abiver}" \ |
432 |
+ "${scriptdir}/python${pymajor}" || die |
433 |
+ ln -s "python${pymajor}" "${scriptdir}/python" || die |
434 |
+ # python-config and pythonX-config |
435 |
+ # note: we need to create a wrapper rather than symlinking it due |
436 |
+ # to some random dirname(argv[0]) magic performed by python-config |
437 |
+ cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
438 |
+ #!/bin/sh |
439 |
+ exec "${abiver}-config" "\${@}" |
440 |
+ EOF |
441 |
+ chmod +x "${scriptdir}/python${pymajor}-config" || die |
442 |
+ ln -s "python${pymajor}-config" \ |
443 |
+ "${scriptdir}/python-config" || die |
444 |
+ # 2to3, pydoc |
445 |
+ ln -s "../../../bin/2to3-${PYVER}" \ |
446 |
+ "${scriptdir}/2to3" || die |
447 |
+ ln -s "../../../bin/pydoc${PYVER}" \ |
448 |
+ "${scriptdir}/pydoc" || die |
449 |
+ # idle |
450 |
+ if use tk; then |
451 |
+ ln -s "../../../bin/idle${PYVER}" \ |
452 |
+ "${scriptdir}/idle" || die |
453 |
+ fi |
454 |
+} |