[oe-commits] [meta-openembedded] 61/64: Update pypi classes to avoid setuptools inherit to be more flexible

git at git.openembedded.org git at git.openembedded.org
Mon Feb 15 09:25:38 UTC 2016


martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit 1cadebe914f4b090777d0b951bd31fc622cbdf8f
Author: Derek Straka <derek at asterius.io>
AuthorDate: Sun Feb 14 23:05:15 2016 -0500

    Update pypi classes to avoid setuptools inherit to be more flexible
    
    Signed-off-by: Derek Straka <derek at asterius.io>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 meta-python/classes/pypi-common.bbclass | 21 ---------------------
 meta-python/classes/pypi.bbclass        | 24 +++++++++++++++++++++++-
 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 365002e..0000000
--- a/meta-python/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/meta-python/classes/pypi.bbclass b/meta-python/classes/pypi.bbclass
index 8d8350a..659e1c0 100644
--- a/meta-python/classes/pypi.bbclass
+++ b/meta-python/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/meta-python/classes/pypi3.bbclass b/meta-python/classes/pypi3.bbclass
deleted file mode 100644
index e0f7bb3..0000000
--- a/meta-python/classes/pypi3.bbclass
+++ /dev/null
@@ -1 +0,0 @@
-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