blob: 91bff8250970c6c871402a29164bb48cad8a2459 [file] [log] [blame]
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001SUMMARY = "The official binary distribution format for Python "
2HOMEPAGE = "https://github.com/pypa/wheel"
3SECTION = "devel/python"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=10;endline=10;md5=8227180126797a0148f94f483f3e1489"
6
7SRC_URI[sha256sum] = "e9a504e793efbca1b8e0e9cb979a249cf4a0a7b5b8c9e8b65a5e39d49529c1c4"
8
9inherit flit_core pypi setuptools3-base
10
11SRC_URI += " file://0001-Backport-pyproject.toml-from-flit-backend-branch.patch"
12
13DEPENDS:remove:class-native = "python3-pip-native"
14
15do_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 -*-
29import re
30import sys
31from wheel.cli import main
32if __name__ == '__main__':
33 sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
34 sys.exit(main())
35EOF
36 chmod 0755 ${D}${bindir}/wheel
37}
38
39BBCLASSEXTEND = "native nativesdk"
40