diff options
author | Derek Straka <derek@asterius.io> | 2016-02-14 23:05:15 -0500 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-02-25 17:45:47 +0100 |
commit | bca9128d1e82482bb3d3076a52e7c6264e10be1f (patch) | |
tree | 3a5a1f781b8a9f7208a6f4ec6c00f3ee2b02b0c2 /classes | |
parent | a949ee20aff218aa8eff036a18100646f28dd7fe (diff) | |
download | meta-python2-bca9128d1e82482bb3d3076a52e7c6264e10be1f.tar.gz |
Update pypi classes to avoid setuptools inherit to be more flexible
(From meta-openembedded commit: 1fadd754cc5979123a8df73f5c9f61aa857d69a0)
Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Tim Orling <ticotimo@gmail.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/pypi-common.bbclass | 21 | ||||
-rw-r--r-- | classes/pypi.bbclass | 24 | ||||
-rw-r--r-- | classes/pypi3.bbclass | 1 |
3 files changed, 23 insertions, 23 deletions
diff --git a/classes/pypi-common.bbclass b/classes/pypi-common.bbclass deleted file mode 100644 index 365002e..0000000 --- a/classes/pypi-common.bbclass +++ /dev/null @@ -1,21 +0,0 @@ -def pypi_package(d): - bpn = d.getVar('BPN', True) - if bpn.startswith('python-'): - return bpn[7:] - elif bpn.startswith('python3-'): - return bpn[8:] - return bpn - -PYPI_PACKAGE ?= "${@pypi_package(d)}" - -def pypi_src_uri(d): - package = d.getVar('PYPI_PACKAGE', True) - pv = d.getVar('PV', True) - return 'https://pypi.python.org/packages/source/%s/%s/%s-%s.tar.gz' % (package[0], package, package, pv) - -PYPI_SRC_URI ?= "${@pypi_src_uri(d)}" - -HOMEPAGE ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/" -SECTION = "devel/python" -SRC_URI += "${PYPI_SRC_URI}" -S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}" diff --git a/classes/pypi.bbclass b/classes/pypi.bbclass index 8d8350a..659e1c0 100644 --- a/classes/pypi.bbclass +++ b/classes/pypi.bbclass @@ -1 +1,23 @@ -inherit pypi-common setuptools +def pypi_package(d): + bpn = d.getVar('BPN', True) + if bpn.startswith('python-'): + return bpn[7:] + elif bpn.startswith('python3-'): + return bpn[8:] + return bpn + +PYPI_PACKAGE ?= "${@pypi_package(d)}" +PYPI_PACKAGE_EXT ?= "tar.gz" + +def pypi_src_uri(d): + package = d.getVar('PYPI_PACKAGE', True) + package_ext = d.getVar('PYPI_PACKAGE_EXT', True) + pv = d.getVar('PV', True) + return 'https://pypi.python.org/packages/source/%s/%s/%s-%s.%s' % (package[0], package, package, pv, package_ext) + +PYPI_SRC_URI ?= "${@pypi_src_uri(d)}" + +HOMEPAGE ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/" +SECTION = "devel/python" +SRC_URI += "${PYPI_SRC_URI}" +S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}" diff --git a/classes/pypi3.bbclass b/classes/pypi3.bbclass deleted file mode 100644 index e0f7bb3..0000000 --- a/classes/pypi3.bbclass +++ /dev/null @@ -1 +0,0 @@ -inherit pypi-common setuptools3 |