summaryrefslogtreecommitdiff
path: root/upstream-layers/openembedded-core/meta/recipes-devtools/python/python3-packaging_26.2.bb
blob: eadd70602acee69733396e92c8e9e4fdc46d6aef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
SUMMARY = "Core utilities for Python packages"
HOMEPAGE = "https://github.com/pypa/packaging"
LICENSE = "Apache-2.0 | BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=faadaedca9251a90b205c9167578ce91"

SRC_URI[sha256sum] = "ff452ff5a3e828ce110190feff1178bb1f2ea2281fa2075aadb987c2fb221661"

SRC_URI += "file://run-ptest.in"

inherit pypi python_flit_core ptest

# Bootstrap the native build
DEPENDS:remove:class-native = "python3-build-native"
RDEPENDS:${PN} += "python3-profile"

# This test needs tomli_w which isn't currently in meta/
SKIPLIST = "--ignore=tests/test_pylock.py"
# Tests don't handle manylinux+musl (https://github.com/pypa/packaging/issues/850)
SKIPLIST:append:libc-musl = " --deselect=tests/test_manylinux.py::test_is_manylinux_compatible_old --deselect=tests/test_tags.py::TestManylinuxPlatform --deselect=tests/test_tags.py::TestSysTags"

do_compile:class-native () {
    python_flit_core_do_manual_build
}

do_install_ptest() {
    cp -r ${S}/tests ${D}${PTEST_PATH}/
    # We don't need this script which is used to build the binaries
    rm -f ${D}${PTEST_PATH}/tests/manylinux/build.sh
    sed -e 's|IGNOREDTESTS|${SKIPLIST}|' ${UNPACKDIR}/run-ptest.in > ${D}${PTEST_PATH}/run-ptest
    chmod 0755 ${D}${PTEST_PATH}/run-ptest
}

RDEPENDS:${PN}-ptest = "\
    python3-ctypes \
    python3-hypothesis \
    python3-pretend \
    python3-pytest \
    python3-unittest-automake-output \
"

# The ptest package contains prebuilt test binaries
INSANE_SKIP:${PN} = "already-stripped"
INSANE_SKIP:${PN}-ptest = "arch"

BBCLASSEXTEND = "native nativesdk"