aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorSven Ebenfeld <sven.ebenfeld@gmail.com>2016-01-22 23:08:46 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2016-02-01 15:51:15 +0100
commita7fa0c3bf7723250b8e4565474b8e227c167c2a3 (patch)
treea3a54f331bf2d44998199e3f69921e823eb38df9 /classes
parentd692d0dfd507b4ca0282796879e3d7cdc2373fc2 (diff)
downloadmeta-python2-a7fa0c3bf7723250b8e4565474b8e227c167c2a3.tar.gz
meta-python2-a7fa0c3bf7723250b8e4565474b8e227c167c2a3.tar.bz2
meta-python2-a7fa0c3bf7723250b8e4565474b8e227c167c2a3.zip
add pypi3 bbclass to make python3 recipe creation easier as well
(From meta-openembedded commit: 1ec43c1e4f379ef5806268aa80ce8487388ab00c) Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com> Signed-off-by: Tim Orling <ticotimo@gmail.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/pypi-common.bbclass21
-rw-r--r--classes/pypi.bbclass22
-rw-r--r--classes/pypi3.bbclass1
3 files changed, 23 insertions, 21 deletions
diff --git a/classes/pypi-common.bbclass b/classes/pypi-common.bbclass
new file mode 100644
index 00000000..365002ec
--- /dev/null
+++ b/classes/pypi-common.bbclass
@@ -0,0 +1,21 @@
+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 41a70e25..8d8350a2 100644
--- a/classes/pypi.bbclass
+++ b/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/classes/pypi3.bbclass b/classes/pypi3.bbclass
new file mode 100644
index 00000000..e0f7bb36
--- /dev/null
+++ b/classes/pypi3.bbclass
@@ -0,0 +1 @@
+inherit pypi-common setuptools3