Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | SUMMARY = "The PyPA recommended tool for installing Python packages" |
| 2 | sHOMEPAGEsss = "https://pypi.python.org/pypi/pip" |
| 3 | SECTION = "devel/python" |
| 4 | LICENSE = "MIT" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452" |
| 6 | |
| 7 | SRCNAME = "pip" |
| 8 | DEPENDS += "python3 python3-setuptools-native" |
| 9 | |
| 10 | SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" |
| 11 | |
| 12 | SRC_URI[md5sum] = "35f01da33009719497f01a4ba69d63c9" |
| 13 | SRC_URI[sha256sum] = "09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d" |
| 14 | |
| 15 | UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pip" |
| 16 | |
| 17 | S = "${WORKDIR}/${SRCNAME}-${PV}" |
| 18 | |
| 19 | inherit distutils3 |
| 20 | |
| 21 | DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}" |
| 22 | |
| 23 | do_install_prepend() { |
| 24 | install -d ${D}${PYTHON_SITEPACKAGES_DIR} |
| 25 | } |
| 26 | |
| 27 | # Use setuptools site.py instead, avoid shared state issue |
| 28 | do_install_append() { |
| 29 | rm ${D}${PYTHON_SITEPACKAGES_DIR}/site.py |
| 30 | rm ${D}${PYTHON_SITEPACKAGES_DIR}/__pycache__/site.cpython-*.pyc |
| 31 | |
| 32 | # Install as pip3 and leave pip2 as default |
| 33 | rm ${D}/${bindir}/pip |
| 34 | |
| 35 | # Installed eggs need to be passed directly to the interpreter via a pth file |
| 36 | echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}-${PV}.pth |
| 37 | |
| 38 | # Make sure we use /usr/bin/env python3 |
| 39 | for PYTHSCRIPT in `grep -rIl ${bindir} ${D}${bindir}/pip3*`; do |
| 40 | sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT |
| 41 | done |
| 42 | } |
| 43 | |
| 44 | RDEPENDS_${PN} = "\ |
| 45 | python3-compile \ |
| 46 | python3-io \ |
| 47 | python3-enum \ |
| 48 | python3-html \ |
| 49 | python3-json \ |
| 50 | python3-netserver \ |
| 51 | python3-setuptools \ |
| 52 | python3-unixadmin \ |
| 53 | python3-xmlrpc \ |
| 54 | " |
| 55 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 56 | BBCLASSEXTEND = "native nativesdk" |