1 |
commit: 2f0aed25ea89a50a4370ddbe80e1dc1f6472ea55 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 31 19:17:47 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 31 19:29:21 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f0aed25 |
7 |
|
8 |
dev-lang/python: Bump to 3.10.0b2 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-lang/python/Manifest | 3 + |
13 |
dev-lang/python/python-3.10.0_beta2.ebuild | 347 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 350 insertions(+) |
15 |
|
16 |
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest |
17 |
index 153e927c0f0..8cf3faa3b37 100644 |
18 |
--- a/dev-lang/python/Manifest |
19 |
+++ b/dev-lang/python/Manifest |
20 |
@@ -2,6 +2,8 @@ DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381 |
21 |
DIST Python-2.7.18.tar.xz.asc 833 BLAKE2B 1d98770e46171971fb99994508d238c01d2755281d2f94353314014d9e83e0ec5f0b3e3950ea1fdf5fce9ba6b8f55312355845c2a3fc4291c27ee56fe6215448 SHA512 c2a5f5a52f47dec52460ad3275758d4e5de6e7075c3def4353c988d74d563a39b42cae2d5eb24e2a23a6247cef69100f91620b11a49c2359fbf99b203c9cbda8 |
22 |
DIST Python-3.10.0b1.tar.xz 18545252 BLAKE2B e078e3a29d874949d49447b5c176873091b7eb82e1b46cabdc13ba815e97f0f0d5a75bd25af0b3e874503c155e29583c78262ffa446f25f0db098be345f5cbfa SHA512 b8366f1fd92690bf78dc8ce07724d1b79a8c7f246e9a13ba3043687c5553b52d4d7baf48bf96f9fe088de73baef1df2131e2704ffed9a7549890723a7898c4c5 |
23 |
DIST Python-3.10.0b1.tar.xz.asc 833 BLAKE2B 70f15521ac3e117709b4ff7583563893612c5ee72c05071e056010ee3b654b9e7e97c4044d377e439328947ffdedc2e4689f00466d97092bc95851b72941239c SHA512 7e22dd9ddf37d0c2116cfb9f08050f0909ccc04f1a63e67b96f0cec743845c492659a661af518fd76d513fa36d08da11fe3a1166ede31de583369b4c3389de57 |
24 |
+DIST Python-3.10.0b2.tar.xz 18651420 BLAKE2B 6433723e789c04cfe09e7b966b1d5ad1687bf28674d83145a99ab6c1ce3f75beb25a4ef3da1b096cb48e0f34409e7c86e9922f16feb09f4eaa3e0ae5d43b3fbd SHA512 ace86ef11608fbb016d0b8efc7d20cccede4663cd09f07a07e067530537b1e4989379a6c18e7aa9b86b87b108d65efedc39eaf946d27df6ea474a829c763ebdd |
25 |
+DIST Python-3.10.0b2.tar.xz.asc 833 BLAKE2B 7fe4061350b27e0d0dd466cc80804a56126620649b4753cfe0ed1fc3a292aad30ab07f177f5bf893cd51112b6a54232a64b30d2bc2f8f66a9c2621efce3ae6da SHA512 9a84ab98a5215f13302c7a983e9224096d15c07d9a7899b28daff49405c46efdf7770263ca57e6e0f85ce1cbc0cafec373baf1675ade6ddb0eb268e99753907d |
26 |
DIST Python-3.6.13.tar.xz 17213520 BLAKE2B 7c1938f92616d428d107a70397a9f7fc82377d0e3d26c2da4f5bcb79a54115f71498a5e7b5f601b6cff6f362ec1f689c3ac920eb248956e1e4f6c21602514dd1 SHA512 0482b3e7eea22b0635b61f06753e77c832c9431385c5ea1ecb8f60868262afd2b45c239badb8e906a33f035ffbf347b4a499fe6f0f008f1fa9ecc9de66c63947 |
27 |
DIST Python-3.6.13.tar.xz.asc 833 BLAKE2B bc1df46c2e460c2d237647ecff84e12c75f6ed24a432d2f9cbefdead8a77d4468e5e4ed9f4debac593c63cf95d27c9f7d0f94dce69af8746cc71f0d0b1810245 SHA512 f6e8936a5e5b45d3ad41184717f5ed75debe29f81138fd1b75b53bc7d2905edff42b42dd7995b11ba6d80233c5c3755521edb19d7ac28d414bfebb2d1dfc0c86 |
28 |
DIST Python-3.7.10.tar.xz 17392580 BLAKE2B b030db731d141b97f1be794a19382cc252c5bbf867661d09c9455640ebcfd3030e8a691f57fe91a2e0c4e5d3bd4f8f3de07fa4bd287a58900d8c6e1fba2f0583 SHA512 5cb61739acbd29f526d25073443398b2ca0eef30d01d134e8236c8bbc7ab0586c44ec00689f5a75e6aedc0170acf4551721ada5e967e4b99a146cfcaad949128 |
29 |
@@ -17,6 +19,7 @@ DIST Python-3.9.5.tar.xz.asc 833 BLAKE2B d044e2019edc4854db22eebda182528e88a0c4d |
30 |
DIST python-gentoo-patches-2.7.18_p10.tar.xz 30436 BLAKE2B 24610a09037ce43a4cdb9a97e44e731fbf5215a63c55bacba8bb00c543bd3f482657fde6ed4b739bf5225ba123cc9960c8c842e4742e0769ee7554c23129f85b SHA512 f2b6b0cfb452c32bea07894b9365941545539aa240cb97660930578d8f1ae1744eb137c1c46b1ece4d1a874dded98395049145d3d5ee473bd1c67bc1dd92311c |
31 |
DIST python-gentoo-patches-2.7.18_p9.tar.xz 30188 BLAKE2B 4f9f80e0a967a980d247b50ac3c38419e70fd2dafada4e4b5593935915b17f09aec1a88b0baac58cbc0c2fcf73eee6dbd5fa5f378a8e3e1923a0028c2c3a1f5a SHA512 874e88142570fd62437b043a2763b32667dfd9856a7cc8884f5d3c09e7a8520e1cdeb5eb5b6bbb884fbc3bfad03abb83e1c260969f4b9520ce99334cfaeb76fb |
32 |
DIST python-gentoo-patches-3.10.0b1.tar.xz 8116 BLAKE2B aba4856d2463e57187680780cf5b5ae24547413acb8c2439c03ac9a33d4908b547cc40e3d9752c6a76494d47d2b824677e28b543a2fcf8cc1913395d05327f1c SHA512 b62b3fb00a76e3eac842e45d10b3d1cafbcad20659db54e11011d9dfca70c34e28bf187fa7fcdbc4e0bdcf66efbb7f8a6eb2a8d1b28f6e8c1e639e63c203f215 |
33 |
+DIST python-gentoo-patches-3.10.0b2.tar.xz 8124 BLAKE2B 6b707ef911c0573e6e87792b4ba1d37e5620723c7b22759c78ac20d88414390a7317546c41d867cd9decb6247c004a9df8eb25ab0999db9c7b431b03b64609e9 SHA512 9a95a1f8a6e4461107e9580e6017956ade47be90fbcd94cbb2eb83a871702308058a402c1eafc8e0d54c2a1910b9030edd9f71b051e846b1219e9f7bd11274b6 |
34 |
DIST python-gentoo-patches-3.6.13_p3.tar.xz 17640 BLAKE2B 255e96f61ad8adb7fdf1cc9f11ca99c8368601dfe9bab4c96adf1e77472dfdf365a6ce197ecc72b574849e2a6235063d63558711049e9e7407862871dc0f2f20 SHA512 7b9a39cd65129c495c513e1b8c259a88194b8877b891cedaa5289bedcc44dbcb5e63e3b9922ef085321e7f4db73b5a5090d30725b456491a98d7ef40b85601eb |
35 |
DIST python-gentoo-patches-3.6.13_p4.tar.xz 17896 BLAKE2B 768ed3860766b212d21718d2f83fe2852dd297aaeaa2d76d93357012513b2aa66e8ff8fc8edf7375ae10ecf0864560e7b4df168f916cba06c67e329612d404f8 SHA512 7ec640280244c7fe8e5c5b3e8c7fd396ec37b920fe1a77d99e85bef20bc335cfc0bf818c58b8f203c15ce343f50d4b8c7ab7591ecfd21380c9cb15d87ed81ca4 |
36 |
DIST python-gentoo-patches-3.7.10_p3.tar.xz 16804 BLAKE2B 1db238e4b928332d459b5f3c36ecb7f3bc3d3b754fd82e4434c91843ef7574306aef044df9a2644749a17b14ce9fefcd3c3dd44cafaa4ace0b7dc62fb66e73c8 SHA512 61a262a05d1f8e9b08875285db989160362eec66123a15345dd16b8c1f1161aeed31b20df8f69d27ae71902ae2e678328b82e511881d9a5560932619234bbe7d |
37 |
|
38 |
diff --git a/dev-lang/python/python-3.10.0_beta2.ebuild b/dev-lang/python/python-3.10.0_beta2.ebuild |
39 |
new file mode 100644 |
40 |
index 00000000000..e20ed1b7303 |
41 |
--- /dev/null |
42 |
+++ b/dev-lang/python/python-3.10.0_beta2.ebuild |
43 |
@@ -0,0 +1,347 @@ |
44 |
+# Copyright 1999-2021 Gentoo Authors |
45 |
+# Distributed under the terms of the GNU General Public License v2 |
46 |
+ |
47 |
+EAPI="7" |
48 |
+WANT_LIBTOOL="none" |
49 |
+ |
50 |
+inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ |
51 |
+ python-utils-r1 toolchain-funcs verify-sig |
52 |
+ |
53 |
+MY_PV=${PV/_beta/b} |
54 |
+MY_P="Python-${MY_PV%_p*}" |
55 |
+PYVER=$(ver_cut 1-2) |
56 |
+PATCHSET="python-gentoo-patches-${MY_PV}" |
57 |
+ |
58 |
+DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
59 |
+HOMEPAGE="https://www.python.org/" |
60 |
+SRC_URI="https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz |
61 |
+ https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
62 |
+ verify-sig? ( |
63 |
+ https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc |
64 |
+ )" |
65 |
+S="${WORKDIR}/${MY_P}" |
66 |
+ |
67 |
+LICENSE="PSF-2" |
68 |
+SLOT="${PYVER}" |
69 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
70 |
+IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +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 |
+ 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? ( dev-libs/openssl:= ) |
90 |
+ tk? ( |
91 |
+ >=dev-lang/tcl-8.0:= |
92 |
+ >=dev-lang/tk-8.0:= |
93 |
+ dev-tcltk/blt:= |
94 |
+ dev-tcltk/tix |
95 |
+ ) |
96 |
+ xml? ( >=dev-libs/expat-2.1:= ) |
97 |
+ !!<sys-apps/sandbox-2.21" |
98 |
+# bluetooth requires headers from bluez |
99 |
+DEPEND="${RDEPEND} |
100 |
+ bluetooth? ( net-wireless/bluez ) |
101 |
+ test? ( app-arch/xz-utils[extra-filters(+)] )" |
102 |
+# autoconf-archive needed to eautoreconf |
103 |
+BDEPEND=" |
104 |
+ sys-devel/autoconf-archive |
105 |
+ virtual/pkgconfig |
106 |
+ verify-sig? ( app-crypt/openpgp-keys-python ) |
107 |
+ !sys-devel/gcc[libffi(-)]" |
108 |
+PDEPEND="app-eselect/eselect-python" |
109 |
+RDEPEND+=" !build? ( app-misc/mime-types )" |
110 |
+ |
111 |
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc |
112 |
+ |
113 |
+# large file tests involve a 2.5G file being copied (duplicated) |
114 |
+CHECKREQS_DISK_BUILD=5500M |
115 |
+ |
116 |
+pkg_pretend() { |
117 |
+ use test && check-reqs_pkg_pretend |
118 |
+} |
119 |
+ |
120 |
+pkg_setup() { |
121 |
+ use test && check-reqs_pkg_setup |
122 |
+} |
123 |
+ |
124 |
+src_unpack() { |
125 |
+ if use verify-sig; then |
126 |
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} |
127 |
+ fi |
128 |
+ default |
129 |
+} |
130 |
+ |
131 |
+src_prepare() { |
132 |
+ # Ensure that internal copies of expat, libffi and zlib are not used. |
133 |
+ rm -fr Modules/expat || die |
134 |
+ rm -fr Modules/_ctypes/libffi* || die |
135 |
+ rm -fr Modules/zlib || die |
136 |
+ |
137 |
+ local PATCHES=( |
138 |
+ "${WORKDIR}/${PATCHSET}" |
139 |
+ ) |
140 |
+ |
141 |
+ default |
142 |
+ |
143 |
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
144 |
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
145 |
+ |
146 |
+ # force correct number of jobs |
147 |
+ # https://bugs.gentoo.org/737660 |
148 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
149 |
+ sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die |
150 |
+ sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
151 |
+ |
152 |
+ eautoreconf |
153 |
+} |
154 |
+ |
155 |
+src_configure() { |
156 |
+ local disable |
157 |
+ # disable automagic bluetooth headers detection |
158 |
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
159 |
+ use gdbm || disable+=" gdbm" |
160 |
+ use ncurses || disable+=" _curses _curses_panel" |
161 |
+ use readline || disable+=" readline" |
162 |
+ use sqlite || disable+=" _sqlite3" |
163 |
+ use ssl || export PYTHON_DISABLE_SSL="1" |
164 |
+ use tk || disable+=" _tkinter" |
165 |
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
166 |
+ export PYTHON_DISABLE_MODULES="${disable}" |
167 |
+ |
168 |
+ if ! use xml; then |
169 |
+ ewarn "You have configured Python without XML support." |
170 |
+ ewarn "This is NOT a recommended configuration as you" |
171 |
+ ewarn "may face problems parsing any XML documents." |
172 |
+ fi |
173 |
+ |
174 |
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
175 |
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
176 |
+ fi |
177 |
+ |
178 |
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then |
179 |
+ append-flags -fwrapv |
180 |
+ fi |
181 |
+ |
182 |
+ filter-flags -malign-double |
183 |
+ |
184 |
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
185 |
+ if is-flagq -O3; then |
186 |
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
187 |
+ use hardened && replace-flags -O3 -O2 |
188 |
+ fi |
189 |
+ |
190 |
+ # https://bugs.gentoo.org/700012 |
191 |
+ if is-flagq -flto || is-flagq '-flto=*'; then |
192 |
+ append-cflags $(test-flags-CC -ffat-lto-objects) |
193 |
+ fi |
194 |
+ |
195 |
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
196 |
+ tc-export CXX |
197 |
+ |
198 |
+ # Fix implicit declarations on cross and prefix builds. Bug #674070. |
199 |
+ use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
200 |
+ |
201 |
+ local dbmliborder |
202 |
+ if use gdbm; then |
203 |
+ dbmliborder+="${dbmliborder:+:}gdbm" |
204 |
+ fi |
205 |
+ |
206 |
+ local myeconfargs=( |
207 |
+ # glibc-2.30 removes it; since we can't cleanly force-rebuild |
208 |
+ # Python on glibc upgrade, remove it proactively to give |
209 |
+ # a chance for users rebuilding python before glibc |
210 |
+ ac_cv_header_stropts_h=no |
211 |
+ |
212 |
+ --enable-shared |
213 |
+ --without-static-libpython |
214 |
+ $(use_enable ipv6) |
215 |
+ --infodir='${prefix}/share/info' |
216 |
+ --mandir='${prefix}/share/man' |
217 |
+ --with-computed-gotos |
218 |
+ --with-dbmliborder="${dbmliborder}" |
219 |
+ --with-libc= |
220 |
+ --enable-loadable-sqlite-extensions |
221 |
+ --without-ensurepip |
222 |
+ --with-system-expat |
223 |
+ --with-system-ffi |
224 |
+ ) |
225 |
+ |
226 |
+ OPT="" econf "${myeconfargs[@]}" |
227 |
+ |
228 |
+ if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
229 |
+ eerror "configure has detected that the sem_open function is broken." |
230 |
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
231 |
+ die "Broken sem_open function (bug 496328)" |
232 |
+ fi |
233 |
+} |
234 |
+ |
235 |
+src_compile() { |
236 |
+ # Ensure sed works as expected |
237 |
+ # https://bugs.gentoo.org/594768 |
238 |
+ local -x LC_ALL=C |
239 |
+ |
240 |
+ emake CPPFLAGS= CFLAGS= LDFLAGS= |
241 |
+ |
242 |
+ # Work around bug 329499. See also bug 413751 and 457194. |
243 |
+ if has_version dev-libs/libffi[pax_kernel]; then |
244 |
+ pax-mark E python |
245 |
+ else |
246 |
+ pax-mark m python |
247 |
+ fi |
248 |
+} |
249 |
+ |
250 |
+src_test() { |
251 |
+ # Tests will not work when cross compiling. |
252 |
+ if tc-is-cross-compiler; then |
253 |
+ elog "Disabling tests due to crosscompiling." |
254 |
+ return |
255 |
+ fi |
256 |
+ |
257 |
+ # Skip failing tests. |
258 |
+ local skipped_tests="gdb" |
259 |
+ |
260 |
+ for test in ${skipped_tests}; do |
261 |
+ mv "${S}"/Lib/test/test_${test}.py "${T}" |
262 |
+ done |
263 |
+ |
264 |
+ # bug 660358 |
265 |
+ local -x COLUMNS=80 |
266 |
+ local -x PYTHONDONTWRITEBYTECODE= |
267 |
+ # workaround https://bugs.gentoo.org/775416 |
268 |
+ addwrite /usr/lib/python3.10/site-packages |
269 |
+ |
270 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
271 |
+ |
272 |
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
273 |
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
274 |
+ local result=$? |
275 |
+ |
276 |
+ for test in ${skipped_tests}; do |
277 |
+ mv "${T}/test_${test}.py" "${S}"/Lib/test |
278 |
+ done |
279 |
+ |
280 |
+ elog "The following tests have been skipped:" |
281 |
+ for test in ${skipped_tests}; do |
282 |
+ elog "test_${test}.py" |
283 |
+ done |
284 |
+ |
285 |
+ elog "If you would like to run them, you may:" |
286 |
+ elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
287 |
+ elog "and run the tests separately." |
288 |
+ |
289 |
+ if [[ ${result} -ne 0 ]]; then |
290 |
+ die "emake test failed" |
291 |
+ fi |
292 |
+} |
293 |
+ |
294 |
+src_install() { |
295 |
+ local libdir=${ED}/usr/lib/python${PYVER} |
296 |
+ |
297 |
+ emake DESTDIR="${D}" altinstall |
298 |
+ |
299 |
+ sed \ |
300 |
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
301 |
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
302 |
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
303 |
+ |
304 |
+ # Fix collisions between different slots of Python. |
305 |
+ rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
306 |
+ |
307 |
+ # Cheap hack to get version with ABIFLAGS |
308 |
+ local abiver=$(cd "${ED}/usr/include"; echo python*) |
309 |
+ if [[ ${abiver} != python${PYVER} ]]; then |
310 |
+ # Replace python3.X with a symlink to python3.Xm |
311 |
+ rm "${ED}/usr/bin/python${PYVER}" || die |
312 |
+ dosym "${abiver}" "/usr/bin/python${PYVER}" |
313 |
+ # Create python3.X-config symlink |
314 |
+ dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
315 |
+ # Create python-3.5m.pc symlink |
316 |
+ dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
317 |
+ fi |
318 |
+ |
319 |
+ # python seems to get rebuilt in src_install (bug 569908) |
320 |
+ # Work around it for now. |
321 |
+ if has_version dev-libs/libffi[pax_kernel]; then |
322 |
+ pax-mark E "${ED}/usr/bin/${abiver}" |
323 |
+ else |
324 |
+ pax-mark m "${ED}/usr/bin/${abiver}" |
325 |
+ fi |
326 |
+ |
327 |
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
328 |
+ use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
329 |
+ |
330 |
+ dodoc Misc/{ACKS,HISTORY,NEWS} |
331 |
+ |
332 |
+ if use examples; then |
333 |
+ docinto examples |
334 |
+ find Tools -name __pycache__ -exec rm -fr {} + || die |
335 |
+ dodoc -r Tools |
336 |
+ fi |
337 |
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
338 |
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
339 |
+ emake --no-print-directory -s -f - 2>/dev/null) |
340 |
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
341 |
+ |
342 |
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
343 |
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
344 |
+ sed \ |
345 |
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
346 |
+ -e "s:@PYDOC@:pydoc${PYVER}:" \ |
347 |
+ -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
348 |
+ "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
349 |
+ |
350 |
+ local -x EPYTHON=python${PYVER} |
351 |
+ # if not using a cross-compiler, use the fresh binary |
352 |
+ if ! tc-is-cross-compiler; then |
353 |
+ local -x PYTHON=./python |
354 |
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
355 |
+ else |
356 |
+ local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
357 |
+ fi |
358 |
+ |
359 |
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die |
360 |
+ python_domodule epython.py |
361 |
+ |
362 |
+ # python-exec wrapping support |
363 |
+ local pymajor=${PYVER%.*} |
364 |
+ local scriptdir=${D}$(python_get_scriptdir) |
365 |
+ mkdir -p "${scriptdir}" || die |
366 |
+ # python and pythonX |
367 |
+ ln -s "../../../bin/${abiver}" \ |
368 |
+ "${scriptdir}/python${pymajor}" || die |
369 |
+ ln -s "python${pymajor}" "${scriptdir}/python" || die |
370 |
+ # python-config and pythonX-config |
371 |
+ # note: we need to create a wrapper rather than symlinking it due |
372 |
+ # to some random dirname(argv[0]) magic performed by python-config |
373 |
+ cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
374 |
+ #!/bin/sh |
375 |
+ exec "${abiver}-config" "\${@}" |
376 |
+ EOF |
377 |
+ chmod +x "${scriptdir}/python${pymajor}-config" || die |
378 |
+ ln -s "python${pymajor}-config" \ |
379 |
+ "${scriptdir}/python-config" || die |
380 |
+ # 2to3, pydoc |
381 |
+ ln -s "../../../bin/2to3-${PYVER}" \ |
382 |
+ "${scriptdir}/2to3" || die |
383 |
+ ln -s "../../../bin/pydoc${PYVER}" \ |
384 |
+ "${scriptdir}/pydoc" || die |
385 |
+ # idle |
386 |
+ if use tk; then |
387 |
+ ln -s "../../../bin/idle${PYVER}" \ |
388 |
+ "${scriptdir}/idle" || die |
389 |
+ fi |
390 |
+} |