Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,42 @@
SUMMARY = "The Cython language"
HOMEPAGE = "https://pypi.org/project/Cython/"
DESCRIPTION = "Cython is a language specially designed for writing Python extension modules. \
It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \
and the messy, low-level world of C."
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e23fadd6ceef8c618fc1c65191d846fa"
PYPI_PACKAGE = "Cython"
BBCLASSEXTEND = "native nativesdk"
SRC_URI[sha256sum] = "41c0cfd2d754e383c9eeb95effc9aa4ab847d0c9747077ddd7c0dcb68c3bc01f"
UPSTREAM_CHECK_REGEX = "Cython-(?P<pver>.*)\.tar"
inherit pypi
RDEPENDS:${PN}:class-target += "\
${PYTHON_PN}-misc \
${PYTHON_PN}-netserver \
${PYTHON_PN}-pkgutil \
${PYTHON_PN}-pyparsing \
${PYTHON_PN}-setuptools \
${PYTHON_PN}-shell \
${PYTHON_PN}-xml \
"
RDEPENDS:${PN}:class-nativesdk += "\
nativesdk-${PYTHON_PN}-misc \
nativesdk-${PYTHON_PN}-netserver \
nativesdk-${PYTHON_PN}-pkgutil \
nativesdk-${PYTHON_PN}-pyparsing \
nativesdk-${PYTHON_PN}-setuptools \
nativesdk-${PYTHON_PN}-shell \
nativesdk-${PYTHON_PN}-xml \
"
do_install:append() {
# Make sure we use /usr/bin/env python
for PYTHSCRIPT in `grep -rIl '^#!.*python' ${D}`; do
sed -i -e '1s|^#!.*|#!/usr/bin/env ${PYTHON_PN}|' $PYTHSCRIPT
done
}
@@ -0,0 +1,12 @@
SUMMARY = "Useful extra bits for Python - things that should be in the standard library"
HOMEPAGE = "https://pypi.org/project/extras/"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=6d108f338b2f68fe48ac366c4650bd8b"
inherit pypi
SRC_URI[md5sum] = "3a63ad60cf8f0186c9e3a02f55ec5b14"
SRC_URI[sha256sum] = "132e36de10b9c91d5d4cc620160a476e0468a88f16c9431817a6729611a81b4e"
BBCLASSEXTEND = "nativesdk"
@@ -0,0 +1,14 @@
SUMMARY = "Python Build Reasonableness"
DESCRIPTION = "PBR is a library that injects some useful and sensible default behaviors into your setuptools run"
HOMEPAGE = "https://pypi.org/project/pbr"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRC_URI += "file://0001-change-shebang-to-python3.patch"
inherit pypi
RDEPENDS:${PN} += "${PYTHON_PN}-pip"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,31 @@
SUMMARY = "Python library implementing ASN.1 types."
HOMEPAGE = "http://pyasn1.sourceforge.net/"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=190f79253908c986e6cacf380c3a5f6d"
SRC_URI[sha256sum] = "97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde"
RDEPENDS:${PN}:class-target += " \
${PYTHON_PN}-codecs \
${PYTHON_PN}-logging \
${PYTHON_PN}-math \
${PYTHON_PN}-shell \
"
BBCLASSEXTEND = "native nativesdk"
inherit ptest
SRC_URI += " \
file://run-ptest \
"
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-pytest \
${PYTHON_PN}-unittest-automake-output \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
}
@@ -0,0 +1,30 @@
SUMMARY = "Cryptographic library for Python"
DESCRIPTION = "PyCryptodome is a self-contained Python package of low-level\
cryptographic primitives."
HOMEPAGE = "http://www.pycryptodome.org"
LICENSE = "PD & BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=29242a70410a4eeff488a28164e7ab93"
inherit pypi
PYPI_PACKAGE_EXT = "tar.gz"
RDEPENDS:${PN} += " \
python3-cffi \
python3-ctypes \
python3-io \
python3-math \
"
RDEPENDS:${PN}-tests += " \
python3-unittest \
"
PACKAGES =+ "${PN}-tests"
FILES:${PN}-tests = " \
${PYTHON_SITEPACKAGES_DIR}/Crypto/SelfTest/ \
${PYTHON_SITEPACKAGES_DIR}/Crypto/SelfTest/__pycache__/ \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,32 @@
From 3531ff73631a0d59234eb4713e7b3a7f5ea57bbb Mon Sep 17 00:00:00 2001
From: Nicola Lunghi <nicola.lunghi@jci.com>
Date: Thu, 14 Nov 2019 12:17:51 +0000
Subject: [PATCH] setup.py: move pytest-runner to test_requirements
This fixes an issue with yocto build.
pytest-runner is only needed when running tests.
Upstream-Status: Pending
---
setup.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index 53ebea7..ebb0de2 100644
--- a/setup.py
+++ b/setup.py
@@ -10,9 +10,9 @@ with open('README.md') as readme_file:
requirements = []
-setup_requirements = ['pytest-runner', ]
+setup_requirements = []
-test_requirements = ['pytest>=3', ]
+test_requirements = ['pytest>=3', 'pytest-runner']
setup(
author="Nicolas Aimetti",
--
2.20.1
@@ -0,0 +1,11 @@
SUMMARY = "Python 2 and 3 compatibility library"
HOMEPAGE = "https://pypi.org/project/six/"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=43cfc9e4ac0e377acfb9b76f56b8415d"
inherit pypi
RDEPENDS:${PN} = "${PYTHON_PN}-io"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,27 @@
SUMMARY = "Extensions to the Python standard library unit testing framework"
HOMEPAGE = "https://pypi.org/project/testtools/"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e2c9d3e8ba7141c83bfef190e0b9379a"
inherit pypi
SRC_URI[sha256sum] = "28b65e14c0f2d3ecbbfb5f55c9dcde5e4faa80ac16a37a823909a1fe3cbcb30a"
DEPENDS += " \
${PYTHON_PN}-pbr \
"
# Satisfy setup.py 'setup_requires'
DEPENDS += " \
${PYTHON_PN}-pbr-native \
"
RDEPENDS:${PN} += "\
${PYTHON_PN}-doctest \
${PYTHON_PN}-extras \
${PYTHON_PN}-pbr \
${PYTHON_PN}-six \
"
BBCLASSEXTEND = "nativesdk"
@@ -0,0 +1,11 @@
SUMMARY = "Alabaster is a visually (c)lean, responsive, configurable theme for the Sphinx documentation system."
HOMEPAGE = "https://alabaster.readthedocs.io/en/latest/"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=21860fdb805bf4e0bfaf94b566b747fa"
SRC_URI[sha256sum] = "a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"
inherit setuptools3 pypi
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,24 @@
SUMMARY = "A fast, pure Python library for parsing and serializing ASN.1 structures"
HOMEPAGE = "https://github.com/wbond/asn1crypto"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b5cda97fbd7959ad47a952651a87051a"
PYPI_PACKAGE = "asn1crypto"
SRC_URI[sha256sum] = "13ae38502be632115abf8a24cbe5f4da52e3b5231990aff31123c805306ccb9c"
inherit pypi setuptools3
RDEPENDS:${PN}:class-target += " \
${PYTHON_PN}-codecs \
${PYTHON_PN}-crypt \
${PYTHON_PN}-ctypes \
${PYTHON_PN}-datetime \
${PYTHON_PN}-io \
${PYTHON_PN}-netclient \
${PYTHON_PN}-numbers \
${PYTHON_PN}-shell \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,3 @@
#!/bin/sh
pytest --automake
@@ -0,0 +1,27 @@
SUMMARY = "Powerful Python library for atomic file writes"
HOMEPAGE = "https://github.com/untitaker/python-atomicwrites"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=91cc36cfafeefb7863673bcfcb1d4da4"
SRC_URI[sha256sum] = "81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"
inherit pypi setuptools3 ptest
SRC_URI += " \
file://run-ptest \
"
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-pytest \
${PYTHON_PN}-unittest-automake-output \
${PYTHON_PN}-unixadmin \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
}
RDEPENDS:${PN} = "${PYTHON_PN}-misc"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,21 @@
SUMMARY = "Classes Without Boilerplate"
HOMEPAGE = "http://www.attrs.org/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5e55731824cf9205cfabeab9a0600887"
SRC_URI[sha256sum] = "6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"
inherit pypi python_hatchling
DEPENDS += " \
python3-hatch-vcs-native \
python3-hatch-fancy-pypi-readme-native \
"
RDEPENDS:${PN}+= " \
python3-compression \
python3-ctypes \
python3-crypt \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,26 @@
SUMMARY = "A collection of tools for internationalizing Python applications"
HOMEPAGE = "http://babel.edgewall.org/"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=0f97d9a63e91407b4c0d01efde91cfc0"
SRC_URI[sha256sum] = "cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455"
PYPI_PACKAGE = "Babel"
inherit pypi setuptools3
CLEANBROKEN = "1"
RDEPENDS:${PN} += " \
${PYTHON_PN}-codecs \
${PYTHON_PN}-difflib \
${PYTHON_PN}-distutils \
${PYTHON_PN}-netserver \
${PYTHON_PN}-numbers \
${PYTHON_PN}-pickle \
${PYTHON_PN}-pytz \
${PYTHON_PN}-shell \
${PYTHON_PN}-threading \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,104 @@
# Autogenerated with 'bitbake -c update_crates python3-bcrypt'
# from src/_bcrypt/Cargo.lock
SRC_URI += " \
crate://crates.io/autocfg/1.1.0 \
crate://crates.io/base64/0.13.0 \
crate://crates.io/bcrypt/0.13.0 \
crate://crates.io/bcrypt-pbkdf/0.8.1 \
crate://crates.io/bitflags/1.3.2 \
crate://crates.io/block-buffer/0.10.3 \
crate://crates.io/blowfish/0.9.1 \
crate://crates.io/byteorder/1.4.3 \
crate://crates.io/cfg-if/1.0.0 \
crate://crates.io/cipher/0.4.3 \
crate://crates.io/cpufeatures/0.2.5 \
crate://crates.io/crypto-common/0.1.6 \
crate://crates.io/digest/0.10.5 \
crate://crates.io/generic-array/0.14.6 \
crate://crates.io/getrandom/0.2.7 \
crate://crates.io/indoc/0.3.6 \
crate://crates.io/indoc-impl/0.3.6 \
crate://crates.io/inout/0.1.3 \
crate://crates.io/instant/0.1.12 \
crate://crates.io/libc/0.2.134 \
crate://crates.io/lock_api/0.4.9 \
crate://crates.io/once_cell/1.15.0 \
crate://crates.io/parking_lot/0.11.2 \
crate://crates.io/parking_lot_core/0.8.5 \
crate://crates.io/paste/0.1.18 \
crate://crates.io/paste-impl/0.1.18 \
crate://crates.io/pbkdf2/0.10.1 \
crate://crates.io/proc-macro-hack/0.5.19 \
crate://crates.io/proc-macro2/1.0.46 \
crate://crates.io/pyo3/0.15.2 \
crate://crates.io/pyo3-build-config/0.15.2 \
crate://crates.io/pyo3-macros/0.15.2 \
crate://crates.io/pyo3-macros-backend/0.15.2 \
crate://crates.io/quote/1.0.21 \
crate://crates.io/redox_syscall/0.2.16 \
crate://crates.io/scopeguard/1.1.0 \
crate://crates.io/sha2/0.10.6 \
crate://crates.io/smallvec/1.10.0 \
crate://crates.io/subtle/2.4.1 \
crate://crates.io/syn/1.0.102 \
crate://crates.io/typenum/1.15.0 \
crate://crates.io/unicode-ident/1.0.4 \
crate://crates.io/unindent/0.1.10 \
crate://crates.io/version_check/0.9.4 \
crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \
crate://crates.io/winapi/0.3.9 \
crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
crate://crates.io/zeroize/1.5.7 \
"
SRC_URI[autocfg-1.1.0.sha256sum] = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
SRC_URI[base64-0.13.0.sha256sum] = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
SRC_URI[bcrypt-0.13.0.sha256sum] = "a7e7c93a3fb23b2fdde989b2c9ec4dd153063ec81f408507f84c090cd91c6641"
SRC_URI[bcrypt-pbkdf-0.8.1.sha256sum] = "f4ef233ffa9cb9c7820b2b0e9efd0821ed180e866c9120ec9f45518659742074"
SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
SRC_URI[block-buffer-0.10.3.sha256sum] = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e"
SRC_URI[blowfish-0.9.1.sha256sum] = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7"
SRC_URI[byteorder-1.4.3.sha256sum] = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
SRC_URI[cipher-0.4.3.sha256sum] = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e"
SRC_URI[cpufeatures-0.2.5.sha256sum] = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320"
SRC_URI[crypto-common-0.1.6.sha256sum] = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
SRC_URI[digest-0.10.5.sha256sum] = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c"
SRC_URI[generic-array-0.14.6.sha256sum] = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9"
SRC_URI[getrandom-0.2.7.sha256sum] = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"
SRC_URI[indoc-0.3.6.sha256sum] = "47741a8bc60fb26eb8d6e0238bbb26d8575ff623fdc97b1a2c00c050b9684ed8"
SRC_URI[indoc-impl-0.3.6.sha256sum] = "ce046d161f000fffde5f432a0d034d0341dc152643b2598ed5bfce44c4f3a8f0"
SRC_URI[inout-0.1.3.sha256sum] = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
SRC_URI[instant-0.1.12.sha256sum] = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
SRC_URI[libc-0.2.134.sha256sum] = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb"
SRC_URI[lock_api-0.4.9.sha256sum] = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
SRC_URI[once_cell-1.15.0.sha256sum] = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1"
SRC_URI[parking_lot-0.11.2.sha256sum] = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
SRC_URI[parking_lot_core-0.8.5.sha256sum] = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"
SRC_URI[paste-0.1.18.sha256sum] = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880"
SRC_URI[paste-impl-0.1.18.sha256sum] = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6"
SRC_URI[pbkdf2-0.10.1.sha256sum] = "271779f35b581956db91a3e55737327a03aa051e90b1c47aeb189508533adfd7"
SRC_URI[proc-macro-hack-0.5.19.sha256sum] = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
SRC_URI[proc-macro2-1.0.46.sha256sum] = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b"
SRC_URI[pyo3-0.15.2.sha256sum] = "d41d50a7271e08c7c8a54cd24af5d62f73ee3a6f6a314215281ebdec421d5752"
SRC_URI[pyo3-build-config-0.15.2.sha256sum] = "779239fc40b8e18bc8416d3a37d280ca9b9fb04bda54b98037bb6748595c2410"
SRC_URI[pyo3-macros-0.15.2.sha256sum] = "00b247e8c664be87998d8628e86f282c25066165f1f8dda66100c48202fdb93a"
SRC_URI[pyo3-macros-backend-0.15.2.sha256sum] = "5a8c2812c412e00e641d99eeb79dd478317d981d938aa60325dfa7157b607095"
SRC_URI[quote-1.0.21.sha256sum] = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
SRC_URI[redox_syscall-0.2.16.sha256sum] = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
SRC_URI[scopeguard-1.1.0.sha256sum] = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
SRC_URI[sha2-0.10.6.sha256sum] = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0"
SRC_URI[smallvec-1.10.0.sha256sum] = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
SRC_URI[subtle-2.4.1.sha256sum] = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
SRC_URI[syn-1.0.102.sha256sum] = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1"
SRC_URI[typenum-1.15.0.sha256sum] = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
SRC_URI[unicode-ident-1.0.4.sha256sum] = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd"
SRC_URI[unindent-0.1.10.sha256sum] = "58ee9362deb4a96cef4d437d1ad49cffc9b9e92d202b6995674e928ce684f112"
SRC_URI[version_check-0.9.4.sha256sum] = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
SRC_URI[wasi-0.11.0+wasi-snapshot-preview1.sha256sum] = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
SRC_URI[zeroize-1.5.7.sha256sum] = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f"
@@ -0,0 +1,3 @@
#!/bin/sh
pytest --automake
@@ -0,0 +1,36 @@
SUMMARY = "Modern password hashing for your software and your servers."
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8f7bb094c7232b058c7e9f2e431f389c"
HOMEPAGE = "https://pypi.org/project/bcrypt/"
DEPENDS += "${PYTHON_PN}-cffi-native"
LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', ' -fuse-ld=bfd', '', d)}"
SRC_URI[sha256sum] = "27d375903ac8261cfe4047f6709d16f7d18d39b1ec92aaf72af989552a650ebd"
inherit pypi python_setuptools3_rust ptest-cargo cargo-update-recipe-crates
SRC_URI += " \
file://run-ptest \
"
CARGO_SRC_DIR = "src/_bcrypt"
require ${BPN}-crates.inc
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-pytest \
${PYTHON_PN}-unittest-automake-output \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
}
RDEPENDS:${PN}:class-target += "\
${PYTHON_PN}-cffi \
${PYTHON_PN}-ctypes \
${PYTHON_PN}-shell \
${PYTHON_PN}-six \
"
@@ -0,0 +1,32 @@
SUMMARY = "A simple, correct PEP517 package builder"
HOMEPAGE = "https://github.com/pypa/build"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=310439af287b0fb4780b2ad6907c256c"
SRC_URI[sha256sum] = "d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269"
inherit pypi python_flit_core
DEPENDS += "python3-pyproject-hooks-native"
DEPENDS:remove:class-native = "python3-build-native"
# Skip dependencies as we're doing a minimal build to bootstrap
PEP517_BUILD_OPTS:class-native = "--skip-dependency-check"
do_compile:prepend:class-native() {
export PYTHONPATH="${S}/src"
}
RDEPENDS:${PN} += " \
python3-compression \
python3-difflib \
python3-ensurepip \
python3-logging \
python3-packaging \
python3-pyproject-hooks \
python3-tomllib \
python3-venv \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,32 @@
From 390a233ed969f82b2ef209b23bfb523e785603f9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
Date: Tue, 9 May 2023 10:19:41 -0400
Subject: [PATCH] setup.py: hard-code version
setup.py is pulling the build version from the current date rather than
a release tag or other predictable method, causing reproducibility
issues in builds. Patch this to make reproducible builds work while
discussing this with upstream maintainer (or developing a patch that can
make calver rely on a more standard pyproject.toml solution).
Upstream-Status: Inappropriate (configuration)
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 73f6b10..2e27cf1 100644
--- a/setup.py
+++ b/setup.py
@@ -42,5 +42,5 @@ setup(
"use_calver = calver.integration:version",
],
},
- version=calver_version(True),
+ version=calver_version("2022.6.26"),
)
--
2.40.0
@@ -0,0 +1,3 @@
#!/bin/sh
pytest --automake
@@ -0,0 +1,28 @@
SUMMARY = "Setuptools extension for CalVer package versions"
HOMEPAGE = "https://github.com/di/calver"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRC_URI = " \
git://github.com/di/calver;branch=master;protocol=https \
file://run-ptest \
file://0001-setup.py-hard-code-version.patch \
"
SRCREV = "3268d8acf2c345f32a1c5f08ba25dc67f76cca81"
inherit python_setuptools_build_meta ptest
S = "${WORKDIR}/git"
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-pretend \
${PYTHON_PN}-pytest \
${PYTHON_PN}-unittest-automake-output \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests ${D}${PTEST_PATH}/
}
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,16 @@
SUMMARY = "Python package for providing Mozilla's CA Bundle."
DESCRIPTION = "This installable Python package contains a CA Bundle that you can reference in your \
Python code. This is useful for verifying HTTP requests, for example. This is the same CA Bundle \
which ships with the Requests codebase, and is derived from Mozilla Firefox's canonical set."
HOMEPAGE = " http://certifi.io/"
LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3c2b7404369c587c3559afb604fce2f2"
SRC_URI[sha256sum] = "0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"
inherit pypi setuptools3
BBCLASSEXTEND = "native nativesdk"
RDEPENDS:${PN} += "python3-io"
@@ -0,0 +1,18 @@
SUMMARY = "Foreign Function Interface for Python calling C code"
HOMEPAGE = "http://cffi.readthedocs.org/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5677e2fdbf7cdda61d6dd2b57df547bf"
DEPENDS += "libffi ${PYTHON_PN}-pycparser"
SRC_URI[sha256sum] = "d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"
inherit pypi setuptools3
RDEPENDS:${PN}:class-target = " \
${PYTHON_PN}-ctypes \
${PYTHON_PN}-io \
${PYTHON_PN}-pycparser \
${PYTHON_PN}-shell \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,24 @@
SUMMARY = "Universal encoding detector for Python 2 and 3"
HOMEPAGE = "https://pypi.org/project/chardet/"
LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4fbd65380cdd255951079008b364516c"
SRC_URI[sha256sum] = "0d62712b956bc154f85fb0a266e2a3c5913c2967e00348701b32411d6def31e5"
# setup.py of chardet needs this.
DEPENDS += "${PYTHON_PN}-pytest-runner-native"
inherit pypi python_setuptools_build_meta
PACKAGES =+ "${PN}-cli"
FILES:${PN}-cli += " \
${PYTHON_SITEPACKAGES_DIR}/chardet/cli \
"
RDEPENDS:${PN}-cli = "${PN} "
RDEPENDS:${PN}:class-target += " \
${PYTHON_PN}-logging \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,112 @@
# Autogenerated with 'bitbake -c update_crates python3-cryptography'
# from src/rust/Cargo.lock
SRC_URI += " \
crate://crates.io/Inflector/0.11.4 \
crate://crates.io/aliasable/0.1.3 \
crate://crates.io/asn1/0.15.2 \
crate://crates.io/asn1_derive/0.15.2 \
crate://crates.io/autocfg/1.1.0 \
crate://crates.io/base64/0.13.1 \
crate://crates.io/bitflags/1.3.2 \
crate://crates.io/cc/1.0.79 \
crate://crates.io/cfg-if/1.0.0 \
crate://crates.io/foreign-types/0.3.2 \
crate://crates.io/foreign-types-shared/0.1.1 \
crate://crates.io/indoc/1.0.9 \
crate://crates.io/libc/0.2.144 \
crate://crates.io/lock_api/0.4.9 \
crate://crates.io/memoffset/0.8.0 \
crate://crates.io/once_cell/1.17.2 \
crate://crates.io/openssl/0.10.54 \
crate://crates.io/openssl-macros/0.1.1 \
crate://crates.io/openssl-sys/0.9.88 \
crate://crates.io/ouroboros/0.15.6 \
crate://crates.io/ouroboros_macro/0.15.6 \
crate://crates.io/parking_lot/0.12.1 \
crate://crates.io/parking_lot_core/0.9.7 \
crate://crates.io/pem/1.1.1 \
crate://crates.io/pkg-config/0.3.27 \
crate://crates.io/proc-macro-error/1.0.4 \
crate://crates.io/proc-macro-error-attr/1.0.4 \
crate://crates.io/proc-macro2/1.0.64 \
crate://crates.io/pyo3/0.18.3 \
crate://crates.io/pyo3-build-config/0.18.3 \
crate://crates.io/pyo3-ffi/0.18.3 \
crate://crates.io/pyo3-macros/0.18.3 \
crate://crates.io/pyo3-macros-backend/0.18.3 \
crate://crates.io/quote/1.0.28 \
crate://crates.io/redox_syscall/0.2.16 \
crate://crates.io/scopeguard/1.1.0 \
crate://crates.io/smallvec/1.10.0 \
crate://crates.io/syn/1.0.109 \
crate://crates.io/syn/2.0.18 \
crate://crates.io/target-lexicon/0.12.7 \
crate://crates.io/unicode-ident/1.0.9 \
crate://crates.io/unindent/0.1.11 \
crate://crates.io/vcpkg/0.2.15 \
crate://crates.io/version_check/0.9.4 \
crate://crates.io/windows-sys/0.45.0 \
crate://crates.io/windows-targets/0.42.2 \
crate://crates.io/windows_aarch64_gnullvm/0.42.2 \
crate://crates.io/windows_aarch64_msvc/0.42.2 \
crate://crates.io/windows_i686_gnu/0.42.2 \
crate://crates.io/windows_i686_msvc/0.42.2 \
crate://crates.io/windows_x86_64_gnu/0.42.2 \
crate://crates.io/windows_x86_64_gnullvm/0.42.2 \
crate://crates.io/windows_x86_64_msvc/0.42.2 \
"
SRC_URI[Inflector-0.11.4.sha256sum] = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"
SRC_URI[aliasable-0.1.3.sha256sum] = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd"
SRC_URI[asn1-0.15.2.sha256sum] = "28c19b9324de5b815b6487e0f8098312791b09de0dbf3d5c2db1fe2d95bab973"
SRC_URI[asn1_derive-0.15.2.sha256sum] = "a045c3ccad89f244a86bd1e6cf1a7bf645296e7692698b056399b6efd4639407"
SRC_URI[autocfg-1.1.0.sha256sum] = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
SRC_URI[base64-0.13.1.sha256sum] = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
SRC_URI[cc-1.0.79.sha256sum] = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
SRC_URI[foreign-types-0.3.2.sha256sum] = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
SRC_URI[foreign-types-shared-0.1.1.sha256sum] = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
SRC_URI[indoc-1.0.9.sha256sum] = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306"
SRC_URI[libc-0.2.144.sha256sum] = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1"
SRC_URI[lock_api-0.4.9.sha256sum] = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
SRC_URI[memoffset-0.8.0.sha256sum] = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
SRC_URI[once_cell-1.17.2.sha256sum] = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b"
SRC_URI[openssl-0.10.54.sha256sum] = "69b3f656a17a6cbc115b5c7a40c616947d213ba182135b014d6051b73ab6f019"
SRC_URI[openssl-macros-0.1.1.sha256sum] = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
SRC_URI[openssl-sys-0.9.88.sha256sum] = "c2ce0f250f34a308dcfdbb351f511359857d4ed2134ba715a4eadd46e1ffd617"
SRC_URI[ouroboros-0.15.6.sha256sum] = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db"
SRC_URI[ouroboros_macro-0.15.6.sha256sum] = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7"
SRC_URI[parking_lot-0.12.1.sha256sum] = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
SRC_URI[parking_lot_core-0.9.7.sha256sum] = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
SRC_URI[pem-1.1.1.sha256sum] = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8"
SRC_URI[pkg-config-0.3.27.sha256sum] = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
SRC_URI[proc-macro-error-1.0.4.sha256sum] = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
SRC_URI[proc-macro-error-attr-1.0.4.sha256sum] = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
SRC_URI[proc-macro2-1.0.64.sha256sum] = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da"
SRC_URI[pyo3-0.18.3.sha256sum] = "e3b1ac5b3731ba34fdaa9785f8d74d17448cd18f30cf19e0c7e7b1fdb5272109"
SRC_URI[pyo3-build-config-0.18.3.sha256sum] = "9cb946f5ac61bb61a5014924910d936ebd2b23b705f7a4a3c40b05c720b079a3"
SRC_URI[pyo3-ffi-0.18.3.sha256sum] = "fd4d7c5337821916ea2a1d21d1092e8443cf34879e53a0ac653fbb98f44ff65c"
SRC_URI[pyo3-macros-0.18.3.sha256sum] = "a9d39c55dab3fc5a4b25bbd1ac10a2da452c4aca13bb450f22818a002e29648d"
SRC_URI[pyo3-macros-backend-0.18.3.sha256sum] = "97daff08a4c48320587b5224cc98d609e3c27b6d437315bd40b605c98eeb5918"
SRC_URI[quote-1.0.28.sha256sum] = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
SRC_URI[redox_syscall-0.2.16.sha256sum] = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
SRC_URI[scopeguard-1.1.0.sha256sum] = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
SRC_URI[smallvec-1.10.0.sha256sum] = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
SRC_URI[syn-1.0.109.sha256sum] = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
SRC_URI[syn-2.0.18.sha256sum] = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e"
SRC_URI[target-lexicon-0.12.7.sha256sum] = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5"
SRC_URI[unicode-ident-1.0.9.sha256sum] = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
SRC_URI[unindent-0.1.11.sha256sum] = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c"
SRC_URI[vcpkg-0.2.15.sha256sum] = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
SRC_URI[version_check-0.9.4.sha256sum] = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
SRC_URI[windows-sys-0.45.0.sha256sum] = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
SRC_URI[windows-targets-0.42.2.sha256sum] = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
SRC_URI[windows_aarch64_gnullvm-0.42.2.sha256sum] = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
SRC_URI[windows_aarch64_msvc-0.42.2.sha256sum] = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
SRC_URI[windows_i686_gnu-0.42.2.sha256sum] = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
SRC_URI[windows_i686_msvc-0.42.2.sha256sum] = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
SRC_URI[windows_x86_64_gnu-0.42.2.sha256sum] = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
SRC_URI[windows_x86_64_gnullvm-0.42.2.sha256sum] = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
SRC_URI[windows_x86_64_msvc-0.42.2.sha256sum] = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
@@ -0,0 +1,29 @@
SUMMARY = "Test vectors for the cryptography package."
HOMEPAGE = "https://cryptography.io/"
SECTION = "devel/python"
LICENSE = "Apache-2.0 | BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8c3617db4fb6fae01f1d253ab91511e4 \
file://LICENSE.APACHE;md5=4e168cce331e5c827d4c2b68a6200e1b \
file://LICENSE.BSD;md5=5ae30ba4123bc4f2fa49aa0b0dce887b"
# NOTE: Make sure to keep this recipe at the same version as python3-cryptography
# Upgrade both recipes at the same time
SRC_URI[sha256sum] = "028dff94a8522ca818b11295ff12df55f348f33a193c0597ddfe8239e53d1582"
PYPI_PACKAGE = "cryptography_vectors"
inherit pypi python_setuptools_build_meta
DEPENDS += " \
${PYTHON_PN}-cryptography \
"
do_install:append () {
# Remove the sha256 checksum lines for pycache files
sed ${D}${PYTHON_SITEPACKAGES_DIR}/cryptography_vectors-${PV}.dist-info/RECORD -e '/__pycache__/d' -i
}
BBCLASSEXTEND = "native nativesdk"
UPSTREAM_CHECK_REGEX = ""
@@ -0,0 +1,52 @@
From 2f9cd402d3293f6efe0f3ac06f17c6c14edbed86 Mon Sep 17 00:00:00 2001
From: James Hilliard <james.hilliard1@gmail.com>
Date: Sun, 25 Jun 2023 17:39:19 -0600
Subject: [PATCH] Fix include directory when cross compiling (#9129)
Upstream-Status: Backport [https://github.com/pyca/cryptography/pull/9129]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
src/rust/cryptography-cffi/build.rs | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/rust/cryptography-cffi/build.rs b/src/rust/cryptography-cffi/build.rs
index 07590ad2e..384af1ddb 100644
--- a/src/rust/cryptography-cffi/build.rs
+++ b/src/rust/cryptography-cffi/build.rs
@@ -47,9 +47,14 @@ fn main() {
)
.unwrap();
println!("cargo:rustc-cfg=python_implementation=\"{}\"", python_impl);
- let python_include = run_python_script(
+ let python_includes = run_python_script(
&python,
- "import sysconfig; print(sysconfig.get_path('include'), end='')",
+ "import os; \
+ import setuptools.dist; \
+ import setuptools.command.build_ext; \
+ b = setuptools.command.build_ext.build_ext(setuptools.dist.Distribution()); \
+ b.finalize_options(); \
+ print(os.pathsep.join(b.include_dirs), end='')",
)
.unwrap();
let openssl_include =
@@ -59,12 +64,15 @@ fn main() {
let mut build = cc::Build::new();
build
.file(openssl_c)
- .include(python_include)
.include(openssl_include)
.flag_if_supported("-Wconversion")
.flag_if_supported("-Wno-error=sign-conversion")
.flag_if_supported("-Wno-unused-parameter");
+ for python_include in env::split_paths(&python_includes) {
+ build.include(python_include);
+ }
+
// Enable abi3 mode if we're not using PyPy.
if python_impl != "PyPy" {
// cp37 (Python 3.7 to help our grep when we some day drop 3.7 support)
--
2.30.2
@@ -0,0 +1,45 @@
From b7dd3ce1d75d1e6255e1aca82aa7f401d4246a75 Mon Sep 17 00:00:00 2001
From: Mingli Yu <mingli.yu@windriver.com>
Date: Tue, 17 May 2022 17:22:48 +0800
Subject: [PATCH] pyproject.toml: remove --benchmark-disable option
The new version introduced below change, so remove the option
to avoid python3-pytest-benchmark rdepends to fix the gap.
496703c8 Refs #7079 -- added basic scaffholding for benchmarks (#7087)
Fixes:
# ./run-ptest
Free memory: 31.283 GB
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --benchmark-disable
inifile: /usr/lib/python3-cryptography/ptest/pyproject.toml
rootdir: /usr/lib/python3-cryptography/ptest
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
pyproject.toml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index b2e511f..4a285af 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -85,7 +85,7 @@ line-length = 79
target-version = ["py37"]
[tool.pytest.ini_options]
-addopts = "-r s --capture=no --strict-markers --benchmark-disable"
+addopts = "-r s --capture=no --strict-markers"
console_output_style = "progress-even-when-capture-no"
markers = [
"skip_fips: this test is not executed in FIPS mode",
@@ -151,4 +151,4 @@ git-only = [
"ci-constraints-requirements.txt",
".gitattributes",
".gitignore",
-]
\ No newline at end of file
+]
@@ -0,0 +1,10 @@
#!/usr/bin/env python3
# https://stackoverflow.com/questions/22102999/get-total-physical-memory-in-python/28161352
import sys
meminfo = dict((i.split()[0].rstrip(':'),int(i.split()[1])) for i in open('/proc/meminfo').readlines())
mem_free = meminfo['MemTotal']/1024./1024.
if mem_free < 2.:
print("Insufficient free memory({:.3f}): requires > 2 GB".format(mem_free))
sys.exit(1)
else:
print("Free memory: {:.3f} GB".format(mem_free))
@@ -0,0 +1,9 @@
#!/bin/sh
if ./check-memfree.py; then
# Skip the bench test module, we don't yet have pytest3-benchmark in core
# and these are more benchmarks than unit tests.
pytest --automake -k 'not bench'
else
echo "SKIP: crytography.not_enough_memory"
fi
@@ -0,0 +1,70 @@
SUMMARY = "Provides cryptographic recipes and primitives to python developers"
HOMEPAGE = "https://cryptography.io/"
SECTION = "devel/python"
LICENSE = "Apache-2.0 | BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8c3617db4fb6fae01f1d253ab91511e4 \
file://LICENSE.APACHE;md5=4e168cce331e5c827d4c2b68a6200e1b \
file://LICENSE.BSD;md5=5ae30ba4123bc4f2fa49aa0b0dce887b \
"
LDSHARED += "-pthread"
SRC_URI[sha256sum] = "7d230bf856164de164ecb615ccc14c7fc6de6906ddd5b491f3af90d3514c925c"
SRC_URI += "file://0001-pyproject.toml-remove-benchmark-disable-option.patch \
file://0001-Fix-include-directory-when-cross-compiling-9129.patch \
file://check-memfree.py \
file://run-ptest \
"
require ${BPN}-crates.inc
inherit pypi python_setuptools3_rust cargo-update-recipe-crates pkgconfig
DEPENDS += " \
${PYTHON_PN}-cffi-native \
"
RDEPENDS:${PN} += " \
${PYTHON_PN}-cffi \
"
RDEPENDS:${PN}:append:class-target = " \
${PYTHON_PN}-numbers \
${PYTHON_PN}-threading \
"
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-bcrypt \
${PYTHON_PN}-cryptography-vectors (= ${PV}) \
${PYTHON_PN}-hypothesis \
${PYTHON_PN}-iso8601 \
${PYTHON_PN}-pretend \
${PYTHON_PN}-psutil \
${PYTHON_PN}-pytest \
${PYTHON_PN}-unittest-automake-output \
${PYTHON_PN}-pytest-subtests \
${PYTHON_PN}-pytz \
"
inherit ptest
do_install_ptest() {
install -D ${WORKDIR}/check-memfree.py ${D}${PTEST_PATH}/
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
# remove test_x509.py as it needs benchmark and we don't
# want to introduce the benchmark dependency
rm -rf ${D}${PTEST_PATH}/tests/bench/test_x509.py
install -d ${D}${PTEST_PATH}/tests/hazmat
cp -rf ${S}/tests/hazmat/* ${D}${PTEST_PATH}/tests/hazmat/
cp -r ${S}/pyproject.toml ${D}${PTEST_PATH}/
}
FILES:${PN}-ptest += " \
${PTEST_PATH}/check-memfree.py \
"
FILES:${PN}-dbg += " \
${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/hazmat/bindings/.debug \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,37 @@
inherit setuptools3
require python-cython.inc
RDEPENDS:${PN} += "\
python3-setuptools \
"
# running build_ext a second time during install fails, because Python
# would then attempt to import cythonized modules built for the target
# architecture.
SETUPTOOLS_INSTALL_ARGS += "--skip-build"
do_install:append() {
# rename scripts that would conflict with the Python 2 build of Cython
mv ${D}${bindir}/cython ${D}${bindir}/cython3
mv ${D}${bindir}/cythonize ${D}${bindir}/cythonize3
mv ${D}${bindir}/cygdb ${D}${bindir}/cygdb3
}
PACKAGESPLITFUNCS =+ "cython_fix_sources"
cython_fix_sources () {
for f in ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/FlowControl.c \
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/FusedNode.c \
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/Scanning.c \
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/Visitor.c \
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Plex/Actions.c \
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Plex/Scanners.c \
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Runtime/refnanny.c \
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Tempita/_tempita.c \
${PKGD}${libdir}/${PYTHON_DIR}/site-packages/Cython*/SOURCES.txt; do
if [ -e $f ]; then
sed -i -e 's#${WORKDIR}/Cython-${PV}#/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}#g' $f
fi
done
}
@@ -0,0 +1,23 @@
SUMMARY = "Python bindings for the DBus inter-process communication system"
SECTION = "devel/python"
HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=97f58951300aa52a9f9e3a62bd5c846c"
DEPENDS = "expat dbus glib-2.0 virtual/libintl"
SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz"
SRC_URI[sha256sum] = "ad67819308618b5069537be237f8e68ca1c7fcc95ee4a121fe6845b1418248f8"
S = "${WORKDIR}/dbus-python-${PV}"
inherit setuptools3-base meson pkgconfig
# requires dbus-run-session
EXTRA_OEMESON += "-Dtests=false"
RDEPENDS:${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml"
FILES:${PN}-dev += "${libdir}/pkgconfig"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,22 @@
SUMMARY = "With this program/Python library you can easily create mock objects on D-Bus"
HOMEPAGE = "https://pypi.org/project/python-dbusmock/"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02"
SRC_URI[sha256sum] = "3efdb3d800386b65e8854d8ee4538764241382b4e664423ad7d959c9008dd408"
PYPI_PACKAGE = "python-dbusmock"
inherit pypi python_setuptools_build_meta
DEPENDS += "python3-setuptools-scm-native"
RDEPENDS:${PN} += "\
${PYTHON_PN}-dbus \
${PYTHON_PN}-unittest \
${PYTHON_PN}-xml \
"
RRECOMMENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'gobject-introspection-data', '${MLPREFIX}${PYTHON_PN}-pygobject', '', d)}"
BBCLASSEXTEND = "native"
@@ -0,0 +1,11 @@
SUMMARY = "Docutils is a modular system for processing documentation into useful formats"
HOMEPAGE = "http://docutils.sourceforge.net"
SECTION = "devel/python"
LICENSE = "PSF-2.0 & BSD-2-Clause & GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING.txt;md5=08f5f8aa6a1db2500c08a2bb558e45af"
SRC_URI[sha256sum] = "f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"
inherit pypi setuptools3
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,15 @@
SUMMARY = "Tooling for devicetree validation using YAML and jsonschema"
HOMEPAGE = "https://github.com/devicetree-org/dt-schema"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=457495c8fa03540db4a576bf7869e811"
inherit pypi setuptools3
PYPI_PACKAGE = "dtschema"
SRC_URI[sha256sum] = "6daefb8f54403b4d82961b3346571200571747ab01950fd36c1f69950fa7a8cf"
DEPENDS += "python3-setuptools-scm-native"
RDEPENDS:${PN} += "python3-ruamel-yaml python3-jsonschema python3-rfc3987"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,15 @@
SUMMARY = "A Python library for creating editable wheels"
HOMEPAGE = "https://github.com/pfmoore/editables"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=41bc1be47b7bb8240db3ef928c7cb0bf"
SRC_URI[sha256sum] = "dc322c42e7ccaf19600874035a4573898d88aadd07e177c239298135b75da772"
inherit pypi python_setuptools_build_meta
RDEPENDS:${PN} += "\
python3-io \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,2 @@
inherit setuptools3
require python-extras.inc
@@ -0,0 +1,37 @@
SUMMARY = "This provides a PEP 517 build backend for packages using Flit."
DESCRIPTION = "This provides a PEP 517 build backend for packages using \
Flit. The only public interface is the API specified by PEP 517, at \
flit_core.buildapi."
HOMEPAGE = "https://github.com/pypa/flit"
BUGTRACKER = "https://github.com/pypa/flit/issues"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=41eb78fa8a872983a882c694a8305f08"
SRC_URI[sha256sum] = "d75edf5eb324da20d53570a6a6f87f51e606eee8384925cd66a90611140844c7"
inherit pypi python_flit_core
# Need to install by hand as there's a dependency loop
DEPENDS:remove:class-native = " python3-build-native python3-installer-native"
DEPENDS:append:class-native = " unzip-native"
# We need the full flit tarball
PYPI_PACKAGE = "flit"
PEP517_SOURCE_PATH = "${S}/flit_core"
do_compile:class-native () {
python_flit_core_do_manual_build
}
do_install:class-native () {
python_pep517_do_bootstrap_install
}
PACKAGES =+ "${PN}-tests"
FILES:${PN}-tests += "\
${PYTHON_SITEPACKAGES_DIR}/flit_core/tests/* \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,32 @@
SUMMARY = "Python library used to interact with Git repositories"
DESCRIPTION = "GitPython provides object model read and write access to \
a git repository. Access repository information conveniently, alter the \
index directly, handle remotes, or go down to low-level object database \
access with big-files support."
HOMEPAGE = "http://github.com/gitpython-developers/GitPython"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
PYPI_PACKAGE = "GitPython"
inherit pypi python_setuptools_build_meta
SRC_URI[sha256sum] = "8d9b8cb1e80b9735e8717c9362079d3ce4c6e5ddeebedd0361b228c3a67a62f6"
DEPENDS += " ${PYTHON_PN}-gitdb"
RDEPENDS:${PN} += " \
${PYTHON_PN}-datetime \
${PYTHON_PN}-gitdb \
${PYTHON_PN}-io \
${PYTHON_PN}-logging \
${PYTHON_PN}-math \
${PYTHON_PN}-netclient \
${PYTHON_PN}-stringold \
${PYTHON_PN}-unittest \
${PYTHON_PN}-unixadmin \
git \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,22 @@
SUMMARY = "A pure-Python git object database"
HOMEPAGE = "http://github.com/gitpython-developers/gitdb"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528"
DEPENDS = "python3-smmap"
inherit pypi setuptools3
PYPI_PACKAGE = "gitdb"
SRC_URI[sha256sum] = "6eb990b69df4e15bad899ea868dc46572c3f75339735663b81de79b06f17eb9a"
RDEPENDS:${PN} += "python3-compression \
python3-crypt \
python3-io \
python3-mmap \
python3-shell \
python3-smmap \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,14 @@
SUMMARY = "Hatch plugin for fancy PyPI readmes "
HOMEPAGE = "https://pypi.org/project/hatch-fancy-pypi-readme/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ba5633c60bd3e243091013aa83b4d807"
inherit pypi python_hatchling
PYPI_PACKAGE = "hatch_fancy_pypi_readme"
SRC_URI[sha256sum] = "b1df44063094af1e8248ceacd47a92c9cf313d6b9823bf66af8a927c3960287d"
BBCLASSEXTEND = "native nativesdk"
UPSTREAM_CHECK_REGEX = "/hatch-fancy-pypi-readme/(?P<pver>(\d+[\.\-_]*)+)/"
@@ -0,0 +1,14 @@
SUMMARY = "Hatch plugin for versioning with your preferred VCS"
HOMEPAGE = "https://pypi.org/project/hatch-vcs/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=26501cfd0bbddf830ee820e95551fa3d"
inherit pypi python_hatchling
PYPI_PACKAGE = "hatch_vcs"
SRC_URI[sha256sum] = "cec5107cfce482c67f8bc96f18bbc320c9aa0d068180e14ad317bbee5a153fee"
BBCLASSEXTEND = "native nativesdk"
UPSTREAM_CHECK_REGEX = "/hatch-vcs/(?P<pver>(\d+[\.\-_]*)+)/"
@@ -0,0 +1,17 @@
SUMMARY = "The extensible, standards compliant build backend used by Hatch"
HOMEPAGE = "https://hatch.pypa.io/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=cbe2fd33fc9297692812fc94b7d27fd9"
inherit pypi python_hatchling
DEPENDS += "python3-pluggy-native python3-pathspec-native python3-packaging-native python3-editables-native python3-trove-classifiers-native"
DEPENDS:remove:class-native = "python3-hatchling-native"
SRC_URI[sha256sum] = "50e99c3110ce0afc3f7bdbadff1c71c17758e476731c27607940cfa6686489ca"
do_compile:prepend() {
export PYTHONPATH=src
}
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,10 @@
#!/bin/sh
# Upstream "fast" tests take about 5 minutes and currently do not run cleanly
# (tests/cover and tests/pytest)
# https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python/tests
# https://github.com/HypothesisWorks/hypothesis/blob/master/hypothesis-python/scripts/basic-test.sh#L18
#
# Instead we run two test suites imported from examples/
pytest --automake
@@ -0,0 +1,135 @@
# This file is part of Hypothesis, which may be found at
# https://github.com/HypothesisWorks/hypothesis/
#
# Most of this work is copyright (C) 2013-2021 David R. MacIver
# (david@drmaciver.com), but it contains contributions by others. See
# CONTRIBUTING.rst for a full list of people who may hold copyright, and
# consult the git log if you need to determine who owns an individual
# contribution.
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
#
# END HEADER
#
# SPDX-License-Identifier: MPL-2.0
"""This file demonstrates testing a binary search.
It's a useful example because the result of the binary search is so clearly
determined by the invariants it must satisfy, so we can simply test for those
invariants.
It also demonstrates the useful testing technique of testing how the answer
should change (or not) in response to movements in the underlying data.
"""
from hypothesis import given, strategies as st
def binary_search(ls, v):
"""Take a list ls and a value v such that ls is sorted and v is comparable
with the elements of ls.
Return an index i such that 0 <= i <= len(v) with the properties:
1. ls.insert(i, v) is sorted
2. ls.insert(j, v) is not sorted for j < i
"""
# Without this check we will get an index error on the next line when the
# list is empty.
if not ls:
return 0
# Without this check we will miss the case where the insertion point should
# be zero: The invariant we maintain in the next section is that lo is
# always strictly lower than the insertion point.
if v <= ls[0]:
return 0
# Invariant: There is no insertion point i with i <= lo
lo = 0
# Invariant: There is an insertion point i with i <= hi
hi = len(ls)
while lo + 1 < hi:
mid = (lo + hi) // 2
if v > ls[mid]:
# Inserting v anywhere below mid would result in an unsorted list
# because it's > the value at mid. Therefore mid is a valid new lo
lo = mid
# Uncommenting the following lines will cause this to return a valid
# insertion point which is not always minimal.
# elif v == ls[mid]:
# return mid
else:
# Either v == ls[mid] in which case mid is a valid insertion point
# or v < ls[mid], in which case all valid insertion points must be
# < hi. Either way, mid is a valid new hi.
hi = mid
assert lo + 1 == hi
# We now know that there is a valid insertion point <= hi and there is no
# valid insertion point < hi because hi - 1 is lo. Therefore hi is the
# answer we were seeking
return hi
def is_sorted(ls):
"""Is this list sorted?"""
for i in range(len(ls) - 1):
if ls[i] > ls[i + 1]:
return False
return True
Values = st.integers()
# We generate arbitrary lists and turn this into generating sorting lists
# by just sorting them.
SortedLists = st.lists(Values).map(sorted)
# We could also do it this way, but that would be a bad idea:
# SortedLists = st.lists(Values).filter(is_sorted)
# The problem is that Hypothesis will only generate long sorted lists with very
# low probability, so we are much better off post-processing values into the
# form we want than filtering them out.
@given(ls=SortedLists, v=Values)
def test_insert_is_sorted(ls, v):
"""We test the first invariant: binary_search should return an index such
that inserting the value provided at that index would result in a sorted
set."""
ls.insert(binary_search(ls, v), v)
assert is_sorted(ls)
@given(ls=SortedLists, v=Values)
def test_is_minimal(ls, v):
"""We test the second invariant: binary_search should return an index such
that no smaller index is a valid insertion point for v."""
for i in range(binary_search(ls, v)):
ls2 = list(ls)
ls2.insert(i, v)
assert not is_sorted(ls2)
@given(ls=SortedLists, v=Values)
def test_inserts_into_same_place_twice(ls, v):
"""In this we test a *consequence* of the second invariant: When we insert
a value into a list twice, the insertion point should be the same both
times. This is because we know that v is > the previous element and == the
next element.
In theory if the former passes, this should always pass. In practice,
failures are detected by this test with much higher probability because it
deliberately puts the data into a shape that is likely to trigger a
failure.
This is an instance of a good general category of test: Testing how the
function moves in responses to changes in the underlying data.
"""
i = binary_search(ls, v)
ls.insert(i, v)
assert binary_search(ls, v) == i
@@ -0,0 +1,101 @@
# This file is part of Hypothesis, which may be found at
# https://github.com/HypothesisWorks/hypothesis/
#
# Most of this work is copyright (C) 2013-2021 David R. MacIver
# (david@drmaciver.com), but it contains contributions by others. See
# CONTRIBUTING.rst for a full list of people who may hold copyright, and
# consult the git log if you need to determine who owns an individual
# contribution.
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
#
# END HEADER
#
# SPDX-License-Identifier: MPL-2.0
"""This example demonstrates testing a run length encoding scheme. That is, we
take a sequence and represent it by a shorter sequence where each 'run' of
consecutive equal elements is represented as a single element plus a count. So
e.g.
[1, 1, 1, 1, 2, 1] is represented as [[1, 4], [2, 1], [1, 1]]
This demonstrates the useful decode(encode(x)) == x invariant that is often
a fruitful source of testing with Hypothesis.
It also has an example of testing invariants in response to changes in the
underlying data.
"""
from hypothesis import assume, given, strategies as st
def run_length_encode(seq):
"""Encode a sequence as a new run-length encoded sequence."""
if not seq:
return []
# By starting off the count at zero we simplify the iteration logic
# slightly.
result = [[seq[0], 0]]
for s in seq:
if (
# If you uncomment this line this branch will be skipped and we'll
# always append a new run of length 1. Note which tests fail.
# False and
s
== result[-1][0]
# Try uncommenting this line and see what problems occur:
# and result[-1][-1] < 2
):
result[-1][1] += 1
else:
result.append([s, 1])
return result
def run_length_decode(seq):
"""Take a previously encoded sequence and reconstruct the original from
it."""
result = []
for s, i in seq:
for _ in range(i):
result.append(s)
return result
# We use lists of a type that should have a relatively high duplication rate,
# otherwise we'd almost never get any runs.
Lists = st.lists(st.integers(0, 10))
@given(Lists)
def test_decodes_to_starting_sequence(ls):
"""If we encode a sequence and then decode the result, we should get the
original sequence back.
Otherwise we've done something very wrong.
"""
assert run_length_decode(run_length_encode(ls)) == ls
@given(Lists, st.data())
def test_duplicating_an_element_does_not_increase_length(ls, data):
"""The previous test could be passed by simply returning the input sequence
so we need something that tests the compression property of our encoding.
In this test we deliberately introduce or extend a run and assert
that this does not increase the length of our encoding, because they
should be part of the same run in the final result.
"""
# We use assume to get a valid index into the list. We could also have used
# e.g. flatmap, but this is relatively straightforward and will tend to
# perform better.
assume(ls)
i = data.draw(st.integers(0, len(ls) - 1))
ls2 = list(ls)
# duplicating the value at i right next to it guarantees they are part of
# the same run in the resulting compression.
ls2.insert(i, ls2[i])
assert len(run_length_encode(ls2)) == len(run_length_encode(ls))
@@ -0,0 +1,39 @@
SUMMARY = "A library for property-based testing"
HOMEPAGE = "https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4ee62c16ebd0f4f99d906f36b7de8c3c"
PYPI_PACKAGE = "hypothesis"
inherit pypi setuptools3 ptest
SRC_URI += " \
file://run-ptest \
file://test_binary_search.py \
file://test_rle.py \
"
SRC_URI[sha256sum] = "e35165a73064370d30d476d7218f600d2bf861ff218192c9e994cb36aa190ae7"
RDEPENDS:${PN} += " \
python3-attrs \
python3-compression \
python3-core \
python3-json \
python3-pytest \
python3-sortedcontainers \
python3-statistics \
python3-unittest \
"
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-unittest-automake-output \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/examples
install -m 0755 ${WORKDIR}/test_binary_search.py ${D}${PTEST_PATH}/examples/
install -m 0755 ${WORKDIR}/test_rle.py ${D}${PTEST_PATH}/examples/
}
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,14 @@
SUMMARY = "Internationalised Domain Names in Applications"
HOMEPAGE = "https://github.com/kjd/idna"
LICENSE = "BSD-3-Clause & Python-2.0 & Unicode-TOU"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=239668a7c6066d9e0c5382e9c8c6c0e1"
SRC_URI[sha256sum] = "814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"
inherit pypi python_flit_core
RDEPENDS:${PN}:class-target = "\
${PYTHON_PN}-codecs \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,13 @@
SUMMARY = "Parses image files header and return image size."
HOMEPAGE = "https://github.com/shibukawa/imagesize_py"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=0c128f0f7e8a02e1b83884c0b5a41cda"
SRC_URI[sha256sum] = "69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"
inherit setuptools3 pypi
BBCLASSEXTEND = "native nativesdk"
RDEPENDS:${PN} = "python3-xml"
@@ -0,0 +1,20 @@
SUMMARY = "Read metadata from Python packages"
HOMEPAGE = "https://pypi.org/project/importlib-metadata/"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
inherit pypi python_setuptools_build_meta
PYPI_PACKAGE = "importlib_metadata"
UPSTREAM_CHECK_REGEX = "/importlib-metadata/(?P<pver>(\d+[\.\-_]*)+)/"
SRC_URI[sha256sum] = "dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743"
S = "${WORKDIR}/importlib_metadata-${PV}"
DEPENDS += "${PYTHON_PN}-setuptools-scm-native ${PYTHON_PN}-toml-native"
RDEPENDS:${PN} += "${PYTHON_PN}-zipp ${PYTHON_PN}-pathlib2"
RDEPENDS:${PN}:append:class-target = " python3-misc"
RDEPENDS:${PN}:append:class-nativesdk = " python3-misc"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,13 @@
SUMMARY = "A small and simple INI-file parser module"
HOMEPAGE = "https://pypi.org/project/iniconfig/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a6bb0320b04a0a503f12f69fea479de9"
SRC_URI[sha256sum] = "2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"
DEPENDS += "python3-hatch-vcs-native"
inherit pypi python_hatchling
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,14 @@
SUMMARY = "Accessing and Modifying INI files"
HOMEPAGE = "https://pypi.org/project/iniparse/"
LICENSE = "MIT & PSF-2.0"
LIC_FILES_CHKSUM = "file://LICENSE-PSF;md5=1c78a5bb3584b353496d5f6f34edb4b2 \
file://LICENSE;md5=52f28065af11d69382693b45b5a8eb54"
SRC_URI[sha256sum] = "932e5239d526e7acb504017bb707be67019ac428a6932368e6851691093aa842"
inherit pypi setuptools3
RDEPENDS:${PN} += "python3-core python3-six"
DEPENDS += "python3-six"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,71 @@
From 74fe171fa4a25c120607e9f8450cbdfee675c959 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Mon, 14 Mar 2022 14:39:22 +0000
Subject: [PATCH] python3-installer: add installer module
Let us override the hashbang directly (possibly upstreamable), and don't
play games with hashbangs: for now assume that even hashbangs with spaces
are simple (assume the spaces are only used to separate arguments) and
we don't have long hashbangs.
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
src/installer/__main__.py | 9 ++++++++-
src/installer/scripts.py | 15 +--------------
2 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/src/installer/__main__.py b/src/installer/__main__.py
index 51014b9..38de286 100644
--- a/src/installer/__main__.py
+++ b/src/installer/__main__.py
@@ -30,6 +30,13 @@ def _get_main_parser() -> argparse.ArgumentParser:
type=str,
help="override prefix to install packages to",
)
+ parser.add_argument(
+ "--interpreter",
+ "-i",
+ type=str,
+ default=sys.executable,
+ help=f"interpreter (defaults to {sys.executable})",
+ )
parser.add_argument(
"--compile-bytecode",
action="append",
@@ -86,7 +93,7 @@ def _main(cli_args: Sequence[str], program: Optional[str] = None) -> None:
with WheelFile.open(args.wheel) as source:
destination = SchemeDictionaryDestination(
scheme_dict=_get_scheme_dict(source.distribution, prefix=args.prefix),
- interpreter=sys.executable,
+ interpreter=args.interpreter,
script_kind=get_launcher_kind(),
bytecode_optimization_levels=bytecode_levels,
destdir=args.destdir,
diff --git a/src/installer/scripts.py b/src/installer/scripts.py
index 7e3c8fc..ba6ed5a 100644
--- a/src/installer/scripts.py
+++ b/src/installer/scripts.py
@@ -59,20 +59,7 @@ def _build_shebang(executable: str, forlauncher: bool) -> bytes:
https://bitbucket.org/pypa/distlib/src/58cd5c6/distlib/scripts.py#lines-124
"""
executable_bytes = executable.encode("utf-8")
- if forlauncher: # The launcher can just use the command as-is.
- return b"#!" + executable_bytes
- if _is_executable_simple(executable_bytes):
- return b"#!" + executable_bytes
-
- # Shebang support for an executable with a space in it is under-specified
- # and platform-dependent, so we use a clever hack to generate a script to
- # run in ``/bin/sh`` that should work on all reasonably modern platforms.
- # Read the following message to understand how the hack works:
- # https://github.com/pradyunsg/installer/pull/4#issuecomment-623668717
-
- quoted = shlex.quote(executable).encode("utf-8")
- # I don't understand a lick what this is trying to do.
- return b"#!/bin/sh\n'''exec' " + quoted + b' "$0" "$@"\n' + b"' '''"
+ return b"#!" + executable_bytes
class InvalidScript(ValueError):
@@ -0,0 +1,34 @@
SUMMARY = "Library and tool for installing Python wheels"
DESCRIPTION = "A low-level library for installing a Python package from a wheel distribution."
HOMEPAGE = "https://installer.readthedocs.io/"
BUGTRACKER = "https://github.com/pypa/installer/issues"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5038641aec7a77451e31da828ebfae00"
SRC_URI += "file://interpreter.patch"
SRC_URI[sha256sum] = "a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"
inherit pypi python_flit_core
# Bootstrap the native build
DEPENDS:remove:class-native = "python3-build-native python3-installer-native"
RDEPENDS:${PN} += " \
python3-compile \
python3-compression \
python3-netclient \
"
INSTALL_WHEEL_COMPILE_BYTECODE:class-native = "--no-compile-bytecode"
do_compile:class-native () {
python_flit_core_do_manual_build
}
do_install:prepend:class-native() {
export PYTHONPATH="${S}/src"
}
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,15 @@
SUMMARY = "Simple module to parse ISO 8601 dates"
HOMEPAGE = "http://pyiso8601.readthedocs.org/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=aab31f2ef7ba214a5a341eaa47a7f367"
SRC_URI[sha256sum] = "739960d37c74c77bd9bd546a76562ccb581fe3d4820ff5c3141eb49c839fda8f"
inherit pypi python_poetry_core
RDEPENDS:${PN} += "\
${PYTHON_PN}-datetime \
${PYTHON_PN}-numbers \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,3 @@
#!/bin/sh
pytest --automake
@@ -0,0 +1,48 @@
SUMMARY = "Python Jinja2: A small but fast and easy to use stand-alone template engine written in pure python."
HOMEPAGE = "https://pypi.org/project/Jinja2/"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=5dc88300786f1c214c1e9827a5229462"
SRC_URI[sha256sum] = "31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"
PYPI_PACKAGE = "Jinja2"
CVE_PRODUCT = "jinja2 jinja"
CLEANBROKEN = "1"
inherit pypi setuptools3 ptest
SRC_URI += " \
file://run-ptest \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
}
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-pytest \
${PYTHON_PN}-unittest-automake-output \
${PYTHON_PN}-toml \
${PYTHON_PN}-unixadmin \
"
RDEPENDS:${PN} += " \
${PYTHON_PN}-asyncio \
${PYTHON_PN}-crypt \
${PYTHON_PN}-io \
${PYTHON_PN}-json \
${PYTHON_PN}-markupsafe \
${PYTHON_PN}-math \
${PYTHON_PN}-netclient \
${PYTHON_PN}-numbers\
${PYTHON_PN}-pickle \
${PYTHON_PN}-pprint \
${PYTHON_PN}-shell \
${PYTHON_PN}-threading \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,3 @@
#!/bin/sh
python3 -mputao.unittest tests.py
@@ -0,0 +1,28 @@
SUMMARY = "Resolve JSON Pointers in Python"
HOMEPAGE = "https://github.com/stefankoegl/python-json-pointer"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=32b15c843b7a329130f4e266a281ebb3"
inherit pypi ptest setuptools3
SRC_URI[sha256sum] = "585cee82b70211fa9e6043b7bb89db6e1aa49524340dde8ad6b63206ea689d88"
RDEPENDS:${PN} += " \
${PYTHON_PN}-json \
"
BBCLASSEXTEND = "native nativesdk"
SRC_URI += " \
file://run-ptest \
"
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-doctest \
${PYTHON_PN}-unittest \
${PYTHON_PN}-unittest-automake-output \
"
do_install_ptest() {
cp -f ${S}/tests.py ${D}${PTEST_PATH}/
}
@@ -0,0 +1,48 @@
SUMMARY = "An implementation of JSON Schema validation for Python"
HOMEPAGE = "https://github.com/Julian/jsonschema"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=7a60a81c146ec25599a3e1dabb8610a8 \
file://json/LICENSE;md5=9d4de43111d33570c8fe49b4cb0e01af"
SRC_URI[sha256sum] = "0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d"
inherit pypi python_hatchling
PACKAGES =+ "${PN}-tests"
FILES:${PN}-tests = "${libdir}/${PYTHON_DIR}/site-packages/jsonschema/tests"
DEPENDS += "${PYTHON_PN}-hatch-fancy-pypi-readme-native ${PYTHON_PN}-hatch-vcs-native "
PACKAGECONFIG ??= "format"
PACKAGECONFIG[format] = ",,,\
${PYTHON_PN}-idna \
${PYTHON_PN}-jsonpointer \
${PYTHON_PN}-webcolors \
${PYTHON_PN}-rfc3987 \
${PYTHON_PN}-rfc3339-validator \
"
PACKAGECONFIG[nongpl] = ",,,\
${PYTHON_PN}-idna \
${PYTHON_PN}-jsonpointer \
${PYTHON_PN}-webcolors \
${PYTHON_PN}-rfc3986-validator \
${PYTHON_PN}-rfc3339-validator \
"
RDEPENDS:${PN} += " \
${PYTHON_PN}-attrs \
${PYTHON_PN}-core \
${PYTHON_PN}-datetime \
${PYTHON_PN}-importlib-metadata \
${PYTHON_PN}-io \
${PYTHON_PN}-json \
${PYTHON_PN}-netclient \
${PYTHON_PN}-numbers \
${PYTHON_PN}-pprint \
${PYTHON_PN}-pyrsistent \
${PYTHON_PN}-zipp \
"
RDEPENDS:${PN}-tests = "${PN}"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,21 @@
SUMMARY = "Python interface to libarchive"
DESCRIPTION = "A Python interface to libarchive. It uses the standard ctypes module to \
dynamically load and access the C library."
HOMEPAGE = "https://github.com/Changaco/python-libarchive-c"
LICENSE = "CC0-1.0"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=bcab380227a83bc147350b40a81e6ffc"
PYPI_PACKAGE = "libarchive-c"
inherit pypi setuptools3
SRC_URI[sha256sum] = "a5b41ade94ba58b198d778e68000f6b7de41da768de7140c984f71d7fa8416e5"
RDEPENDS:${PN} += "\
libarchive \
${PYTHON_PN}-ctypes \
${PYTHON_PN}-mmap \
${PYTHON_PN}-logging \
"
BBCLASSEXTEND = "native"
@@ -0,0 +1,42 @@
SUMMARY = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API."
DESCRIPTION = "lxml is a Pythonic, mature binding for the libxml2 and \
libxslt libraries. It provides safe and convenient access to these \
libraries using the ElementTree API. It extends the ElementTree API \
significantly to offer support for XPath, RelaxNG, XML Schema, XSLT, \
C14N and much more."
HOMEPAGE = "https://lxml.de/"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause & GPL-2.0-only & MIT & PSF-2.0"
LIC_FILES_CHKSUM = "file://LICENSES.txt;md5=e4c045ebad958ead4b48008f70838403 \
file://doc/licenses/elementtree.txt;md5=eb34d036a6e3d56314ee49a6852ac891 \
file://doc/licenses/BSD.txt;md5=700a1fc17f4797d4f2d34970c8ee694b \
file://doc/licenses/GPL.txt;md5=94d55d512a9ba36caa9b7df079bae19f \
file://src/lxml/isoschematron/resources/rng/iso-schematron.rng;beginline=2;endline=7;md5=fc85684a8dd5fa272c086bceb0d99e10 \
file://src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl;beginline=2;endline=24;md5=cc86b7b2bbc678e13f58ea403eb9929b \
file://src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl;beginline=2;endline=7;md5=5b03236d293dc3784205542b409d2f53 \
"
DEPENDS += "libxml2 libxslt"
SRC_URI[sha256sum] = "48628bd53a426c9eb9bc066a923acaa0878d1e86129fd5359aee99285f4eed9c"
SRC_URI += "${PYPI_SRC_URI}"
inherit pkgconfig pypi setuptools3
# {standard input}: Assembler messages:
# {standard input}:1488805: Error: branch out of range
DEBUG_OPTIMIZATION:remove:mips = " -Og"
DEBUG_OPTIMIZATION:append:mips = " -O"
BUILD_OPTIMIZATION:remove:mips = " -Og"
BUILD_OPTIMIZATION:append:mips = " -O"
DEBUG_OPTIMIZATION:remove:mipsel = " -Og"
DEBUG_OPTIMIZATION:append:mipsel = " -O"
BUILD_OPTIMIZATION:remove:mipsel = " -Og"
BUILD_OPTIMIZATION:append:mipsel = " -O"
BBCLASSEXTEND = "native nativesdk"
RDEPENDS:${PN} += "libxml2 libxslt ${PYTHON_PN}-compression"
CLEANBROKEN = "1"
@@ -0,0 +1,22 @@
SUMMARY = "File type identification using libmagic"
DESCRIPTION = "This module uses ctypes to access the libmagic file type \
identification library. It makes use of the local magic database and supports \
both textual and MIME-type output."
HOMEPAGE = "http://github.com/ahupp/python-magic"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=61495c152d794e6be5799a9edca149e3"
PYPI_PACKAGE = "python-magic"
inherit pypi setuptools3
SRC_URI[sha256sum] = "c1ba14b08e4a5f5c31a302b7721239695b2f0f058d125bd5ce1ee36b9d9d3c3b"
RDEPENDS:${PN} += "file \
${PYTHON_PN}-ctypes \
${PYTHON_PN}-io \
${PYTHON_PN}-logging \
${PYTHON_PN}-shell"
BBCLASSEXTEND = "native"
@@ -0,0 +1,20 @@
SUMMARY = "Templating library for Python"
HOMEPAGE = "http://www.makotemplates.org/"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=ad08dd28df88e64b35bcac27c822ee34"
PYPI_PACKAGE = "Mako"
inherit pypi python_setuptools_build_meta
SRC_URI[sha256sum] = "d60a3903dc3bb01a18ad6a89cdbe2e4eadc69c0bc8ef1e3773ba53d44c3f7a34"
RDEPENDS:${PN} = "${PYTHON_PN}-html \
${PYTHON_PN}-markupsafe \
${PYTHON_PN}-netclient \
${PYTHON_PN}-pygments \
${PYTHON_PN}-threading \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,13 @@
SUMMARY = "A Python implementation of John Gruber's Markdown."
HOMEPAGE = "https://python-markdown.github.io/"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=745aaad0c69c60039e638bff9ffc59ed"
inherit pypi python_setuptools_build_meta
PYPI_PACKAGE = "Markdown"
SRC_URI[sha256sum] = "8bf101198e004dc93e84a12a7395e31aac6a9c9942848ae1d99b9d72cf9b3520"
BBCLASSEXTEND = "native nativesdk"
RDEPENDS:${PN} += "${PYTHON_PN}-logging ${PYTHON_PN}-setuptools"
@@ -0,0 +1,3 @@
#!/bin/sh
pytest --automake
@@ -0,0 +1,27 @@
SUMMARY = "Implements a XML/HTML/XHTML Markup safe string for Python"
HOMEPAGE = "http://github.com/mitsuhiko/markupsafe"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75"
SRC_URI[sha256sum] = "af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"
PYPI_PACKAGE = "MarkupSafe"
inherit pypi setuptools3 ptest
RDEPENDS:${PN} += "${PYTHON_PN}-stringold"
BBCLASSEXTEND = "native nativesdk"
SRC_URI += " \
file://run-ptest \
"
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-pytest \
${PYTHON_PN}-unittest-automake-output \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -f ${S}/tests/* ${D}${PTEST_PATH}/tests/
}
@@ -0,0 +1,3 @@
#!/bin/sh
pytest --automake
@@ -0,0 +1,29 @@
SUMMARY = "More routines for operating on iterables, beyond itertools"
HOMEPAGE = "https://github.com/erikrose/more-itertools"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3396ea30f9d21389d7857719816f83b5"
SRC_URI[sha256sum] = "cabaa341ad0389ea83c17a94566a53ae4c9d07349861ecb14dc6d0345cf9ac5d"
inherit pypi python_flit_core ptest
SRC_URI += " \
file://run-ptest \
"
RDEPENDS:${PN} += " \
${PYTHON_PN}-asyncio \
"
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-statistics \
${PYTHON_PN}-pytest \
${PYTHON_PN}-unittest-automake-output \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
}
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,31 @@
SUMMARY = "Provides enhanced HTTPS support for httplib and urllib2 using PyOpenSSL"
HOMEPAGE = "https://github.com/cedadev/ndg_httpsclient/"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://MANIFEST.in;md5=ce22c0cd986d2de3f7073cd6b5523ae0"
SRC_URI[md5sum] = "b0fc8ea38f87d2c1ab1ed79a95c078f9"
SRC_URI[sha256sum] = "d72faed0376ab039736c2ba12e30695e2788c4aa569c9c3e3d72131de2592210"
inherit pypi setuptools3 update-alternatives
PYPI_PACKAGE = "ndg_httpsclient"
DEPENDS += " \
${PYTHON_PN}-pyopenssl \
${PYTHON_PN}-pyasn1 \
"
RDEPENDS:${PN} += " \
${PYTHON_PN}-datetime \
${PYTHON_PN}-logging \
${PYTHON_PN}-pyopenssl \
${PYTHON_PN}-pyasn1 \
"
BBCLASSEXTEND = "native nativesdk"
UPSTREAM_CHECK_REGEX = ""
ALTERNATIVE:${PN} = "ndg_httpclient"
ALTERNATIVE_LINK_NAME[ndg_httpclient] = "${bindir}/ndg_httpclient"
ALTERNATIVE_PRIORITY = "30"
@@ -0,0 +1,72 @@
From 27f6687e49bf555fc494d2f14bae6ecd0fa30f14 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 10 Dec 2015 13:20:30 +0200
Subject: [PATCH] Don't search /usr and so on for libraries by default to
avoid host contamination.
Upstream-Status: Inappropriate (As the code stands, this is a hack)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
numpy/distutils/system_info.py | 42 +++++-----------------------------
1 file changed, 6 insertions(+), 36 deletions(-)
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index 82e864a..135246d 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -323,44 +323,14 @@ if sys.platform == 'win32':
add_system_root(os.path.join(conda_dir, 'Library'))
else:
- default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib',
- '/opt/local/lib', '/sw/lib'], platform_bits)
default_runtime_dirs = []
- default_include_dirs = ['/usr/local/include',
- '/opt/include',
- # path of umfpack under macports
- '/opt/local/include/ufsparse',
- '/opt/local/include', '/sw/include',
- '/usr/include/suitesparse']
- default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src']
-
- default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib',
- '/usr/lib'], platform_bits)
- default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include']
-
- if os.path.exists('/usr/lib/X11'):
- globbed_x11_dir = glob('/usr/lib/*/libX11.so')
- if globbed_x11_dir:
- x11_so_dir = os.path.split(globbed_x11_dir[0])[0]
- default_x11_lib_dirs.extend([x11_so_dir, '/usr/lib/X11'])
- default_x11_include_dirs.extend(['/usr/lib/X11/include',
- '/usr/include/X11'])
-
- with open(os.devnull, 'w') as tmp:
- try:
- p = subprocess.Popen(["gcc", "-print-multiarch"], stdout=subprocess.PIPE,
- stderr=tmp)
- except (OSError, DistutilsError):
- # OSError if gcc is not installed, or SandboxViolation (DistutilsError
- # subclass) if an old setuptools bug is triggered (see gh-3160).
- pass
- else:
- triplet = str(p.communicate()[0].decode().strip())
- if p.returncode == 0:
- # gcc supports the "-print-multiarch" option
- default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)]
- default_lib_dirs += [os.path.join("/usr/lib/", triplet)]
+ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
+ default_include_dirs = ['/deaddir/include']
+ default_src_dirs = ['.', '/deaddir/src']
+
+ default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits)
+ default_x11_include_dirs = ['/deaddir/include']
if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))
--
2.25.1
@@ -0,0 +1,50 @@
From eb6d6579150bf4684603ce377c51e90ad3bb8109 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 15 Nov 2020 15:32:39 -0800
Subject: [PATCH] numpy/core: Define RISCV-32 support
Helps compile on riscv32
Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/17780]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
numpy/core/include/numpy/npy_cpu.h | 3 +++
numpy/core/include/numpy/npy_endian.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
index 78d229e..04be511 100644
--- a/numpy/core/include/numpy/npy_cpu.h
+++ b/numpy/core/include/numpy/npy_cpu.h
@@ -19,6 +19,7 @@
* NPY_CPU_ARCEB
* NPY_CPU_RISCV64
* NPY_CPU_LOONGARCH
+ * NPY_CPU_RISCV32
* NPY_CPU_WASM
*/
#ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_CPU_H_
@@ -104,6 +105,8 @@
#define NPY_CPU_ARCEB
#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
#define NPY_CPU_RISCV64
+#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 32
+ #define NPY_CPU_RISCV32
#elif defined(__loongarch__)
#define NPY_CPU_LOONGARCH
#elif defined(__EMSCRIPTEN__)
diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
index 5e58a7f..0926212 100644
--- a/numpy/core/include/numpy/npy_endian.h
+++ b/numpy/core/include/numpy/npy_endian.h
@@ -49,6 +49,7 @@
|| defined(NPY_CPU_PPC64LE) \
|| defined(NPY_CPU_ARCEL) \
|| defined(NPY_CPU_RISCV64) \
+ || defined(NPY_CPU_RISCV32) \
|| defined(NPY_CPU_LOONGARCH) \
|| defined(NPY_CPU_WASM)
#define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
--
2.20.1
@@ -0,0 +1,5 @@
#!/usr/bin/env python3
import numpy
numpy.test(label='full', verbose=2)
@@ -0,0 +1,73 @@
SUMMARY = "A sophisticated Numeric Processing Package for Python"
HOMEPAGE = "https://numpy.org/"
DESCRIPTION = "NumPy is the fundamental package needed for scientific computing with Python."
SECTION = "devel/python"
LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF-2.0 & Apache-2.0 & MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7614a5b0073688df53773ec6ec7fe81d"
SRCNAME = "numpy"
SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
file://0001-numpy-core-Define-RISCV-32-support.patch \
file://run-ptest \
"
SRC_URI[sha256sum] = "9a3a9f3a61480cc086117b426a8bd86869c213fc4072e606f01c4e4b66eb92bf"
GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases"
UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$"
DEPENDS += "python3-cython-native"
inherit ptest setuptools3 github-releases
S = "${WORKDIR}/numpy-${PV}"
CLEANBROKEN = "1"
do_compile:prepend() {
export NPY_DISABLE_SVML=1
}
# Unfortunately the following pyc files are non-deterministc due to 'frozenset'
# being written without strict ordering, even with PYTHONHASHSEED = 0
# Upstream is discussing ways to solve the issue properly, until then let's
# just not install the problematic files.
# More info: http://benno.id.au/blog/2013/01/15/python-determinism
do_install:append() {
rm ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/typing/tests/data/pass/__pycache__/literal.cpython*
}
FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a"
# install what is needed for numpy.test()
RDEPENDS:${PN} = "${PYTHON_PN}-unittest \
${PYTHON_PN}-difflib \
${PYTHON_PN}-pprint \
${PYTHON_PN}-pickle \
${PYTHON_PN}-shell \
${PYTHON_PN}-doctest \
${PYTHON_PN}-datetime \
${PYTHON_PN}-distutils \
${PYTHON_PN}-misc \
${PYTHON_PN}-mmap \
${PYTHON_PN}-netclient \
${PYTHON_PN}-numbers \
${PYTHON_PN}-pydoc \
${PYTHON_PN}-pkgutil \
${PYTHON_PN}-email \
${PYTHON_PN}-compression \
${PYTHON_PN}-ctypes \
${PYTHON_PN}-threading \
${PYTHON_PN}-multiprocessing \
${PYTHON_PN}-json \
"
RDEPENDS:${PN}-ptest += "${PYTHON_PN}-pytest \
${PYTHON_PN}-hypothesis \
${PYTHON_PN}-sortedcontainers \
${PYTHON_PN}-resource \
${PYTHON_PN}-typing-extensions \
ldd \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,18 @@
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] = "a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"
inherit pypi python_flit_core
BBCLASSEXTEND = "native nativesdk"
# Bootstrap the native build
DEPENDS:remove:class-native = "python3-build-native"
RDEPENDS:${PN} += "python3-profile"
do_compile:class-native () {
python_flit_core_do_manual_build
}
@@ -0,0 +1,12 @@
SUMMARY = "Object-oriented filesystem paths"
HOMEPAGE = "https://github.com/mcmtroffaes/pathlib2"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=2dc08586cce3ab91bfa091b655c0e440"
SRC_URI[sha256sum] = "7a4329d67beff9a712e1d3ae147e4e3e108b0bfd284ffdea03a635126c76b3c0"
inherit pypi setuptools3
RDEPENDS:${PN} += "${PYTHON_PN}-six ${PYTHON_PN}-ctypes"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,13 @@
SUMMARY = "Utility library for gitignore style pattern matching of file paths."
HOMEPAGE = "https://github.com/cpburnz/python-path-specification"
SECTION = "devel/python"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
SRC_URI[sha256sum] = "2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"
inherit pypi setuptools3
BBCLASSEXTEND = "native nativesdk"
RDEPENDS:${PN} += "python3-profile"
@@ -0,0 +1,42 @@
From 09bd8368bf0d5385663a10eeb890131481681bdd Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 23 Apr 2020 09:28:58 +0000
Subject: [PATCH] change shebang to python3
Upstream-Status: Pending
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
pbr/tests/test_integration.py | 2 +-
pbr/tests/test_packaging.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pbr/tests/test_integration.py b/pbr/tests/test_integration.py
index 8e96f21..b07cbe3 100644
--- a/pbr/tests/test_integration.py
+++ b/pbr/tests/test_integration.py
@@ -150,7 +150,7 @@ class TestInstallWithoutPbr(base.BaseTestCase):
pkgs = {
'pkgTest': {
'setup.py': textwrap.dedent("""\
- #!/usr/bin/env python
+ #!/usr/bin/env python3
import setuptools
setuptools.setup(
name = 'pkgTest',
diff --git a/pbr/tests/test_packaging.py b/pbr/tests/test_packaging.py
index 07be547..f6a9412 100644
--- a/pbr/tests/test_packaging.py
+++ b/pbr/tests/test_packaging.py
@@ -206,7 +206,7 @@ class CreatePackages(fixtures.Fixture):
defaults = {
'setup.py': textwrap.dedent(six.u("""\
- #!/usr/bin/env python
+ #!/usr/bin/env python3
import setuptools
setuptools.setup(
setup_requires=['pbr'],
--
2.24.1
@@ -0,0 +1,4 @@
inherit setuptools3
require python-pbr.inc
SRC_URI[sha256sum] = "aefc51675b0b533d56bb5fd1c8c6c0522fe31896679882e1c4c63d5e4a0fccb3"
@@ -0,0 +1,28 @@
Patch pip to disable shebang mangling and also force the python executable
to be python3 from the environment when building anything for the target
(or nativesdk). This avoids incorrect interpreter paths in the target scripts.
Upstream-Status: Inappropriate [OE specific config]
Index: pip-22.0.3/src/pip/_vendor/distlib/scripts.py
===================================================================
--- pip-22.0.3.orig/src/pip/_vendor/distlib/scripts.py
+++ pip-22.0.3/src/pip/_vendor/distlib/scripts.py
@@ -135,6 +135,8 @@ class ScriptMaker(object):
See also: http://www.in-ulm.de/~mascheck/various/shebang/#length
https://hg.mozilla.org/mozilla-central/file/tip/mach
"""
+ if '_PYTHON_SYSCONFIGDATA_NAME' in os.environ:
+ return b'#!/usr/bin/env python3'
if os.name != 'posix':
simple_shebang = True
else:
@@ -340,7 +342,7 @@ class ScriptMaker(object):
return
match = FIRST_LINE_RE.match(first_line.replace(b'\r\n', b'\n'))
- if match:
+ if False:
adjust = True
post_interp = match.group(1) or b''
@@ -0,0 +1,61 @@
SUMMARY = "The PyPA recommended tool for installing Python packages"
HOMEPAGE = "https://pypi.org/project/pip"
SECTION = "devel/python"
LICENSE = "MIT & Apache-2.0 & MPL-2.0 & LGPL-2.1-only & BSD-3-Clause & PSF-2.0 & BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=63ec52baf95163b597008bb46db68030 \
file://src/pip/_vendor/cachecontrol/LICENSE.txt;md5=6572692148079ebbbd800be4b9f36c6d \
file://src/pip/_vendor/certifi/LICENSE;md5=3c2b7404369c587c3559afb604fce2f2 \
file://src/pip/_vendor/chardet/LICENSE;md5=4fbd65380cdd255951079008b364516c \
file://src/pip/_vendor/colorama/LICENSE.txt;md5=b4936429a56a652b84c5c01280dcaa26 \
file://src/pip/_vendor/distlib/LICENSE.txt;md5=f6a11430d5cd6e2cd3832ee94f22ddfc \
file://src/pip/_vendor/distro/LICENSE;md5=d2794c0df5b907fdace235a619d80314 \
file://src/pip/_vendor/idna/LICENSE.md;md5=239668a7c6066d9e0c5382e9c8c6c0e1 \
file://src/pip/_vendor/msgpack/COPYING;md5=cd9523181d9d4fbf7ffca52eaa2a5751 \
file://src/pip/_vendor/packaging/LICENSE;md5=faadaedca9251a90b205c9167578ce91 \
file://src/pip/_vendor/packaging/LICENSE.APACHE;md5=2ee41112a44fe7014dce33e26468ba93 \
file://src/pip/_vendor/pkg_resources/LICENSE;md5=141643e11c48898150daa83802dbc65f \
file://src/pip/_vendor/platformdirs/LICENSE;md5=ea4f5a41454746a9ed111e3d8723d17a \
file://src/pip/_vendor/pygments/LICENSE;md5=36a13c90514e2899f1eba7f41c3ee592 \
file://src/pip/_vendor/pyparsing/LICENSE;md5=657a566233888513e1f07ba13e2f47f1 \
file://src/pip/_vendor/pyproject_hooks/LICENSE;md5=aad69c93f605003e3342b174d9b0708c \
file://src/pip/_vendor/requests/LICENSE;md5=34400b68072d710fecd0a2940a0d1658 \
file://src/pip/_vendor/resolvelib/LICENSE;md5=78e1c0248051c32a38a7f820c30bd7a5 \
file://src/pip/_vendor/rich/LICENSE;md5=b5f0b94fbc94f5ad9ae4efcf8a778303 \
file://src/pip/_vendor/six.LICENSE;md5=43cfc9e4ac0e377acfb9b76f56b8415d \
file://src/pip/_vendor/tenacity/LICENSE;md5=175792518e4ac015ab6696d16c4f607e \
file://src/pip/_vendor/tomli/LICENSE;md5=aaaaf0879d17df0110d1aa8c8c9f46f5 \
file://src/pip/_vendor/typing_extensions.LICENSE;md5=fcf6b249c2641540219a727f35d8d2c2 \
file://src/pip/_vendor/urllib3/LICENSE.txt;md5=c2823cb995439c984fd62a973d79815c \
file://src/pip/_vendor/webencodings/LICENSE;md5=81fb24cd7823cce23b69f721993dce4d \
"
inherit pypi python_setuptools_build_meta
SRC_URI += "file://no_shebang_mangling.patch"
SRC_URI[sha256sum] = "a160a170f3331d9ca1a0247eb1cd79c758879f1f81158f9cd05bbb5df80bea5c"
do_install:append() {
rm -f ${D}/${bindir}/pip
}
RDEPENDS:${PN} = "\
python3-compile \
python3-io \
python3-html \
python3-json \
python3-multiprocessing \
python3-netserver \
python3-setuptools \
python3-unixadmin \
python3-xmlrpc \
python3-pickle \
python3-distutils \
python3-image \
"
BBCLASSEXTEND = "native nativesdk"
# This used to use the bootstrap install which didn't compile. Until we bump the
# tmpdir version we can't compile the native otherwise the sysroot unpack fails
INSTALL_WHEEL_COMPILE_BYTECODE:class-native = "--no-compile-bytecode"
@@ -0,0 +1,3 @@
#!/bin/sh
pytest --automake
@@ -0,0 +1,29 @@
SUMMARY = "Plugin and hook calling mechanisms for python"
HOMEPAGE = "https://github.com/pytest-dev/pluggy"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1c8206d16fd5cc02fa9b0bb98955e5c2"
SRC_URI[sha256sum] = "d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"
DEPENDS += "${PYTHON_PN}-setuptools-scm-native"
RDEPENDS:${PN} += "${PYTHON_PN}-importlib-metadata \
${PYTHON_PN}-more-itertools \
"
inherit pypi ptest python_setuptools_build_meta
SRC_URI += " \
file://run-ptest \
"
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-pytest \
${PYTHON_PN}-unittest-automake-output \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/testing
cp -rf ${S}/testing/* ${D}${PTEST_PATH}/testing/
}
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,18 @@
SUMMARY = "Python Lex and Yacc"
DESCRIPTION = "Python ply: PLY is yet another implementation of lex and yacc for Python"
HOMEPAGE = "https://pypi.python.org/pypi/ply"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://README.md;beginline=5;endline=32;md5=f5ee5c355c0e6719c787a71b8f0fa96c"
SRC_URI[md5sum] = "6465f602e656455affcd7c5734c638f8"
SRC_URI[sha256sum] = "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3"
inherit pypi setuptools3
RDEPENDS:${PN}:class-target += "\
${PYTHON_PN}-netclient \
${PYTHON_PN}-shell \
"
BBCLASSEXTEND = "native"
@@ -0,0 +1,46 @@
SUMMARY = "Poetry PEP 517 Build Backend"
DESCRIPTION = "Poetry PEP 517 Build Backend"
HOMEPAGE = "https://github.com/python-poetry/poetry-core"
BUGTRACKER = "https://github.com/python-poetry/poetry-core"
CHANGELOG = "https://github.com/python-poetry/poetry-core/blob/master/CHANGELOG.md"
LICENSE = "Apache-2.0 & BSD-2-Clause & MIT"
LIC_FILES_CHKSUM = "\
file://LICENSE;md5=78c39cfd009863ae44237a7ab1f9cedc \
file://src/poetry/core/_vendor/attr/_version_info.py;beginline=1;endline=1;md5=b2dccaa94b3629a08bfb4f983cad6f89 \
file://src/poetry/core/_vendor/attrs/LICENSE;md5=5e55731824cf9205cfabeab9a0600887 \
file://src/poetry/core/_vendor/jsonschema/COPYING;md5=7a60a81c146ec25599a3e1dabb8610a8 \
file://src/poetry/core/_vendor/lark/LICENSE;md5=fcfbf1e2ecc0f37acbb5871aa0267500 \
file://src/poetry/core/_vendor/packaging/LICENSE;md5=faadaedca9251a90b205c9167578ce91 \
file://src/poetry/core/_vendor/packaging/LICENSE.APACHE;md5=2ee41112a44fe7014dce33e26468ba93 \
file://src/poetry/core/_vendor/packaging/LICENSE.BSD;md5=7bef9bf4a8e4263634d0597e7ba100b8 \
file://src/poetry/core/_vendor/pyrsistent/LICENSE.mit;md5=b695eb9c6e7a6fb1b1bc2d193c42776e \
file://src/poetry/core/_vendor/tomli/LICENSE;md5=aaaaf0879d17df0110d1aa8c8c9f46f5 \
file://src/poetry/core/_vendor/typing_extensions.LICENSE;md5=f16b323917992e0f8a6f0071bc9913e2 \
"
SRC_URI[sha256sum] = "0f9b0de39665f36d6594657e7d57b6f463cc10f30c28e6d1c3b9ff54c26c9ac3"
inherit python_poetry_core pypi
PYPI_ARCHIVE_NAME = "poetry_core-${PV}.${PYPI_PACKAGE_EXT}"
S = "${WORKDIR}/poetry_core-${PV}"
RDEPENDS:${PN}:append:class-target = "\
python3-compression \
python3-core \
python3-crypt \
python3-io \
python3-json \
python3-logging \
python3-netclient \
python3-pathlib2 \
python3-pprint \
python3-shell \
"
RDEPENDS:${PN} += "\
python3-pip \
python3-six \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,11 @@
SUMMARY = "A library for stubbing in Python"
HOMEPAGE = "https://github.com/alex/pretend"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=411780c0b7fa756753e94affeee5bc99"
SRC_URI[md5sum] = "ad53883ede48aeac7ae584f0de0240e8"
SRC_URI[sha256sum] = "c90eb810cde8ebb06dafcb8796f9a95228ce796531bc806e794c2f4649aa1b10"
inherit pypi setuptools3
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,41 @@
SUMMARY = "A cross-platform process and system utilities module for Python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a9c72113a843d0d732a0ac1c200d81b1"
HOMEPAGE = "https://pypi.org/project/psutil/"
SRC_URI[sha256sum] = "5410638e4df39c54d957fc51ce03048acd8e6d60abc0f5107af51e5fb566eb3c"
inherit pypi setuptools3
PACKAGES =+ "${PN}-tests"
FILES:${PN}-tests += " \
${PYTHON_SITEPACKAGES_DIR}/psutil/test* \
${PYTHON_SITEPACKAGES_DIR}/psutil/__pycache__/test* \
"
RDEPENDS:${PN} += " \
${PYTHON_PN}-shell \
${PYTHON_PN}-threading \
${PYTHON_PN}-xml \
${PYTHON_PN}-netclient \
${PYTHON_PN}-ctypes \
${PYTHON_PN}-resource \
"
RDEPENDS:${PN}-tests += " \
${PN} \
${PYTHON_PN} \
coreutils \
procps \
binutils \
gcc \
gcc-symlinks \
libstdc++ \
libstdc++-dev \
"
INSANE_SKIP:${PN}-tests += "dev-deps"
BBCLASSEXTEND = "native"
@@ -0,0 +1,14 @@
SUMMARY = "Library with cross-python path, ini-parsing, io, code, log facilities"
HOMEPAGE = "http://py.readthedocs.io/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a6bb0320b04a0a503f12f69fea479de9"
SRC_URI[sha256sum] = "51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"
DEPENDS += "${PYTHON_PN}-setuptools-scm-native"
inherit pypi python_setuptools_build_meta
BBCLASSEXTEND = "native nativesdk"
RDEPENDS:${PN} += "${PYTHON_PN}-netclient"
@@ -0,0 +1,3 @@
#!/bin/sh
pytest --automake
@@ -0,0 +1,3 @@
inherit pypi setuptools3
require python-pyasn1.inc
@@ -0,0 +1,26 @@
SUMMARY = "Python bindings for the Cairo canvas library"
HOMEPAGE = "http://cairographics.org/pycairo"
BUGTRACKER = "http://bugs.freedesktop.org"
SECTION = "python-devel"
LICENSE = "LGPL-2.1-only & MPL-1.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=f3713ca2c28d9312ad718520b6dc3eee \
file://COPYING-LGPL-2.1;md5=fad9b3332be894bab9bc501572864b29 \
file://COPYING-MPL-1.1;md5=bfe1f75d606912a4111c90743d6c7325"
# cairo >= 1.14
DEPENDS = "cairo python3"
SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/pycairo-${PV}.tar.gz"
GITHUB_BASE_URI = "https://github.com/pygobject/pycairo/releases/"
SRC_URI[sha256sum] = "1444d52f1bb4cc79a4a0c0fe2ccec4bd78ff885ab01ebe1c0f637d8392bcafb6"
S = "${WORKDIR}/pycairo-${PV}"
inherit meson pkgconfig python3targetconfig github-releases
CFLAGS += "-fPIC"
BBCLASSEXTEND = "native"
FILES:${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
@@ -0,0 +1,21 @@
SUMMARY = "Parser of the C language, written in pure Python"
HOMEPAGE = "https://github.com/eliben/pycparser"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2c28cdeabcb88f5843d934381b4b4fea"
SRC_URI[sha256sum] = "e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"
inherit pypi setuptools3
BBCLASSEXTEND = "native nativesdk"
RDEPENDS:${PN}:class-target += "\
${PYTHON_PN}-netclient \
${PYTHON_PN}-ply \
${PYTHON_PN}-pprint \
"
RSUGGESTS:${PN}:class-target += "\
cpp \
cpp-symlinks \
"
@@ -0,0 +1,5 @@
require python-pycryptodome.inc
inherit setuptools3
SRC_URI[sha256sum] = "c9adee653fc882d98956e33ca2c1fb582e23a8af7ac82fee75bd6113c55a0413"
@@ -0,0 +1,9 @@
require python-pycryptodome.inc
inherit setuptools3
SRC_URI[sha256sum] = "3e3ecb5fe979e7c1bb0027e518340acf7ee60415d79295e5251d13c68dde576e"
FILES:${PN}-tests = " \
${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/ \
${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/__pycache__/ \
"
@@ -0,0 +1,15 @@
SUMMARY = "pyelftools is a pure-Python library for parsing and analyzing ELF files and DWARF debugging information"
HOMEPAGE = "https://github.com/eliben/pyelftools"
SECTION = "devel/python"
LICENSE = "PD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5ce2a2b07fca326bc7c146d10105ccfc"
SRC_URI[sha256sum] = "ec761596aafa16e282a31de188737e5485552469ac63b60cfcccf22263fd24ff"
PYPI_PACKAGE = "pyelftools"
inherit pypi setuptools3
BBCLASSEXTEND = "native"
RDEPENDS:${PN} += "${PYTHON_PN}-debugger ${PYTHON_PN}-pprint"
@@ -0,0 +1,19 @@
SUMMARY = "Pygments is a syntax highlighting package written in Python."
DESCRIPTION = "Pygments is a syntax highlighting package written in Python."
HOMEPAGE = "http://pygments.org/"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=36a13c90514e2899f1eba7f41c3ee592"
inherit python_setuptools_build_meta
SRC_URI[sha256sum] = "8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c"
DEPENDS += "\
${PYTHON_PN} \
"
PYPI_PACKAGE = "Pygments"
inherit pypi
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,30 @@
From c125a806de951359ab7e302b0584f7c92fa451ad Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 12 Apr 2019 16:25:58 +0200
Subject: [PATCH] Do not build tests
They require installing tests from g-i, which we do not do.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 278fa16f..aacbd4a2 100644
--- a/meson.build
+++ b/meson.build
@@ -175,6 +175,6 @@ configure_file(input : 'PKG-INFO.in',
subdir('gi')
subdir('pygtkcompat')
with_tests = get_option('tests')
-if with_tests
-subdir('tests')
-endif
+#if with_tests
+#subdir('tests')
+#endif
--
2.17.1
@@ -0,0 +1,39 @@
SUMMARY = "Python GObject bindings"
HOMEPAGE = "https://gitlab.gnome.org/GNOME/pygobject"
DESCRIPTION = "PyGObject is a Python package which provides bindings for GObject based libraries such as GTK, GStreamer, WebKitGTK, GLib, GIO and many more."
SECTION = "devel/python"
LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
GNOMEBASEBUILDCLASS = "meson"
GIR_MESON_OPTION = ""
inherit gnomebase setuptools3-base gobject-introspection upstream-version-is-even features_check
REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
DEPENDS += "python3 glib-2.0"
SRCNAME="pygobject"
SRC_URI = " \
http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
file://0001-Do-not-build-tests.patch \
"
SRC_URI[sha256sum] = "3c6805d1321be90cc32e648215a562430e0d3d6edcda8f4c5e7a9daffcad5710"
S = "${WORKDIR}/${SRCNAME}-${PV}"
PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}"
RDEPENDS:${PN} += " \
python3-io \
python3-pkgutil \
"
# python3-pycairo is checked on configuration -> DEPENDS
# we don't link against python3-pycairo -> RDEPENDS
PACKAGECONFIG[cairo] = "-Dpycairo=enabled,-Dpycairo=disabled, cairo python3-pycairo, python3-pycairo"
BBCLASSEXTEND = "native"
PACKAGECONFIG:class-native = ""
@@ -0,0 +1,23 @@
SUMMARY = "Simple Python wrapper around the OpenSSL library"
HOMEPAGE = "https://pyopenssl.org/"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
DEPENDS += "openssl ${PYTHON_PN}-cryptography"
SRC_URI[sha256sum] = "276f931f55a452e7dea69c7173e984eb2a4407ce413c918aa34b55f82f9b8bac"
PYPI_PACKAGE = "pyOpenSSL"
inherit pypi setuptools3
PACKAGES =+ "${PN}-tests"
FILES:${PN}-tests = "${libdir}/${PYTHON_DIR}/site-packages/OpenSSL/test"
RDEPENDS:${PN}:class-target = " \
${PYTHON_PN}-cryptography \
${PYTHON_PN}-six \
${PYTHON_PN}-threading \
"
RDEPENDS:${PN}-tests = "${PN}"
BBCLASSEXTEND = "native nativesdk"

Some files were not shown because too many files have changed in this diff Show More