summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3_3.11.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3_3.11.3.bb')
-rw-r--r--meta/recipes-devtools/python/python3_3.11.3.bb447
1 files changed, 447 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3_3.11.3.bb b/meta/recipes-devtools/python/python3_3.11.3.bb
new file mode 100644
index 0000000000..0563a0ab9b
--- /dev/null
+++ b/meta/recipes-devtools/python/python3_3.11.3.bb
@@ -0,0 +1,447 @@
1SUMMARY = "The Python Programming Language"
2HOMEPAGE = "http://www.python.org"
3DESCRIPTION = "Python is a programming language that lets you work more quickly and integrate your systems more effectively."
4LICENSE = "PSF-2.0"
5SECTION = "devel/python"
6
7LIC_FILES_CHKSUM = "file://LICENSE;md5=fcf6b249c2641540219a727f35d8d2c2"
8
9SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
10 file://run-ptest \
11 file://create_manifest3.py \
12 file://get_module_deps3.py \
13 file://python3-manifest.json \
14 file://check_build_completeness.py \
15 file://reformat_sysconfig.py \
16 file://cgi_py.patch \
17 file://0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch \
18 ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \
19 file://0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch \
20 file://0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch \
21 file://crosspythonpath.patch \
22 file://0001-test_locale.py-correct-the-test-output-format.patch \
23 file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \
24 file://0001-Makefile-do-not-compile-.pyc-in-parallel.patch \
25 file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \
26 file://0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch \
27 file://0001-test_ctypes.test_find-skip-without-tools-sdk.patch \
28 file://makerace.patch \
29 file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \
30 file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \
31 file://0001-setup.py-Do-not-detect-multiarch-paths-when-cross-co.patch \
32 file://deterministic_imports.patch \
33 file://0001-Avoid-shebang-overflow-on-python-config.py.patch \
34 file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \
35 "
36
37SRC_URI:append:class-native = " \
38 file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \
39 file://12-distutils-prefix-is-inside-staging-area.patch \
40 file://0001-Don-t-search-system-for-headers-libraries.patch \
41 "
42SRC_URI[sha256sum] = "8a5db99c961a7ecf27c75956189c9602c968751f11dbeae2b900dbff1c085b5e"
43
44# exclude pre-releases for both python 2.x and 3.x
45UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
46UPSTREAM_CHECK_URI = "https://www.python.org/downloads/source/"
47
48CVE_PRODUCT = "python"
49
50# Upstream consider this expected behaviour
51CVE_CHECK_IGNORE += "CVE-2007-4559"
52# This is not exploitable when glibc has CVE-2016-10739 fixed.
53CVE_CHECK_IGNORE += "CVE-2019-18348"
54# These are specific to Microsoft Windows
55CVE_CHECK_IGNORE += "CVE-2020-15523 CVE-2022-26488"
56# The mailcap module is insecure by design, so this can't be fixed in a meaningful way.
57# The module will be removed in the future and flaws documented.
58CVE_CHECK_IGNORE += "CVE-2015-20107"
59# Not an issue, in fact expected behaviour
60CVE_CHECK_IGNORE += "CVE-2023-36632"
61
62PYTHON_MAJMIN = "3.11"
63
64S = "${WORKDIR}/Python-${PV}"
65
66BBCLASSEXTEND = "native nativesdk"
67
68inherit autotools pkgconfig qemu ptest multilib_header update-alternatives
69
70MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"
71
72ALTERNATIVE:${PN}-dev = "python3-config"
73ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config"
74ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}"
75
76
77DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux-libuuid libtirpc libnsl2 autoconf-archive-native ncurses"
78DEPENDS:append:class-target = " python3-native"
79DEPENDS:append:class-nativesdk = " python3-native"
80
81EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib}"
82EXTRA_OECONF:append:class-native = " --bindir=${bindir}/${PN}"
83EXTRA_OECONF:append:class-target = " --with-build-python=nativepython3"
84EXTRA_OECONF:append:class-nativesdk = " --with-build-python=nativepython3"
85
86export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/"
87
88EXTRANATIVEPATH += "python3-native"
89
90# LTO will be enabled via packageconfig depending upong distro features
91LTO:class-target = ""
92
93CACHED_CONFIGUREVARS = " \
94 ac_cv_file__dev_ptmx=yes \
95 ac_cv_file__dev_ptc=no \
96 ac_cv_working_tzset=yes \
97"
98
99# PGO currently causes builds to not be reproducible so disable by default, see YOCTO #13407
100PACKAGECONFIG:class-target ??= "readline gdbm ${@bb.utils.filter('DISTRO_FEATURES', 'lto', d)}"
101PACKAGECONFIG:class-native ??= "readline gdbm"
102PACKAGECONFIG:class-nativesdk ??= "readline gdbm"
103PACKAGECONFIG[readline] = ",,readline"
104PACKAGECONFIG[editline] = "--with-readline=editline,,libedit,,,readline"
105# Use profile guided optimisation by running PyBench inside qemu-user
106PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native"
107PACKAGECONFIG[tk] = ",,tk"
108PACKAGECONFIG[tcl] = ",,tcl"
109PACKAGECONFIG[gdbm] = ",,gdbm"
110PACKAGECONFIG[lto] = "--with-lto,,"
111
112do_configure:prepend () {
113 mkdir -p ${B}/Modules
114 cat > ${B}/Modules/Setup.local << EOF
115*disabled*
116${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '_gdbm _dbm', d)}
117${@bb.utils.contains('PACKAGECONFIG', 'readline', '', 'readline', d)}
118EOF
119}
120
121CPPFLAGS:append = " -I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid"
122
123EXTRA_OEMAKE = '\
124 STAGING_LIBDIR=${STAGING_LIBDIR} \
125 STAGING_INCDIR=${STAGING_INCDIR} \
126 LIB=${baselib} \
127'
128
129do_compile:prepend:class-target() {
130 if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then
131 qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}', ['${B}', '${STAGING_DIR_TARGET}/${base_libdir}'])}"
132 cat >pgo-wrapper <<EOF
133#!/bin/sh
134cd ${B}
135$qemu_binary "\$@"
136EOF
137 chmod +x pgo-wrapper
138 fi
139}
140
141do_install:prepend() {
142 ${WORKDIR}/check_build_completeness.py ${T}/log.do_compile
143}
144
145do_install:append:class-target() {
146 oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
147}
148
149do_install:append:class-native() {
150 # Make sure we use /usr/bin/env python
151 for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
152 sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
153 done
154 # Add a symlink to the native Python so that scripts can just invoke
155 # "nativepython" and get the right one without needing absolute paths
156 # (these often end up too long for the #! parser in the kernel as the
157 # buffer is 128 bytes long).
158 ln -s python3-native/python3 ${D}${bindir}/nativepython3
159
160 # Remove the opt-1.pyc and opt-2.pyc files. There are over 3,000 of them
161 # and the overhead in each recipe-sysroot-native isn't worth it, particularly
162 # when they're only used for python called with -O or -OO.
163 #find ${D} -name *opt-*.pyc -delete
164 # Remove all pyc files. There are a ton of them and it is probably faster to let
165 # python create the ones it wants at runtime rather than manage in the sstate
166 # tarballs and sysroot creation.
167 find ${D} -name *.pyc -delete
168
169 # Nothing should be looking into ${B} for python3-native
170 sed -i -e 's:${B}:/build/path/unavailable/:g' \
171 ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}*/Makefile
172
173 # disable the lookup in user's site-packages globally
174 sed -i 's#ENABLE_USER_SITE = None#ENABLE_USER_SITE = False#' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
175
176 # python3-config needs to be in /usr/bin and not in a subdir of it to work properly
177 mv ${D}/${bindir}/${PN}/python*config ${D}/${bindir}/
178}
179
180do_install:append() {
181 for c in ${D}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py; do
182 python3 ${WORKDIR}/reformat_sysconfig.py $c
183 done
184 rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata*.cpython*
185
186 mkdir -p ${D}${libdir}/python-sysconfigdata
187 sysconfigfile=`find ${D} -name _sysconfig*.py`
188 sed -i \
189 -e "s,^ 'LIBDIR'.*, 'LIBDIR': '${STAGING_LIBDIR}'\,,g" \
190 -e "s,^ 'INCLUDEDIR'.*, 'INCLUDEDIR': '${STAGING_INCDIR}'\,,g" \
191 -e "s,^ 'CONFINCLUDEDIR'.*, 'CONFINCLUDEDIR': '${STAGING_INCDIR}'\,,g" \
192 -e "s,^ 'INCLUDEPY'.*, 'INCLUDEPY': '${STAGING_INCDIR}/python${PYTHON_MAJMIN}'\,,g" \
193 -e "s,^ 'CONFINCLUDEPY'.*, 'CONFINCLUDEPY': '${STAGING_INCDIR}/python${PYTHON_MAJMIN}'\,,g" \
194 -e "s,${B},/build/path/unavailable/,g" \
195 $sysconfigfile
196 cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
197
198
199 # Unfortunately the following pyc files are non-deterministc due to 'frozenset'
200 # being written without strict ordering, even with PYTHONHASHSEED = 0
201 # Upstream is discussing ways to solve the issue properly, until then let's
202 # just not install the problematic files.
203 # More info: http://benno.id.au/blog/2013/01/15/python-determinism
204 rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython*
205 rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython*
206
207 # Similar to the above, we're getting reproducibility issues with
208 # /usr/lib/python3.10/__pycache__/traceback.cpython-310.pyc
209 # so remove it too
210 rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/__pycache__/traceback.cpython*
211
212 # Remove the opt-1.pyc and opt-2.pyc files. They effectively waste space on embedded
213 # style targets as they're only used when python is called with the -O or -OO options
214 # which is rare.
215 find ${D} -name *opt-*.pyc -delete
216}
217
218do_install:append:class-nativesdk () {
219 # Make sure we use /usr/bin/env python
220 for PYTHSCRIPT in `grep -rIl ${bindir}/python ${D}${bindir}`; do
221 sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
222 done
223 create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
224}
225
226SYSROOT_PREPROCESS_FUNCS:append:class-target = " provide_target_config_script"
227SYSROOT_PREPROCESS_FUNCS:append:class-nativesdk = " provide_target_config_script"
228
229# This is installed into /usr/python-target-config/ and not /usr/bin
230# because adding target sysroot's /usr/bin/ to PATH has unwanted side effects
231# in components erroneously picking up other target executables from it
232provide_target_config_script() {
233 install -d ${SYSROOT_DESTDIR}${prefix}/python-target-config/
234 install ${D}/${bindir}/python3-config ${SYSROOT_DESTDIR}/${prefix}/python-target-config/
235 install ${D}/${bindir}/python${PYTHON_MAJMIN}-config ${SYSROOT_DESTDIR}/${prefix}/python-target-config/
236}
237SYSROOT_DIRS += "${prefix}/python-target-config/"
238
239SSTATE_SCAN_FILES += "Makefile _sysconfigdata.py"
240SSTATE_HASHEQUIV_FILEMAP = " \
241 populate_sysroot:*/lib*/python3*/_sysconfigdata*.py:${TMPDIR} \
242 populate_sysroot:*/lib*/python3*/_sysconfigdata*.py:${COREBASE} \
243 populate_sysroot:*/lib*/python3*/config-*/Makefile:${TMPDIR} \
244 populate_sysroot:*/lib*/python3*/config-*/Makefile:${COREBASE} \
245 populate_sysroot:*/lib*/python-sysconfigdata/_sysconfigdata.py:${TMPDIR} \
246 populate_sysroot:*/lib*/python-sysconfigdata/_sysconfigdata.py:${COREBASE} \
247 "
248PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
249
250py_package_preprocess () {
251 # Remove references to buildmachine paths in target Makefile and _sysconfigdata
252 sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
253 -e 's|${DEBUG_PREFIX_MAP}||g' \
254 -e 's:${HOSTTOOLS_DIR}/::g' \
255 -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
256 -e 's:${RECIPE_SYSROOT}::g' \
257 -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
258 ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}*/Makefile \
259 ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py \
260 ${PKGD}/${bindir}/python${PYTHON_MAJMIN}-config
261
262 # Reformat _sysconfigdata after modifying it so that it remains
263 # reproducible
264 for c in ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py; do
265 python3 ${WORKDIR}/reformat_sysconfig.py $c
266 done
267
268 # Recompile _sysconfigdata after modifying it
269 cd ${PKGD}
270 sysconfigfile=`find . -name _sysconfigdata_*.py`
271 ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
272 -c "from py_compile import compile; compile('$sysconfigfile')"
273 ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
274 -c "from py_compile import compile; compile('$sysconfigfile', optimize=1)"
275 ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
276 -c "from py_compile import compile; compile('$sysconfigfile', optimize=2)"
277 cd -
278
279 mv ${PKGD}/${bindir}/python${PYTHON_MAJMIN}-config ${PKGD}/${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}
280
281 #Remove the unneeded copy of target sysconfig data
282 rm -rf ${PKGD}/${libdir}/python-sysconfigdata
283}
284
285# We want bytecode precompiled .py files (.pyc's) by default
286# but the user may set it on their own conf
287INCLUDE_PYCS ?= "1"
288
289python(){
290 import collections, json
291
292 filename = os.path.join(d.getVar('THISDIR'), 'python3', 'python3-manifest.json')
293 # This python changes the datastore based on the contents of a file, so mark
294 # that dependency.
295 bb.parse.mark_dependency(d, filename)
296
297 with open(filename) as manifest_file:
298 manifest_str = manifest_file.read()
299 json_start = manifest_str.find('# EOC') + 6
300 manifest_file.seek(json_start)
301 manifest_str = manifest_file.read()
302 python_manifest = json.loads(manifest_str, object_pairs_hook=collections.OrderedDict)
303
304 # First set RPROVIDES for -native case
305 # Hardcoded since it cant be python3-native-foo, should be python3-foo-native
306 pn = 'python3'
307 rprovides = (d.getVar('RPROVIDES') or "").split()
308
309 # ${PN}-misc-native is not in the manifest
310 rprovides.append(pn + '-misc-native')
311
312 for key in python_manifest:
313 pypackage = pn + '-' + key + '-native'
314 if pypackage not in rprovides:
315 rprovides.append(pypackage)
316
317 d.setVar('RPROVIDES:class-native', ' '.join(rprovides))
318
319 # Then work on the target
320 include_pycs = d.getVar('INCLUDE_PYCS')
321
322 packages = d.getVar('PACKAGES').split()
323 pn = d.getVar('PN')
324
325 newpackages=[]
326 for key in python_manifest:
327 pypackage = pn + '-' + key
328
329 if pypackage not in packages:
330 # We need to prepend, otherwise python-misc gets everything
331 # so we use a new variable
332 newpackages.append(pypackage)
333
334 # "Build" python's manifest FILES, RDEPENDS and SUMMARY
335 d.setVar('FILES:' + pypackage, '')
336 for value in python_manifest[key]['files']:
337 d.appendVar('FILES:' + pypackage, ' ' + value)
338
339 # Add cached files
340 if include_pycs == '1':
341 for value in python_manifest[key]['cached']:
342 d.appendVar('FILES:' + pypackage, ' ' + value)
343
344 for value in python_manifest[key]['rdepends']:
345 # Make it work with or without $PN
346 if '${PN}' in value:
347 value=value.split('-', 1)[1]
348 d.appendVar('RDEPENDS:' + pypackage, ' ' + pn + '-' + value)
349
350 for value in python_manifest[key].get('rrecommends', ()):
351 if '${PN}' in value:
352 value=value.split('-', 1)[1]
353 d.appendVar('RRECOMMENDS:' + pypackage, ' ' + pn + '-' + value)
354
355 d.setVar('SUMMARY:' + pypackage, python_manifest[key]['summary'])
356
357 # Prepending so to avoid python-misc getting everything
358 packages = newpackages + packages
359 d.setVar('PACKAGES', ' '.join(packages))
360 d.setVar('ALLOW_EMPTY:${PN}-modules', '1')
361 d.setVar('ALLOW_EMPTY:${PN}-pkgutil', '1')
362
363 if "pgo" in d.getVar("PACKAGECONFIG").split() and not bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', True, False, d):
364 bb.fatal("pgo cannot be enabled as there is no qemu-usermode support for this architecture/machine")
365}
366
367# Files needed to create a new manifest
368
369do_create_manifest() {
370 # This task should be run with every new release of Python.
371 # We must ensure that PACKAGECONFIG enables everything when creating
372 # a new manifest, this is to base our new manifest on a complete
373 # native python build, containing all dependencies, otherwise the task
374 # wont be able to find the required files.
375 # e.g. BerkeleyDB is an optional build dependency so it may or may not
376 # be present, we must ensure it is.
377
378 cd ${WORKDIR}
379 # This needs to be executed by python-native and NOT by HOST's python
380 nativepython3 create_manifest3.py ${PYTHON_MAJMIN}
381 cp python3-manifest.json.new ${THISDIR}/python3/python3-manifest.json
382}
383
384# bitbake python -c create_manifest
385# Make sure we have native python ready when we create a new manifest
386addtask do_create_manifest after do_patch do_prepare_recipe_sysroot
387
388# manual dependency additions
389RRECOMMENDS:${PN}-core:append:class-nativesdk = " nativesdk-python3-modules"
390RRECOMMENDS:${PN}-crypt:append:class-target = " ${MLPREFIX}openssl ${MLPREFIX}ca-certificates"
391RRECOMMENDS:${PN}-crypt:append:class-nativesdk = " ${MLPREFIX}openssl ${MLPREFIX}ca-certificates"
392
393# For historical reasons PN is empty and provided by python3-modules
394FILES:${PN} = ""
395RPROVIDES:${PN}-modules = "${PN}"
396
397FILES:${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
398FILES:${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
399
400# provide python-pyvenv from python3-venv
401RPROVIDES:${PN}-venv += "${MLPREFIX}python3-pyvenv"
402
403# package libpython3
404PACKAGES =+ "libpython3 libpython3-staticdev"
405FILES:libpython3 = "${libdir}/libpython*.so.*"
406FILES:libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}-*/libpython${PYTHON_MAJMIN}.a"
407INSANE_SKIP:${PN}-dev += "dev-elf"
408INSANE_SKIP:${PN}-ptest = "dev-deps"
409
410# catch all the rest (unsorted)
411PACKAGES += "${PN}-misc"
412RDEPENDS:${PN}-misc += "\
413 ${PN}-core \
414 ${PN}-email \
415 ${PN}-codecs \
416 ${PN}-pydoc \
417 ${PN}-pickle \
418 ${PN}-audio \
419 ${PN}-numbers \
420"
421RDEPENDS:${PN}-modules:append:class-target = " ${MLPREFIX}python3-misc"
422RDEPENDS:${PN}-modules:append:class-nativesdk = " ${MLPREFIX}python3-misc"
423RDEPENDS:${PN}-modules:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '${MLPREFIX}python3-gdbm', '', d)}"
424FILES:${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload"
425
426# catch manpage
427PACKAGES += "${PN}-man"
428FILES:${PN}-man = "${datadir}/man"
429
430# See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
431RDEPENDS:libpython3:append:libc-glibc = " libgcc"
432RDEPENDS:${PN}-ctypes:append:libc-glibc = " ${MLPREFIX}ldconfig"
433RDEPENDS:${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev unzip bzip2 libgcc tzdata coreutils sed"
434RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-fr-fr locale-base-en-us locale-base-tr-tr locale-base-de-de"
435RDEPENDS:${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${MLPREFIX}tk ${MLPREFIX}tk-lib', '', d)}"
436RDEPENDS:${PN}-idle += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${PN}-tkinter ${MLPREFIX}tcl', '', d)}"
437DEV_PKG_DEPENDENCY = ""
438RDEPENDS:${PN}-pydoc += "${PN}-io"
439
440RDEPENDS:${PN}-tests:append:class-target = " ${MLPREFIX}bash"
441RDEPENDS:${PN}-tests:append:class-nativesdk = " ${MLPREFIX}bash"
442
443# Python's tests contain large numbers of files we don't need in the recipe sysroots
444SYSROOT_PREPROCESS_FUNCS += " py3_sysroot_cleanup"
445py3_sysroot_cleanup () {
446 rm -rf ${SYSROOT_DESTDIR}${libdir}/python${PYTHON_MAJMIN}/test
447}