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