Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame^] | 1 | SUMMARY = "The official binary distribution format for Python " |
| 2 | HOMEPAGE = "https://github.com/pypa/wheel" |
| 3 | SECTION = "devel/python" |
| 4 | LICENSE = "MIT" |
| 5 | LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=10;endline=10;md5=8227180126797a0148f94f483f3e1489" |
| 6 | |
| 7 | SRC_URI[sha256sum] = "e9a504e793efbca1b8e0e9cb979a249cf4a0a7b5b8c9e8b65a5e39d49529c1c4" |
| 8 | |
| 9 | inherit flit_core pypi setuptools3-base |
| 10 | |
| 11 | SRC_URI += " file://0001-Backport-pyproject.toml-from-flit-backend-branch.patch" |
| 12 | |
| 13 | DEPENDS:remove:class-native = "python3-pip-native" |
| 14 | |
| 15 | do_install:class-native () { |
| 16 | # We need to bootstrap python3-wheel-native |
| 17 | install -d ${D}${PYTHON_SITEPACKAGES_DIR} |
| 18 | PYPA_WHEEL="${B}/dist/${PYPI_PACKAGE}-${PV}-*.whl" |
| 19 | unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PYPA_WHEEL} || \ |
| 20 | bbfatal_log "Failed to install" |
| 21 | |
| 22 | # pip install would normally generate [project.scripts] in ${bindir} |
| 23 | install -d ${D}/${bindir} |
| 24 | cat << EOF >> ${D}/${bindir}/wheel |
| 25 | #!/bin/sh |
| 26 | '''exec' ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} "\$0" "\$@" |
| 27 | ' ''' |
| 28 | # -*- coding: utf-8 -*- |
| 29 | import re |
| 30 | import sys |
| 31 | from wheel.cli import main |
| 32 | if __name__ == '__main__': |
| 33 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) |
| 34 | sys.exit(main()) |
| 35 | EOF |
| 36 | chmod 0755 ${D}${bindir}/wheel |
| 37 | } |
| 38 | |
| 39 | BBCLASSEXTEND = "native nativesdk" |
| 40 | |