blob: 4480d56775b318f6f827027403a2d4e41ec9d59d [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001SUMMARY = "Download, build, install, upgrade, and uninstall Python packages"
Andrew Geisslerd25ed322020-06-27 00:28:28 -05002HOMEPAGE = "https://pypi.org/project/setuptools"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05003SECTION = "devel/python"
Patrick Williamsc0f7c042017-02-23 20:41:17 -06004LICENSE = "MIT"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=19;md5=9a33897f1bca1160d7aad3835152e158"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05006
Brad Bishop316dfdd2018-06-25 12:45:53 -04007PYPI_PACKAGE_EXT = "zip"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05008
Andrew Geissler635e0e42020-08-21 15:58:33 -05009inherit pypi setuptools3
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050010
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080011SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
12
Andrew Geissler475cb722020-07-10 16:00:51 -050013SRC_URI += "file://0001-change-shebang-to-python3.patch"
Andrew Geissler82c905d2020-04-13 13:39:40 -050014
Andrew Geissler706d5aa2021-02-12 15:55:30 -060015SRC_URI[sha256sum] = "ed0519d27a243843b05d82a5e9d01b0b083d9934eaa3d02779a23da18077bd3c"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050016
Brad Bishop316dfdd2018-06-25 12:45:53 -040017DEPENDS += "${PYTHON_PN}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050018
Brad Bishop316dfdd2018-06-25 12:45:53 -040019RDEPENDS_${PN} = "\
Andrew Geissler1e34c2d2020-05-29 16:02:59 -050020 ${PYTHON_PN}-2to3 \
Brad Bishop316dfdd2018-06-25 12:45:53 -040021 ${PYTHON_PN}-compile \
22 ${PYTHON_PN}-compression \
23 ${PYTHON_PN}-ctypes \
24 ${PYTHON_PN}-distutils \
25 ${PYTHON_PN}-email \
26 ${PYTHON_PN}-html \
Andrew Geisslerc182c622020-05-15 14:13:32 -050027 ${PYTHON_PN}-json \
Brad Bishop316dfdd2018-06-25 12:45:53 -040028 ${PYTHON_PN}-netserver \
29 ${PYTHON_PN}-numbers \
Andrew Geissler1e34c2d2020-05-29 16:02:59 -050030 ${PYTHON_PN}-pickle \
Brad Bishop316dfdd2018-06-25 12:45:53 -040031 ${PYTHON_PN}-pkgutil \
32 ${PYTHON_PN}-plistlib \
33 ${PYTHON_PN}-shell \
34 ${PYTHON_PN}-stringold \
35 ${PYTHON_PN}-threading \
36 ${PYTHON_PN}-unittest \
37 ${PYTHON_PN}-xml \
38"
Andrew Geissler635e0e42020-08-21 15:58:33 -050039
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050040do_install_prepend() {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060041 install -d ${D}${PYTHON_SITEPACKAGES_DIR}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050042}
Brad Bishop316dfdd2018-06-25 12:45:53 -040043
Andrew Geissler635e0e42020-08-21 15:58:33 -050044do_install_append() {
45 mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
46}
47
Brad Bishop316dfdd2018-06-25 12:45:53 -040048BBCLASSEXTEND = "native nativesdk"
Brad Bishop15ae2502019-06-18 21:44:24 -040049
50# The pkg-resources module can be used by itself, without the package downloader
51# and easy_install. Ship it in a separate package so that it can be used by
52# minimal distributions.
53PACKAGES =+ "${PYTHON_PN}-pkg-resources "
54FILES_${PYTHON_PN}-pkg-resources = "${PYTHON_SITEPACKAGES_DIR}/pkg_resources/*"
Andrew Geissler5a43b432020-06-13 10:46:56 -050055RDEPENDS_${PYTHON_PN}-pkg-resources = "\
56 ${PYTHON_PN}-compression \
57 ${PYTHON_PN}-email \
58 ${PYTHON_PN}-plistlib \
59 ${PYTHON_PN}-pprint \
60"
Brad Bishop15ae2502019-06-18 21:44:24 -040061# Due to the way OE-Core implemented native recipes, the native class cannot
62# have a dependency on something that is not a recipe name. Work around that by
63# manually setting RPROVIDES.
64RDEPENDS_${PN}_append = " ${PYTHON_PN}-pkg-resources"
65RPROVIDES_append_class-native = " ${PYTHON_PN}-pkg-resources-native"