summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosep Puigdemont <josep.puigdemont@enea.com>2015-12-09 13:40:19 +0100
committerBruce Ashfield <bruce.ashfield@windriver.com>2015-12-11 12:11:31 -0500
commit0a89c5fa0d68d4c0325ca0790990ba4c5df592eb (patch)
tree41cd0f1d3b069469045d6d1f0f734d4843d100bd
parent73fc67b1c056aca938a9ffa743de52995f380b03 (diff)
downloadmeta-cloud-services-0a89c5fa0d68d4c0325ca0790990ba4c5df592eb.tar.gz
Use a bbclass to remove argparse from requirements
argparse is required by some of the CLI applications of openstack. The module is provided by python 2.7, however python-distribute (used in fido), is not able to find it: Python 2.7.9 (default, Oct 27 2015, 18:12:55) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pkg_resources >>> pkg_resources.get_distribution('argparse') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 338, in get_distribution if isinstance(dist,Requirement): dist = get_provider(dist) File "/usr/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 217, in get_provider return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0] File "/usr/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 698, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 596, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: argparse >>> import argparse >>> This patch adds a class that when inherited will remove argparse from requirements.txt. Also with this patch, those python modules used by openstackclient inherit the class. Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--meta-openstack/classes/rmargparse.bbclass3
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinderclient_git.bb2
-rw-r--r--meta-openstack/recipes-devtools/python/python-cliff_1.10.0.bb2
-rw-r--r--meta-openstack/recipes-devtools/python/python-glanceclient_git.bb2
-rw-r--r--meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb2
-rw-r--r--meta-openstack/recipes-devtools/python/python-neutronclient_git.bb2
-rw-r--r--meta-openstack/recipes-devtools/python/python-novaclient_git.bb2
-rw-r--r--meta-openstack/recipes-devtools/python/python-oslo.config_1.9.3.bb2
-rw-r--r--meta-openstack/recipes-devtools/python/python-stevedore_1.3.0.bb2
9 files changed, 11 insertions, 8 deletions
diff --git a/meta-openstack/classes/rmargparse.bbclass b/meta-openstack/classes/rmargparse.bbclass
new file mode 100644
index 0000000..65d8459
--- /dev/null
+++ b/meta-openstack/classes/rmargparse.bbclass
@@ -0,0 +1,3 @@
1do_install_append() {
2 sed -i '/argparse/d' ${D}${libdir}/python2.7/site-packages/*/requires.txt
3}
diff --git a/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb b/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb
index 951198d..1590ed4 100644
--- a/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb
@@ -17,7 +17,7 @@ PV="1.1.2+git${SRCPV}"
17SRCREV="b44d32d02b014748044b5b18d27a9d1f8312145c" 17SRCREV="b44d32d02b014748044b5b18d27a9d1f8312145c"
18S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
19 19
20inherit setuptools monitor 20inherit setuptools monitor rmargparse
21 21
22DEPENDS += " \ 22DEPENDS += " \
23 python-pip \ 23 python-pip \
diff --git a/meta-openstack/recipes-devtools/python/python-cliff_1.10.0.bb b/meta-openstack/recipes-devtools/python/python-cliff_1.10.0.bb
index e7e1f7e..4a9dc9f 100644
--- a/meta-openstack/recipes-devtools/python/python-cliff_1.10.0.bb
+++ b/meta-openstack/recipes-devtools/python/python-cliff_1.10.0.bb
@@ -15,7 +15,7 @@ SRC_URI[sha256sum] = "209882e199fdf98aeed0db44b922aa688e5a66d81c45148a5743804f9a
15 15
16S = "${WORKDIR}/${SRCNAME}-${PV}" 16S = "${WORKDIR}/${SRCNAME}-${PV}"
17 17
18inherit setuptools 18inherit setuptools rmargparse
19 19
20DEPENDS += " \ 20DEPENDS += " \
21 python-pbr \ 21 python-pbr \
diff --git a/meta-openstack/recipes-devtools/python/python-glanceclient_git.bb b/meta-openstack/recipes-devtools/python/python-glanceclient_git.bb
index 430e32d..2ced1e9 100644
--- a/meta-openstack/recipes-devtools/python/python-glanceclient_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-glanceclient_git.bb
@@ -15,7 +15,7 @@ SRC_URI = "\
15 15
16S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
17 17
18inherit setuptools monitor 18inherit setuptools monitor rmargparse
19 19
20FILES_${PN} += "${datadir}/${SRCNAME}" 20FILES_${PN} += "${datadir}/${SRCNAME}"
21 21
diff --git a/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb b/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb
index 5c5d98c..b538cbf 100644
--- a/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb
@@ -16,7 +16,7 @@ PV = "1.3.3+git${SRCPV}"
16SRCREV = "ec70eb02f8a5889828cde786694283240f64c5c4" 16SRCREV = "ec70eb02f8a5889828cde786694283240f64c5c4"
17S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"
18 18
19inherit setuptools monitor 19inherit setuptools monitor rmargparse
20 20
21FILES_${PN}-doc += "${datadir}/keystoneclient" 21FILES_${PN}-doc += "${datadir}/keystoneclient"
22 22
diff --git a/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb b/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb
index e35be5d..16a2e92 100644
--- a/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb
@@ -29,7 +29,7 @@ PV = "2.4.0+git${SRCPV}"
29SRCREV = "aa1215a5ad063b299d32ef319eb63d5210249a9b" 29SRCREV = "aa1215a5ad063b299d32ef319eb63d5210249a9b"
30S = "${WORKDIR}/git" 30S = "${WORKDIR}/git"
31 31
32inherit setuptools monitor 32inherit setuptools monitor rmargparse
33 33
34PACKAGECONFIG ?= "bash-completion" 34PACKAGECONFIG ?= "bash-completion"
35PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" 35PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion"
diff --git a/meta-openstack/recipes-devtools/python/python-novaclient_git.bb b/meta-openstack/recipes-devtools/python/python-novaclient_git.bb
index 1e60fb4..dd0151a 100644
--- a/meta-openstack/recipes-devtools/python/python-novaclient_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-novaclient_git.bb
@@ -13,7 +13,7 @@ PV = "2.23.2+git${SRCPV}"
13SRCREV = "4ab9db648653f7ea6b9f8b1c78bff672b20b913f" 13SRCREV = "4ab9db648653f7ea6b9f8b1c78bff672b20b913f"
14S = "${WORKDIR}/git" 14S = "${WORKDIR}/git"
15 15
16inherit setuptools monitor 16inherit setuptools monitor rmargparse
17 17
18DEPENDS = "python-setuptools-git" 18DEPENDS = "python-setuptools-git"
19DEPENDS += " \ 19DEPENDS += " \
diff --git a/meta-openstack/recipes-devtools/python/python-oslo.config_1.9.3.bb b/meta-openstack/recipes-devtools/python/python-oslo.config_1.9.3.bb
index 3094b1e..ec1340d 100644
--- a/meta-openstack/recipes-devtools/python/python-oslo.config_1.9.3.bb
+++ b/meta-openstack/recipes-devtools/python/python-oslo.config_1.9.3.bb
@@ -14,7 +14,7 @@ SRC_URI[sha256sum] = "ab54e67776d9bbee86ba8cce9393ba3186e6e63de926e9797598dc35fe
14 14
15S = "${WORKDIR}/${SRCNAME}-${PV}" 15S = "${WORKDIR}/${SRCNAME}-${PV}"
16 16
17inherit setuptools 17inherit setuptools rmargparse
18 18
19DEPENDS += " \ 19DEPENDS += " \
20 python-pbr \ 20 python-pbr \
diff --git a/meta-openstack/recipes-devtools/python/python-stevedore_1.3.0.bb b/meta-openstack/recipes-devtools/python/python-stevedore_1.3.0.bb
index 6100f68..73b054a 100644
--- a/meta-openstack/recipes-devtools/python/python-stevedore_1.3.0.bb
+++ b/meta-openstack/recipes-devtools/python/python-stevedore_1.3.0.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
7SRC_URI[md5sum] = "e9ed2a1cf91ee76fd9045f902fa58089" 7SRC_URI[md5sum] = "e9ed2a1cf91ee76fd9045f902fa58089"
8SRC_URI[sha256sum] = "beab2b7f91966d259796392c39ed6f260b32851861561dd9f3b9be2fd0c426a5" 8SRC_URI[sha256sum] = "beab2b7f91966d259796392c39ed6f260b32851861561dd9f3b9be2fd0c426a5"
9 9
10inherit pypi 10inherit pypi rmargparse
11 11
12DEPENDS += " \ 12DEPENDS += " \
13 python-pip \ 13 python-pip \