Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | SUMMARY = "Download, build, install, upgrade, and uninstall Python packages" |
| 2 | HOMEPAGE = "https://pypi.org/project/setuptools" |
| 3 | SECTION = "devel/python" |
| 4 | LICENSE = "MIT" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=19;md5=7a7126e068206290f3fe9f8d6c713ea6" |
| 6 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame^] | 7 | inherit pypi setuptools_build_meta |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 8 | |
| 9 | SRC_URI:append:class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch" |
| 10 | |
| 11 | SRC_URI += "\ |
| 12 | file://0001-change-shebang-to-python3.patch \ |
| 13 | file://0001-_distutils-sysconfig-append-STAGING_LIBDIR-python-sy.patch \ |
| 14 | " |
| 15 | |
| 16 | SRC_URI[sha256sum] = "d144f85102f999444d06f9c0e8c737fd0194f10f2f7e5fdb77573f6e2fa4fad0" |
| 17 | |
| 18 | DEPENDS += "${PYTHON_PN}" |
| 19 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame^] | 20 | # Avoid dependency loop; we bootstrap -native |
| 21 | DEPENDS:remove:class-native = "python3-pip-native python3-setuptools-native" |
| 22 | DEPENDS:append:class-native = " unzip-native" |
| 23 | |
| 24 | PYPA_WHEEL ?= "${B}/dist/${PYPI_PACKAGE}-${PV}-*.whl" |
| 25 | |
| 26 | do_install:class-native() { |
| 27 | # Bootstrap to prevent dependency loop in python3-pip-native |
| 28 | install -d ${D}${PYTHON_SITEPACKAGES_DIR} |
| 29 | unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PYPA_WHEEL} || \ |
| 30 | bbfatal_log "Failed to unzip wheel: ${PYPA_WHEEL}. Check the logs." |
| 31 | } |
| 32 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 33 | RDEPENDS:${PN} = "\ |
| 34 | ${PYTHON_PN}-2to3 \ |
| 35 | ${PYTHON_PN}-compile \ |
| 36 | ${PYTHON_PN}-compression \ |
| 37 | ${PYTHON_PN}-ctypes \ |
| 38 | ${PYTHON_PN}-email \ |
| 39 | ${PYTHON_PN}-html \ |
| 40 | ${PYTHON_PN}-json \ |
| 41 | ${PYTHON_PN}-netserver \ |
| 42 | ${PYTHON_PN}-numbers \ |
| 43 | ${PYTHON_PN}-pickle \ |
| 44 | ${PYTHON_PN}-pkg-resources \ |
| 45 | ${PYTHON_PN}-pkgutil \ |
| 46 | ${PYTHON_PN}-plistlib \ |
| 47 | ${PYTHON_PN}-shell \ |
| 48 | ${PYTHON_PN}-stringold \ |
| 49 | ${PYTHON_PN}-threading \ |
| 50 | ${PYTHON_PN}-unittest \ |
| 51 | ${PYTHON_PN}-xml \ |
| 52 | " |
| 53 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 54 | BBCLASSEXTEND = "native nativesdk" |
| 55 | |
| 56 | # The pkg-resources module can be used by itself, without the package downloader |
| 57 | # and easy_install. Ship it in a separate package so that it can be used by |
| 58 | # minimal distributions. |
| 59 | PACKAGES =+ "${PYTHON_PN}-pkg-resources " |
| 60 | FILES:${PYTHON_PN}-pkg-resources = "${PYTHON_SITEPACKAGES_DIR}/pkg_resources/*" |
| 61 | RDEPENDS:${PYTHON_PN}-pkg-resources = "\ |
| 62 | ${PYTHON_PN}-compression \ |
| 63 | ${PYTHON_PN}-email \ |
| 64 | ${PYTHON_PN}-plistlib \ |
| 65 | ${PYTHON_PN}-pprint \ |
| 66 | " |