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 | 1fadd754cc5979123a8df73f5c9f61aa857d69a0 (patch) | |
tree | 6a1552c0d81ce8690bb20cd23de6715a520bb120 | |
parent | 408d4cb67249d81e43abffd4ba7cc7456311d9ea (diff) | |
download | meta-openembedded-1fadd754cc5979123a8df73f5c9f61aa857d69a0.tar.gz |
Update pypi classes to avoid setuptools inherit to be more flexible
Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r-- | meta-python/classes/pypi-common.bbclass | 21 | ||||
-rw-r--r-- | meta-python/classes/pypi.bbclass | 24 | ||||
-rw-r--r-- | meta-python/classes/pypi3.bbclass | 1 |
3 files changed, 23 insertions, 23 deletions
diff --git a/meta-python/classes/pypi-common.bbclass b/meta-python/classes/pypi-common.bbclass deleted file mode 100644 index 365002ec0..000000000 --- a/meta-python/classes/pypi-common.bbclass +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | def pypi_package(d): | ||
2 | bpn = d.getVar('BPN', True) | ||
3 | if bpn.startswith('python-'): | ||
4 | return bpn[7:] | ||
5 | elif bpn.startswith('python3-'): | ||
6 | return bpn[8:] | ||
7 | return bpn | ||
8 | |||
9 | PYPI_PACKAGE ?= "${@pypi_package(d)}" | ||
10 | |||
11 | def pypi_src_uri(d): | ||
12 | package = d.getVar('PYPI_PACKAGE', True) | ||
13 | pv = d.getVar('PV', True) | ||
14 | return 'https://pypi.python.org/packages/source/%s/%s/%s-%s.tar.gz' % (package[0], package, package, pv) | ||
15 | |||
16 | PYPI_SRC_URI ?= "${@pypi_src_uri(d)}" | ||
17 | |||
18 | HOMEPAGE ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/" | ||
19 | SECTION = "devel/python" | ||
20 | SRC_URI += "${PYPI_SRC_URI}" | ||
21 | S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}" | ||
diff --git a/meta-python/classes/pypi.bbclass b/meta-python/classes/pypi.bbclass index 8d8350a2b..659e1c0d8 100644 --- a/meta-python/classes/pypi.bbclass +++ b/meta-python/classes/pypi.bbclass | |||
@@ -1 +1,23 @@ | |||
1 | inherit pypi-common setuptools | 1 | def pypi_package(d): |
2 | bpn = d.getVar('BPN', True) | ||
3 | if bpn.startswith('python-'): | ||
4 | return bpn[7:] | ||
5 | elif bpn.startswith('python3-'): | ||
6 | return bpn[8:] | ||
7 | return bpn | ||
8 | |||
9 | PYPI_PACKAGE ?= "${@pypi_package(d)}" | ||
10 | PYPI_PACKAGE_EXT ?= "tar.gz" | ||
11 | |||
12 | def pypi_src_uri(d): | ||
13 | package = d.getVar('PYPI_PACKAGE', True) | ||
14 | package_ext = d.getVar('PYPI_PACKAGE_EXT', True) | ||
15 | pv = d.getVar('PV', True) | ||
16 | return 'https://pypi.python.org/packages/source/%s/%s/%s-%s.%s' % (package[0], package, package, pv, package_ext) | ||
17 | |||
18 | PYPI_SRC_URI ?= "${@pypi_src_uri(d)}" | ||
19 | |||
20 | HOMEPAGE ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/" | ||
21 | SECTION = "devel/python" | ||
22 | SRC_URI += "${PYPI_SRC_URI}" | ||
23 | S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}" | ||
diff --git a/meta-python/classes/pypi3.bbclass b/meta-python/classes/pypi3.bbclass deleted file mode 100644 index e0f7bb36e..000000000 --- a/meta-python/classes/pypi3.bbclass +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | inherit pypi-common setuptools3 | ||