summaryrefslogtreecommitdiffstats
path: root/meta/classes/pypi.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/pypi.bbclass')
-rw-r--r--meta/classes/pypi.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/pypi.bbclass b/meta/classes/pypi.bbclass
index 384a209874..9405d58601 100644
--- a/meta/classes/pypi.bbclass
+++ b/meta/classes/pypi.bbclass
@@ -8,18 +8,18 @@ def pypi_package(d):
PYPI_PACKAGE ?= "${@pypi_package(d)}"
PYPI_PACKAGE_EXT ?= "tar.gz"
+PYPI_ARCHIVE_NAME ?= "${PYPI_PACKAGE}-${PV}.${PYPI_PACKAGE_EXT}"
def pypi_src_uri(d):
package = d.getVar('PYPI_PACKAGE')
- package_ext = d.getVar('PYPI_PACKAGE_EXT')
- pv = d.getVar('PV')
- return 'https://files.pythonhosted.org/packages/source/%s/%s/%s-%s.%s' % (package[0], package, package, pv, package_ext)
+ archive_name = d.getVar('PYPI_ARCHIVE_NAME')
+ return 'https://files.pythonhosted.org/packages/source/%s/%s/%s' % (package[0], package, archive_name)
PYPI_SRC_URI ?= "${@pypi_src_uri(d)}"
HOMEPAGE ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/"
SECTION = "devel/python"
-SRC_URI_prepend = "${PYPI_SRC_URI} "
+SRC_URI:prepend = "${PYPI_SRC_URI} "
S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
UPSTREAM_CHECK_URI ?= "https://pypi.org/project/${PYPI_PACKAGE}/"