summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3_3.9.6.bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-28 23:28:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-02 15:44:10 +0100
commitbb6ddc3691ab04162ec5fd69a2d5e7876713fd15 (patch)
tree76e376b01253c3aace1a98a5021bcaad3c92e861 /meta/recipes-devtools/python/python3_3.9.6.bb
parentfcc456ee4b8f619134abb4649db53c638074082c (diff)
downloadpoky-bb6ddc3691ab04162ec5fd69a2d5e7876713fd15.tar.gz
Convert to new override syntax
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3_3.9.6.bb')
-rw-r--r--meta/recipes-devtools/python/python3_3.9.6.bb108
1 files changed, 54 insertions, 54 deletions
diff --git a/meta/recipes-devtools/python/python3_3.9.6.bb b/meta/recipes-devtools/python/python3_3.9.6.bb
index 986dfda83d..9fe8e03389 100644
--- a/meta/recipes-devtools/python/python3_3.9.6.bb
+++ b/meta/recipes-devtools/python/python3_3.9.6.bb
@@ -34,7 +34,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
34 file://makerace.patch \ 34 file://makerace.patch \
35 " 35 "
36 36
37SRC_URI_append_class-native = " \ 37SRC_URI:append:class-native = " \
38 file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \ 38 file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \
39 file://12-distutils-prefix-is-inside-staging-area.patch \ 39 file://12-distutils-prefix-is-inside-staging-area.patch \
40 file://0001-Don-t-search-system-for-headers-libraries.patch \ 40 file://0001-Don-t-search-system-for-headers-libraries.patch \
@@ -65,24 +65,24 @@ inherit autotools pkgconfig qemu ptest multilib_header update-alternatives
65 65
66MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}" 66MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"
67 67
68ALTERNATIVE_${PN}-dev = "python3-config" 68ALTERNATIVE:${PN}-dev = "python3-config"
69ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config" 69ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config"
70ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}" 70ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}"
71 71
72 72
73DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2 autoconf-archive-native" 73DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2 autoconf-archive-native"
74DEPENDS_append_class-target = " python3-native" 74DEPENDS:append:class-target = " python3-native"
75DEPENDS_append_class-nativesdk = " python3-native" 75DEPENDS:append:class-nativesdk = " python3-native"
76 76
77EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib}" 77EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib}"
78EXTRA_OECONF_append_class-native = " --bindir=${bindir}/${PN}" 78EXTRA_OECONF:append:class-native = " --bindir=${bindir}/${PN}"
79 79
80export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/" 80export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/"
81 81
82EXTRANATIVEPATH += "python3-native" 82EXTRANATIVEPATH += "python3-native"
83 83
84# LTO will be enabled via packageconfig depending upong distro features 84# LTO will be enabled via packageconfig depending upong distro features
85LTO_class-target = "" 85LTO:class-target = ""
86 86
87CACHED_CONFIGUREVARS = " \ 87CACHED_CONFIGUREVARS = " \
88 ac_cv_file__dev_ptmx=yes \ 88 ac_cv_file__dev_ptmx=yes \
@@ -98,9 +98,9 @@ def possibly_include_pgo(d):
98 98
99 return '' 99 return ''
100 100
101PACKAGECONFIG_class-target ??= "readline ${@possibly_include_pgo(d)} gdbm ${@bb.utils.filter('DISTRO_FEATURES', 'lto', d)}" 101PACKAGECONFIG:class-target ??= "readline ${@possibly_include_pgo(d)} gdbm ${@bb.utils.filter('DISTRO_FEATURES', 'lto', d)}"
102PACKAGECONFIG_class-native ??= "readline gdbm" 102PACKAGECONFIG:class-native ??= "readline gdbm"
103PACKAGECONFIG_class-nativesdk ??= "readline gdbm" 103PACKAGECONFIG:class-nativesdk ??= "readline gdbm"
104PACKAGECONFIG[readline] = ",,readline" 104PACKAGECONFIG[readline] = ",,readline"
105# Use profile guided optimisation by running PyBench inside qemu-user 105# Use profile guided optimisation by running PyBench inside qemu-user
106PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native" 106PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native"
@@ -108,7 +108,7 @@ PACKAGECONFIG[tk] = ",,tk"
108PACKAGECONFIG[gdbm] = ",,gdbm" 108PACKAGECONFIG[gdbm] = ",,gdbm"
109PACKAGECONFIG[lto] = "--with-lto,," 109PACKAGECONFIG[lto] = "--with-lto,,"
110 110
111do_configure_prepend () { 111do_configure:prepend () {
112 mkdir -p ${B}/Modules 112 mkdir -p ${B}/Modules
113 cat > ${B}/Modules/Setup.local << EOF 113 cat > ${B}/Modules/Setup.local << EOF
114*disabled* 114*disabled*
@@ -117,7 +117,7 @@ ${@bb.utils.contains('PACKAGECONFIG', 'readline', '', 'readline', d)}
117EOF 117EOF
118} 118}
119 119
120CPPFLAGS_append = " -I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid" 120CPPFLAGS:append = " -I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid"
121 121
122EXTRA_OEMAKE = '\ 122EXTRA_OEMAKE = '\
123 STAGING_LIBDIR=${STAGING_LIBDIR} \ 123 STAGING_LIBDIR=${STAGING_LIBDIR} \
@@ -125,7 +125,7 @@ EXTRA_OEMAKE = '\
125 LIB=${baselib} \ 125 LIB=${baselib} \
126' 126'
127 127
128do_compile_prepend_class-target() { 128do_compile:prepend:class-target() {
129 if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then 129 if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then
130 qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}', ['${B}', '${STAGING_DIR_TARGET}/${base_libdir}'])}" 130 qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}', ['${B}', '${STAGING_DIR_TARGET}/${base_libdir}'])}"
131 cat >pgo-wrapper <<EOF 131 cat >pgo-wrapper <<EOF
@@ -137,15 +137,15 @@ EOF
137 fi 137 fi
138} 138}
139 139
140do_install_prepend() { 140do_install:prepend() {
141 ${WORKDIR}/check_build_completeness.py ${T}/log.do_compile 141 ${WORKDIR}/check_build_completeness.py ${T}/log.do_compile
142} 142}
143 143
144do_install_append_class-target() { 144do_install:append:class-target() {
145 oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h 145 oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
146} 146}
147 147
148do_install_append_class-native() { 148do_install:append:class-native() {
149 # Make sure we use /usr/bin/env python 149 # Make sure we use /usr/bin/env python
150 for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do 150 for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
151 sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT 151 sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
@@ -157,7 +157,7 @@ do_install_append_class-native() {
157 ln -s python3-native/python3 ${D}${bindir}/nativepython3 157 ln -s python3-native/python3 ${D}${bindir}/nativepython3
158} 158}
159 159
160do_install_append() { 160do_install:append() {
161 mkdir -p ${D}${libdir}/python-sysconfigdata 161 mkdir -p ${D}${libdir}/python-sysconfigdata
162 sysconfigfile=`find ${D} -name _sysconfig*.py` 162 sysconfigfile=`find ${D} -name _sysconfig*.py`
163 cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py 163 cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
@@ -179,7 +179,7 @@ do_install_append() {
179 rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython* 179 rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython*
180} 180}
181 181
182do_install_append_class-nativesdk () { 182do_install:append:class-nativesdk () {
183 # Make sure we use /usr/bin/env python 183 # Make sure we use /usr/bin/env python
184 for PYTHSCRIPT in `grep -rIl ${bindir}/python ${D}${bindir}`; do 184 for PYTHSCRIPT in `grep -rIl ${bindir}/python ${D}${bindir}`; do
185 sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT 185 sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
@@ -257,7 +257,7 @@ python(){
257 if pypackage not in rprovides: 257 if pypackage not in rprovides:
258 rprovides.append(pypackage) 258 rprovides.append(pypackage)
259 259
260 d.setVar('RPROVIDES_class-native', ' '.join(rprovides)) 260 d.setVar('RPROVIDES:class-native', ' '.join(rprovides))
261 261
262 # Then work on the target 262 # Then work on the target
263 include_pycs = d.getVar('INCLUDE_PYCS') 263 include_pycs = d.getVar('INCLUDE_PYCS')
@@ -275,33 +275,33 @@ python(){
275 newpackages.append(pypackage) 275 newpackages.append(pypackage)
276 276
277 # "Build" python's manifest FILES, RDEPENDS and SUMMARY 277 # "Build" python's manifest FILES, RDEPENDS and SUMMARY
278 d.setVar('FILES_' + pypackage, '') 278 d.setVar('FILES:' + pypackage, '')
279 for value in python_manifest[key]['files']: 279 for value in python_manifest[key]['files']:
280 d.appendVar('FILES_' + pypackage, ' ' + value) 280 d.appendVar('FILES:' + pypackage, ' ' + value)
281 281
282 # Add cached files 282 # Add cached files
283 if include_pycs == '1': 283 if include_pycs == '1':
284 for value in python_manifest[key]['cached']: 284 for value in python_manifest[key]['cached']:
285 d.appendVar('FILES_' + pypackage, ' ' + value) 285 d.appendVar('FILES:' + pypackage, ' ' + value)
286 286
287 for value in python_manifest[key]['rdepends']: 287 for value in python_manifest[key]['rdepends']:
288 # Make it work with or without $PN 288 # Make it work with or without $PN
289 if '${PN}' in value: 289 if '${PN}' in value:
290 value=value.split('-', 1)[1] 290 value=value.split('-', 1)[1]
291 d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value) 291 d.appendVar('RDEPENDS:' + pypackage, ' ' + pn + '-' + value)
292 292
293 for value in python_manifest[key].get('rrecommends', ()): 293 for value in python_manifest[key].get('rrecommends', ()):
294 if '${PN}' in value: 294 if '${PN}' in value:
295 value=value.split('-', 1)[1] 295 value=value.split('-', 1)[1]
296 d.appendVar('RRECOMMENDS_' + pypackage, ' ' + pn + '-' + value) 296 d.appendVar('RRECOMMENDS:' + pypackage, ' ' + pn + '-' + value)
297 297
298 d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary']) 298 d.setVar('SUMMARY:' + pypackage, python_manifest[key]['summary'])
299 299
300 # Prepending so to avoid python-misc getting everything 300 # Prepending so to avoid python-misc getting everything
301 packages = newpackages + packages 301 packages = newpackages + packages
302 d.setVar('PACKAGES', ' '.join(packages)) 302 d.setVar('PACKAGES', ' '.join(packages))
303 d.setVar('ALLOW_EMPTY_${PN}-modules', '1') 303 d.setVar('ALLOW_EMPTY:${PN}-modules', '1')
304 d.setVar('ALLOW_EMPTY_${PN}-pkgutil', '1') 304 d.setVar('ALLOW_EMPTY:${PN}-pkgutil', '1')
305} 305}
306 306
307# Files needed to create a new manifest 307# Files needed to create a new manifest
@@ -326,30 +326,30 @@ do_create_manifest() {
326addtask do_create_manifest after do_patch do_prepare_recipe_sysroot 326addtask do_create_manifest after do_patch do_prepare_recipe_sysroot
327 327
328# manual dependency additions 328# manual dependency additions
329RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python3-modules" 329RRECOMMENDS:${PN}-core:append:class-nativesdk = " nativesdk-python3-modules"
330RRECOMMENDS_${PN}-crypt_append_class-target = " ${MLPREFIX}openssl ${MLPREFIX}ca-certificates" 330RRECOMMENDS:${PN}-crypt:append:class-target = " ${MLPREFIX}openssl ${MLPREFIX}ca-certificates"
331RRECOMMENDS_${PN}-crypt_append_class-nativesdk = " ${MLPREFIX}openssl ${MLPREFIX}ca-certificates" 331RRECOMMENDS:${PN}-crypt:append:class-nativesdk = " ${MLPREFIX}openssl ${MLPREFIX}ca-certificates"
332 332
333# For historical reasons PN is empty and provided by python3-modules 333# For historical reasons PN is empty and provided by python3-modules
334FILES_${PN} = "" 334FILES:${PN} = ""
335RPROVIDES_${PN}-modules = "${PN}" 335RPROVIDES:${PN}-modules = "${PN}"
336 336
337FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3" 337FILES:${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
338FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}" 338FILES:${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
339 339
340# provide python-pyvenv from python3-venv 340# provide python-pyvenv from python3-venv
341RPROVIDES_${PN}-venv += "${MLPREFIX}python3-pyvenv" 341RPROVIDES:${PN}-venv += "${MLPREFIX}python3-pyvenv"
342 342
343# package libpython3 343# package libpython3
344PACKAGES =+ "libpython3 libpython3-staticdev" 344PACKAGES =+ "libpython3 libpython3-staticdev"
345FILES_libpython3 = "${libdir}/libpython*.so.*" 345FILES:libpython3 = "${libdir}/libpython*.so.*"
346FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}-*/libpython${PYTHON_MAJMIN}.a" 346FILES:libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}-*/libpython${PYTHON_MAJMIN}.a"
347INSANE_SKIP_${PN}-dev += "dev-elf" 347INSANE_SKIP:${PN}-dev += "dev-elf"
348INSANE_SKIP_${PN}-ptest = "dev-deps" 348INSANE_SKIP:${PN}-ptest = "dev-deps"
349 349
350# catch all the rest (unsorted) 350# catch all the rest (unsorted)
351PACKAGES += "${PN}-misc" 351PACKAGES += "${PN}-misc"
352RDEPENDS_${PN}-misc += "\ 352RDEPENDS:${PN}-misc += "\
353 ${PN}-core \ 353 ${PN}-core \
354 ${PN}-email \ 354 ${PN}-email \
355 ${PN}-codecs \ 355 ${PN}-codecs \
@@ -358,26 +358,26 @@ RDEPENDS_${PN}-misc += "\
358 ${PN}-audio \ 358 ${PN}-audio \
359 ${PN}-numbers \ 359 ${PN}-numbers \
360" 360"
361RDEPENDS_${PN}-modules_append_class-target = " ${MLPREFIX}python3-misc" 361RDEPENDS:${PN}-modules:append:class-target = " ${MLPREFIX}python3-misc"
362RDEPENDS_${PN}-modules_append_class-nativesdk = " ${MLPREFIX}python3-misc" 362RDEPENDS:${PN}-modules:append:class-nativesdk = " ${MLPREFIX}python3-misc"
363FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload" 363FILES:${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload"
364 364
365# catch manpage 365# catch manpage
366PACKAGES += "${PN}-man" 366PACKAGES += "${PN}-man"
367FILES_${PN}-man = "${datadir}/man" 367FILES:${PN}-man = "${datadir}/man"
368 368
369# See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395 369# See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
370RDEPENDS_libpython3_append_libc-glibc = " libgcc" 370RDEPENDS:libpython3:append:libc-glibc = " libgcc"
371RDEPENDS_${PN}-ctypes_append_libc-glibc = " ${MLPREFIX}ldconfig" 371RDEPENDS:${PN}-ctypes:append:libc-glibc = " ${MLPREFIX}ldconfig"
372RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev unzip bzip2 libgcc tzdata-europe coreutils sed" 372RDEPENDS:${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev unzip bzip2 libgcc tzdata-europe coreutils sed"
373RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-tr-tr.iso-8859-9" 373RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-tr-tr.iso-8859-9"
374RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}" 374RDEPENDS:${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}"
375RDEPENDS_${PN}-idle += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${PN}-tkinter tcl', '', d)}" 375RDEPENDS:${PN}-idle += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${PN}-tkinter tcl', '', d)}"
376RDEPENDS_${PN}-dev = "" 376RDEPENDS:${PN}-dev = ""
377RDEPENDS_${PN}-pydoc += "${PN}-io" 377RDEPENDS:${PN}-pydoc += "${PN}-io"
378 378
379RDEPENDS_${PN}-tests_append_class-target = " ${MLPREFIX}bash" 379RDEPENDS:${PN}-tests:append:class-target = " ${MLPREFIX}bash"
380RDEPENDS_${PN}-tests_append_class-nativesdk = " ${MLPREFIX}bash" 380RDEPENDS:${PN}-tests:append:class-nativesdk = " ${MLPREFIX}bash"
381 381
382# Python's tests contain large numbers of files we don't need in the recipe sysroots 382# Python's tests contain large numbers of files we don't need in the recipe sysroots
383SYSROOT_PREPROCESS_FUNCS += " py3_sysroot_cleanup" 383SYSROOT_PREPROCESS_FUNCS += " py3_sysroot_cleanup"