Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/
Date: Sat, 06 Nov 2021 02:27:49
Message-Id: 1636165653.f5b41cc1db867da33e30a8b90ca5e2ca63458a35.sam@gentoo
1 commit: f5b41cc1db867da33e30a8b90ca5e2ca63458a35
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 6 02:27:28 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 6 02:27:33 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5b41cc1
7
8 dev-lang/python: add 3.11.0_alpha2
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 dev-lang/python/Manifest | 3 +
13 dev-lang/python/python-3.11.0_alpha2.ebuild | 353 ++++++++++++++++++++++++++++
14 2 files changed, 356 insertions(+)
15
16 diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
17 index 11aec1547f7..73f224e9a0d 100644
18 --- a/dev-lang/python/Manifest
19 +++ b/dev-lang/python/Manifest
20 @@ -4,6 +4,8 @@ DIST Python-3.10.0.tar.xz 18726176 BLAKE2B 77143edf733cadf7e52327a58782f0617b1dd
21 DIST Python-3.10.0.tar.xz.asc 833 BLAKE2B 295df19932ea076bb1a50acb38782055ff34fb235df0380fa361727eedb3ca68aeca2a31419de5b05ce128c2e21ad04605c226e7a61d508a17607f615e46e570 SHA512 67236e02bc49da1423717cb54216b745f613ba2fc4b372a4aa15a36ab15fe69d9b9087070382957d480df7576d13056caedcd979fb56531799a1190b822f673d
22 DIST Python-3.11.0a1.tar.xz 18678136 BLAKE2B 1a28fdc2bbbb60896240b4a7bc361f060205dae51fa2d0e4f981752d81c14f1a28ebef09960ea82d5158e874d0e335ee45f69d968f7433ce4c0d02978ad39c95 SHA512 3705fa3d05fccd491fba981c9495d5b36793f284a39b267a5ff7b25c7f08de84bbd5afe200296cedd1cc55f495fd3efc55d7b34910e1be1a785ce5772b857d7a
23 DIST Python-3.11.0a1.tar.xz.asc 833 BLAKE2B f5c6064e8b9de17bc22d60b0ae52a9aa887823a9a52fc8fff1e9d29e05c4c1392841a7c492fe69b426be4ee945f0cbfed7ec0d31604e488458d6c61583a051dd SHA512 b9d1542f215b5633835d21de0311d324c62e53b7afc525c00d26c863740fd01cc8c18a6ecb0a8ce8d38bf543cebdb64f0930f9201a8968dbbedf58fe9ad4c05c
24 +DIST Python-3.11.0a2.tar.xz 18714064 BLAKE2B 54680f117b639fdebbe1300df4d4fcc43099d30d146861577eee7ad5d9a7de43b54bec0f058db58d4d7067a8ab31cbe344a276c837dddcd3df9105d2a5aa615f SHA512 9a7c4d2be0cdf5801aaf6ec6337390a2f0e711badf0e0e35bcf0e5c98f652c68cf523afb991e87f4a1d1604eed3d19c56654d55922986ab27234e82675b20391
25 +DIST Python-3.11.0a2.tar.xz.asc 833 BLAKE2B f3714b71fc1e167e2d5a9989003159606a5eb5288f6d44c5332d7fe101be79e411f035ad1fcc3acd930f9e02377ed8c45f6b981827405dc501b8b074b5eb3dcf SHA512 617181a854c884c6d3a79368000ca82430bc391573ae3a1b25f69939bce3d2d365e8ca7166d941856a78f3598ab4e7720a144ecb6c3a9de1aff5928799c2988d
26 DIST Python-3.6.14.tar.xz 17218148 BLAKE2B efe655cb907ffa678ca135f88ba9d867e523969ad82dbc09ffb6d8d383824a4b43c525e156a3c35484a526b4b3ea755109e5ef15d17852d44e3351c307fc5e91 SHA512 15b82b7285db97cb27a6fcd57ce9e258fdf8dbdb2f00e22e4331161b8557c8244342546c4143e84c72730759e0276770396b6ca5bb7cf87310cca8e175423006
27 DIST Python-3.6.14.tar.xz.asc 833 BLAKE2B 81c79dca5728b21b8c2badcaa1242836f1cf13984bb755463cfe9e4fd96a02ebf31f1a9239759a937c6d6a04c18bfc682a82cb0ab2e5a473de153423a7248c9c SHA512 600bf504f2c0d3ce7d1e8e953b4f27a7a7c996b7b9cd70efb876178fa5424130bff5414d5ac7deb8b45103ed417fd40d830613db39750d35a0c967c8fdfea50d
28 DIST Python-3.6.15.tar.xz 17223796 BLAKE2B c139c6f93ea70ad898d5626dfa964280a14de9676f0d9d55668ad91618b1ba330874cbba8d6526a87e53b585ff34e3bf242613ca3fb17ee60f362a9676306c7d SHA512 f1894d704c91669d94ec83b5631288bf1e0c73ddcf33cea0977575f262eb672caebc8ac00e34e9b99c321c19cc9a71d6081fa957bb8e23cf5bfba50f345145ef
29 @@ -19,6 +21,7 @@ DIST Python-3.9.8.tar.xz.asc 833 BLAKE2B ec94293d0d28398b425a0a6cd502f6540b23f67
30 DIST python-gentoo-patches-2.7.18_p13.tar.xz 33296 BLAKE2B 91b711458aff4f6337ee1b34aff58d7edda6725644a64c9320076a1e04c816729ed163d82333cfe4dfef379a9ad5ef50ba00abdbbfed4503b0f92c8f0b7ca683 SHA512 97f3657a4a95e8492aa710801b974a56e6dd4636e475aea45cbbe76e7ae32d00f07b05769887f05e49cb0df8584ac9499a7ce842bad77f837a7c869f9b769b07
31 DIST python-gentoo-patches-3.10.0_p1.tar.xz 10068 BLAKE2B 1c9817b449831559f0a0b722c02a5f55d94b3dfde98e5882c1403fe24a4addf7074ab39c09b91cff6fd7ace2e4b6e8ed899d9a0b9ffd6612ce315c4c192bd309 SHA512 39aa41dbf17b6dc5255491c75031a3dae6962b44125e426dbfdce365a6533c5dae9856b1fff8016a189124b7cff72d2665ce99da344c2f9dff005ba685e8c2c4
32 DIST python-gentoo-patches-3.11.0a1.tar.xz 9468 BLAKE2B 9bbc0c41d366752d2481c19070d71c27f88fd605e35e62f6b86498cb537051e92972f3c3f7b234485fd07e2a6ac4e4d6701e03e7893897531da58fbaaa609e76 SHA512 a06274c8c1d772121ac9570125eea12a4e53bcac030b8f4f3c5c76d68fc475df3f073a4dffe55614ced9cf031c7581e428b1cee67078c63d4f41e0a51e372e41
33 +DIST python-gentoo-patches-3.11.0a2.tar.xz 8472 BLAKE2B 440e31d70895a537bb89099cec440bd5de56cc3ddb65d71483f5f82eeb253fe4a99f87c41b8ad28ed039ffaa3eb48674de15b9e031572fd81aba4c1c79ad2ec0 SHA512 f87a7550fa20027c870500babcc8893c2c4dcaf68a25d8096e0edfa1f473fefbd0117bd847514f2784fe22cb0027b3b269c7bc7d7395c1f96932a56d02bfd404
34 DIST python-gentoo-patches-3.6.14_p1.tar.xz 16576 BLAKE2B 902a9073e6d3e40cfba105680d9947b64a4bfa1632381bc71afbd2691350dccb36f498bf17ac7dfc8ce331dfc3fb7e3cdd539cea3f5e9db1c49210ad4d124182 SHA512 4aa354f1ca8d9bb3c30b666ef61cac8380741342102aeb9ea77cc06ae62179f595acc1c2e6321e9c2395abbc3fbc649ecc93b80443d139859924524989539992
35 DIST python-gentoo-patches-3.6.15.tar.xz 15300 BLAKE2B f49fd96f6ad1a1c94fea6b83acd229a81754b86061e243044ead4b9a9d5122a2e43b270b68722c359c084c05a566a3ad70aa46588ab7a005ee560ee118b92b8b SHA512 cc33491a33f3f1d990cf494d53b91b74db761142e8aebe1bd4b128ef10a268ff945e5ba08daad39cee095612a8e52265d6988873ecf9c073377cbbc10735aa39
36 DIST python-gentoo-patches-3.7.12_p1.tar.xz 19112 BLAKE2B e9964244af3db544dd6e96d85ca4bc24d7131b48eda85df5bafa3fb36474a024cecbbf4b27324e1f35f76ae6a1aed31dd7896e831b79b574b45a4371afcc7e5b SHA512 9ec996c2904f99bd6651ed1b700eabd91f2b82b1e9e0f3d9572243886a9c7139bf8ac2af04169485d3ca6339e1a87044cba203f6f0aee9609d2a1d53c812548d
37
38 diff --git a/dev-lang/python/python-3.11.0_alpha2.ebuild b/dev-lang/python/python-3.11.0_alpha2.ebuild
39 new file mode 100644
40 index 00000000000..fd039096d63
41 --- /dev/null
42 +++ b/dev-lang/python/python-3.11.0_alpha2.ebuild
43 @@ -0,0 +1,353 @@
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/_alpha/a}
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 + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PATCHSET}.tar.xz
63 + verify-sig? (
64 + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
65 + )"
66 +S="${WORKDIR}/${MY_P}"
67 +
68 +LICENSE="PSF-2"
69 +SLOT="${PYVER}"
70 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
71 +IUSE="bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl test tk wininst +xml"
72 +RESTRICT="!test? ( test )"
73 +
74 +# Do not add a dependency on dev-lang/python to this ebuild.
75 +# If you need to apply a patch which requires python for bootstrapping, please
76 +# run the bootstrap code on your dev box and include the results in the
77 +# patchset. See bug 447752.
78 +
79 +RDEPEND="app-arch/bzip2:=
80 + app-arch/xz-utils:=
81 + dev-libs/libffi:=
82 + sys-apps/util-linux:=
83 + >=sys-libs/zlib-1.1.3:=
84 + virtual/libcrypt:=
85 + virtual/libintl
86 + gdbm? ( sys-libs/gdbm:=[berkdb] )
87 + ncurses? ( >=sys-libs/ncurses-5.2:= )
88 + readline? ( >=sys-libs/readline-4.1:= )
89 + sqlite? ( >=dev-db/sqlite-3.3.8:3= )
90 + ssl? ( >=dev-libs/openssl-1.1.1:= )
91 + tk? (
92 + >=dev-lang/tcl-8.0:=
93 + >=dev-lang/tk-8.0:=
94 + dev-tcltk/blt:=
95 + dev-tcltk/tix
96 + )
97 + xml? ( >=dev-libs/expat-2.1:= )
98 + !!<sys-apps/sandbox-2.21"
99 +# bluetooth requires headers from bluez
100 +DEPEND="${RDEPEND}
101 + bluetooth? ( net-wireless/bluez )
102 + test? ( app-arch/xz-utils[extra-filters(+)] )"
103 +# autoconf-archive needed to eautoreconf
104 +BDEPEND="
105 + sys-devel/autoconf-archive
106 + virtual/awk
107 + virtual/pkgconfig
108 + verify-sig? ( app-crypt/openpgp-keys-python )
109 + !sys-devel/gcc[libffi(-)]"
110 +RDEPEND+=" !build? ( app-misc/mime-types )"
111 +
112 +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
113 +
114 +# large file tests involve a 2.5G file being copied (duplicated)
115 +CHECKREQS_DISK_BUILD=5500M
116 +
117 +pkg_pretend() {
118 + use test && check-reqs_pkg_pretend
119 +}
120 +
121 +pkg_setup() {
122 + use test && check-reqs_pkg_setup
123 +}
124 +
125 +src_unpack() {
126 + if use verify-sig; then
127 + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
128 + fi
129 + default
130 +}
131 +
132 +src_prepare() {
133 + # Ensure that internal copies of expat, libffi and zlib are not used.
134 + rm -fr Modules/expat || die
135 + rm -fr Modules/_ctypes/libffi* || die
136 + rm -fr Modules/zlib || die
137 +
138 + local PATCHES=(
139 + "${WORKDIR}/${PATCHSET}"
140 + )
141 +
142 + default
143 +
144 + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
145 + setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
146 +
147 + # force correct number of jobs
148 + # https://bugs.gentoo.org/737660
149 + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
150 + sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
151 + sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
152 +
153 + eautoreconf
154 +}
155 +
156 +src_configure() {
157 + local disable
158 + # disable automagic bluetooth headers detection
159 + use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
160 + use gdbm || disable+=" gdbm"
161 + use ncurses || disable+=" _curses _curses_panel"
162 + use readline || disable+=" readline"
163 + use sqlite || disable+=" _sqlite3"
164 + use ssl || export PYTHON_DISABLE_SSL="1"
165 + use tk || disable+=" _tkinter"
166 + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
167 + export PYTHON_DISABLE_MODULES="${disable}"
168 +
169 + if ! use xml; then
170 + ewarn "You have configured Python without XML support."
171 + ewarn "This is NOT a recommended configuration as you"
172 + ewarn "may face problems parsing any XML documents."
173 + fi
174 +
175 + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
176 + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
177 + fi
178 +
179 + if [[ "$(gcc-major-version)" -ge 4 ]]; then
180 + append-flags -fwrapv
181 + fi
182 +
183 + filter-flags -malign-double
184 +
185 + # https://bugs.gentoo.org/show_bug.cgi?id=50309
186 + if is-flagq -O3; then
187 + is-flagq -fstack-protector-all && replace-flags -O3 -O2
188 + use hardened && replace-flags -O3 -O2
189 + fi
190 +
191 + # https://bugs.gentoo.org/700012
192 + if is-flagq -flto || is-flagq '-flto=*'; then
193 + append-cflags $(test-flags-CC -ffat-lto-objects)
194 + fi
195 +
196 + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
197 + tc-export CXX
198 +
199 + # Fix implicit declarations on cross and prefix builds. Bug #674070.
200 + use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
201 +
202 + local dbmliborder
203 + if use gdbm; then
204 + dbmliborder+="${dbmliborder:+:}gdbm"
205 + fi
206 +
207 + local myeconfargs=(
208 + # glibc-2.30 removes it; since we can't cleanly force-rebuild
209 + # Python on glibc upgrade, remove it proactively to give
210 + # a chance for users rebuilding python before glibc
211 + ac_cv_header_stropts_h=no
212 +
213 + --enable-shared
214 + --without-static-libpython
215 + --enable-ipv6
216 + --infodir='${prefix}/share/info'
217 + --mandir='${prefix}/share/man'
218 + --with-computed-gotos
219 + --with-dbmliborder="${dbmliborder}"
220 + --with-libc=
221 + --enable-loadable-sqlite-extensions
222 + --without-ensurepip
223 + --with-system-expat
224 + --with-system-ffi
225 + )
226 +
227 + OPT="" econf "${myeconfargs[@]}"
228 +
229 + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
230 + eerror "configure has detected that the sem_open function is broken."
231 + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
232 + die "Broken sem_open function (bug 496328)"
233 + fi
234 +}
235 +
236 +src_compile() {
237 + # Ensure sed works as expected
238 + # https://bugs.gentoo.org/594768
239 + local -x LC_ALL=C
240 +
241 + emake CPPFLAGS= CFLAGS= LDFLAGS=
242 +
243 + # Work around bug 329499. See also bug 413751 and 457194.
244 + if has_version dev-libs/libffi[pax-kernel]; then
245 + pax-mark E python
246 + else
247 + pax-mark m python
248 + fi
249 +}
250 +
251 +src_test() {
252 + # Tests will not work when cross compiling.
253 + if tc-is-cross-compiler; then
254 + elog "Disabling tests due to crosscompiling."
255 + return
256 + fi
257 +
258 + # Skip failing tests.
259 + local skipped_tests="gdb"
260 +
261 + for test in ${skipped_tests}; do
262 + mv "${S}"/Lib/test/test_${test}.py "${T}"
263 + done
264 +
265 + # Expects to find skipped tests and fails
266 + mv "${S}"/Lib/test/test_tools/test_freeze.py "${T}" || die
267 +
268 + # bug 660358
269 + local -x COLUMNS=80
270 + local -x PYTHONDONTWRITEBYTECODE=
271 + # workaround https://bugs.gentoo.org/775416
272 + addwrite /usr/lib/python3.10/site-packages
273 +
274 + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
275 +
276 + emake test EXTRATESTOPTS="-u-network -j${jobs}" \
277 + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
278 + local result=$?
279 +
280 + for test in ${skipped_tests}; do
281 + mv "${T}/test_${test}.py" "${S}"/Lib/test
282 + done
283 +
284 + mv "${T}"/test_freeze.py "${S}"/Lib/test/test_tools/test_freeze.py || die
285 +
286 + elog "The following tests have been skipped:"
287 + for test in ${skipped_tests}; do
288 + elog "test_${test}.py"
289 + done
290 +
291 + elog "If you would like to run them, you may:"
292 + elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
293 + elog "and run the tests separately."
294 +
295 + if [[ ${result} -ne 0 ]]; then
296 + die "emake test failed"
297 + fi
298 +}
299 +
300 +src_install() {
301 + local libdir=${ED}/usr/lib/python${PYVER}
302 +
303 + emake DESTDIR="${D}" altinstall
304 +
305 + sed \
306 + -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
307 + -e "s/\(PY_LDFLAGS=\).*/\1/" \
308 + -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
309 +
310 + # Fix collisions between different slots of Python.
311 + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
312 +
313 + # Cheap hack to get version with ABIFLAGS
314 + local abiver=$(cd "${ED}/usr/include"; echo python*)
315 + if [[ ${abiver} != python${PYVER} ]]; then
316 + # Replace python3.X with a symlink to python3.Xm
317 + rm "${ED}/usr/bin/python${PYVER}" || die
318 + dosym "${abiver}" "/usr/bin/python${PYVER}"
319 + # Create python3.X-config symlink
320 + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
321 + # Create python-3.5m.pc symlink
322 + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
323 + fi
324 +
325 + # python seems to get rebuilt in src_install (bug 569908)
326 + # Work around it for now.
327 + if has_version dev-libs/libffi[pax-kernel]; then
328 + pax-mark E "${ED}/usr/bin/${abiver}"
329 + else
330 + pax-mark m "${ED}/usr/bin/${abiver}"
331 + fi
332 +
333 + use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
334 + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
335 +
336 + dodoc Misc/{ACKS,HISTORY,NEWS}
337 +
338 + if use examples; then
339 + docinto examples
340 + find Tools -name __pycache__ -exec rm -fr {} + || die
341 + dodoc -r Tools
342 + fi
343 + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
344 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
345 + emake --no-print-directory -s -f - 2>/dev/null)
346 + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
347 +
348 + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
349 + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
350 + sed \
351 + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
352 + -e "s:@PYDOC@:pydoc${PYVER}:" \
353 + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
354 + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
355 +
356 + local -x EPYTHON=python${PYVER}
357 + # if not using a cross-compiler, use the fresh binary
358 + if ! tc-is-cross-compiler; then
359 + local -x PYTHON=./python
360 + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
361 + else
362 + local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
363 + fi
364 +
365 + echo "EPYTHON='${EPYTHON}'" > epython.py || die
366 + python_domodule epython.py
367 +
368 + # python-exec wrapping support
369 + local pymajor=${PYVER%.*}
370 + local scriptdir=${D}$(python_get_scriptdir)
371 + mkdir -p "${scriptdir}" || die
372 + # python and pythonX
373 + ln -s "../../../bin/${abiver}" \
374 + "${scriptdir}/python${pymajor}" || die
375 + ln -s "python${pymajor}" "${scriptdir}/python" || die
376 + # python-config and pythonX-config
377 + # note: we need to create a wrapper rather than symlinking it due
378 + # to some random dirname(argv[0]) magic performed by python-config
379 + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
380 + #!/bin/sh
381 + exec "${abiver}-config" "\${@}"
382 + EOF
383 + chmod +x "${scriptdir}/python${pymajor}-config" || die
384 + ln -s "python${pymajor}-config" \
385 + "${scriptdir}/python-config" || die
386 + # 2to3, pydoc
387 + ln -s "../../../bin/2to3-${PYVER}" \
388 + "${scriptdir}/2to3" || die
389 + ln -s "../../../bin/pydoc${PYVER}" \
390 + "${scriptdir}/pydoc" || die
391 + # idle
392 + if use tk; then
393 + ln -s "../../../bin/idle${PYVER}" \
394 + "${scriptdir}/idle" || die
395 + fi
396 +}