Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | SUMMARY = "Download, build, install, upgrade, and uninstall Python packages" |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 2 | HOMEPAGE = "https://pypi.org/project/setuptools" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 3 | SECTION = "devel/python" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 4 | LICENSE = "MIT" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=19;md5=9a33897f1bca1160d7aad3835152e158" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 6 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 7 | PYPI_PACKAGE_EXT = "zip" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 8 | |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 9 | inherit pypi setuptools3 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 10 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 11 | SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch" |
| 12 | |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 13 | SRC_URI += "file://0001-change-shebang-to-python3.patch" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 15 | SRC_URI[sha256sum] = "ed0519d27a243843b05d82a5e9d01b0b083d9934eaa3d02779a23da18077bd3c" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 16 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 17 | DEPENDS += "${PYTHON_PN}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 18 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 19 | RDEPENDS_${PN} = "\ |
Andrew Geissler | 1e34c2d | 2020-05-29 16:02:59 -0500 | [diff] [blame] | 20 | ${PYTHON_PN}-2to3 \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 21 | ${PYTHON_PN}-compile \ |
| 22 | ${PYTHON_PN}-compression \ |
| 23 | ${PYTHON_PN}-ctypes \ |
| 24 | ${PYTHON_PN}-distutils \ |
| 25 | ${PYTHON_PN}-email \ |
| 26 | ${PYTHON_PN}-html \ |
Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 27 | ${PYTHON_PN}-json \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 28 | ${PYTHON_PN}-netserver \ |
| 29 | ${PYTHON_PN}-numbers \ |
Andrew Geissler | 1e34c2d | 2020-05-29 16:02:59 -0500 | [diff] [blame] | 30 | ${PYTHON_PN}-pickle \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 31 | ${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 Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 39 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 40 | do_install_prepend() { |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 41 | install -d ${D}${PYTHON_SITEPACKAGES_DIR} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 42 | } |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 43 | |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 44 | do_install_append() { |
| 45 | mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install |
| 46 | } |
| 47 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 48 | BBCLASSEXTEND = "native nativesdk" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 49 | |
| 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. |
| 53 | PACKAGES =+ "${PYTHON_PN}-pkg-resources " |
| 54 | FILES_${PYTHON_PN}-pkg-resources = "${PYTHON_SITEPACKAGES_DIR}/pkg_resources/*" |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 55 | RDEPENDS_${PYTHON_PN}-pkg-resources = "\ |
| 56 | ${PYTHON_PN}-compression \ |
| 57 | ${PYTHON_PN}-email \ |
| 58 | ${PYTHON_PN}-plistlib \ |
| 59 | ${PYTHON_PN}-pprint \ |
| 60 | " |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 61 | # 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. |
| 64 | RDEPENDS_${PN}_append = " ${PYTHON_PN}-pkg-resources" |
| 65 | RPROVIDES_append_class-native = " ${PYTHON_PN}-pkg-resources-native" |