aboutsummaryrefslogtreecommitdiffstats
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
meta-cloud-services-0a89c5fa0d68d4c0325ca0790990ba4c5df592eb.tar.bz2
meta-cloud-services-0a89c5fa0d68d4c0325ca0790990ba4c5df592eb.zip
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 00000000..65d84595
--- /dev/null
+++ b/meta-openstack/classes/rmargparse.bbclass
@@ -0,0 +1,3 @@
+do_install_append() {
+ sed -i '/argparse/d' ${D}${libdir}/python2.7/site-packages/*/requires.txt
+}
diff --git a/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb b/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb
index 951198d8..1590ed46 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}"
SRCREV="b44d32d02b014748044b5b18d27a9d1f8312145c"
S = "${WORKDIR}/git"
-inherit setuptools monitor
+inherit setuptools monitor rmargparse
DEPENDS += " \
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 e7e1f7ed..4a9dc9f0 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
S = "${WORKDIR}/${SRCNAME}-${PV}"
-inherit setuptools
+inherit setuptools rmargparse
DEPENDS += " \
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 430e32d7..2ced1e9f 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 = "\
S = "${WORKDIR}/git"
-inherit setuptools monitor
+inherit setuptools monitor rmargparse
FILES_${PN} += "${datadir}/${SRCNAME}"
diff --git a/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb b/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb
index 5c5d98c2..b538cbfe 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}"
SRCREV = "ec70eb02f8a5889828cde786694283240f64c5c4"
S = "${WORKDIR}/git"
-inherit setuptools monitor
+inherit setuptools monitor rmargparse
FILES_${PN}-doc += "${datadir}/keystoneclient"
diff --git a/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb b/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb
index e35be5df..16a2e926 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}"
SRCREV = "aa1215a5ad063b299d32ef319eb63d5210249a9b"
S = "${WORKDIR}/git"
-inherit setuptools monitor
+inherit setuptools monitor rmargparse
PACKAGECONFIG ?= "bash-completion"
PACKAGECONFIG[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 1e60fb4f..dd0151a5 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}"
SRCREV = "4ab9db648653f7ea6b9f8b1c78bff672b20b913f"
S = "${WORKDIR}/git"
-inherit setuptools monitor
+inherit setuptools monitor rmargparse
DEPENDS = "python-setuptools-git"
DEPENDS += " \
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 3094b1e6..ec1340dd 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
S = "${WORKDIR}/${SRCNAME}-${PV}"
-inherit setuptools
+inherit setuptools rmargparse
DEPENDS += " \
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 6100f687..73b054af 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"
SRC_URI[md5sum] = "e9ed2a1cf91ee76fd9045f902fa58089"
SRC_URI[sha256sum] = "beab2b7f91966d259796392c39ed6f260b32851861561dd9f3b9be2fd0c426a5"
-inherit pypi
+inherit pypi rmargparse
DEPENDS += " \
python-pip \