[oe-commits] [meta-openembedded] 03/46: add pypi3 bbclass to make python3 recipe creation easier as well
git at git.openembedded.org
git at git.openembedded.org
Mon Feb 1 15:08:06 UTC 2016
martin_jansa pushed a commit to branch master
in repository meta-openembedded.
commit 1ec43c1e4f379ef5806268aa80ce8487388ab00c
Author: Sven Ebenfeld <sven.ebenfeld at gmail.com>
AuthorDate: Fri Jan 22 23:08:46 2016 +0100
add pypi3 bbclass to make python3 recipe creation easier as well
Signed-off-by: Sven Ebenfeld <sven.ebenfeld at gmail.com>
---
.../classes/{pypi.bbclass => pypi-common.bbclass} | 4 ++--
meta-python/classes/pypi.bbclass | 22 +---------------------
meta-python/classes/pypi3.bbclass | 1 +
3 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/meta-python/classes/pypi.bbclass b/meta-python/classes/pypi-common.bbclass
similarity index 90%
copy from meta-python/classes/pypi.bbclass
copy to meta-python/classes/pypi-common.bbclass
index 41a70e2..365002e 100644
--- a/meta-python/classes/pypi.bbclass
+++ b/meta-python/classes/pypi-common.bbclass
@@ -2,6 +2,8 @@ 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)}"
@@ -17,5 +19,3 @@ HOMEPAGE ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/"
SECTION = "devel/python"
SRC_URI += "${PYPI_SRC_URI}"
S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
-
-inherit setuptools
diff --git a/meta-python/classes/pypi.bbclass b/meta-python/classes/pypi.bbclass
index 41a70e2..8d8350a 100644
--- a/meta-python/classes/pypi.bbclass
+++ b/meta-python/classes/pypi.bbclass
@@ -1,21 +1 @@
-def pypi_package(d):
- bpn = d.getVar('BPN', True)
- if bpn.startswith('python-'):
- return bpn[7:]
- 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}"
-
-inherit setuptools
+inherit pypi-common setuptools
diff --git a/meta-python/classes/pypi3.bbclass b/meta-python/classes/pypi3.bbclass
new file mode 100644
index 0000000..e0f7bb3
--- /dev/null
+++ b/meta-python/classes/pypi3.bbclass
@@ -0,0 +1 @@
+inherit pypi-common setuptools3
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list