diff options
author | Josep Puigdemont <josep.puigdemont@enea.com> | 2015-12-09 13:40:19 +0100 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2015-12-11 12:11:31 -0500 |
commit | 0a89c5fa0d68d4c0325ca0790990ba4c5df592eb (patch) | |
tree | 41cd0f1d3b069469045d6d1f0f734d4843d100bd | |
parent | 73fc67b1c056aca938a9ffa743de52995f380b03 (diff) | |
download | meta-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>
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 @@ | |||
1 | do_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}" | |||
17 | SRCREV="b44d32d02b014748044b5b18d27a9d1f8312145c" | 17 | SRCREV="b44d32d02b014748044b5b18d27a9d1f8312145c" |
18 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
19 | 19 | ||
20 | inherit setuptools monitor | 20 | inherit setuptools monitor rmargparse |
21 | 21 | ||
22 | DEPENDS += " \ | 22 | DEPENDS += " \ |
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 | ||
16 | S = "${WORKDIR}/${SRCNAME}-${PV}" | 16 | S = "${WORKDIR}/${SRCNAME}-${PV}" |
17 | 17 | ||
18 | inherit setuptools | 18 | inherit setuptools rmargparse |
19 | 19 | ||
20 | DEPENDS += " \ | 20 | DEPENDS += " \ |
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 | ||
16 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
17 | 17 | ||
18 | inherit setuptools monitor | 18 | inherit setuptools monitor rmargparse |
19 | 19 | ||
20 | FILES_${PN} += "${datadir}/${SRCNAME}" | 20 | FILES_${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}" | |||
16 | SRCREV = "ec70eb02f8a5889828cde786694283240f64c5c4" | 16 | SRCREV = "ec70eb02f8a5889828cde786694283240f64c5c4" |
17 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
18 | 18 | ||
19 | inherit setuptools monitor | 19 | inherit setuptools monitor rmargparse |
20 | 20 | ||
21 | FILES_${PN}-doc += "${datadir}/keystoneclient" | 21 | FILES_${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}" | |||
29 | SRCREV = "aa1215a5ad063b299d32ef319eb63d5210249a9b" | 29 | SRCREV = "aa1215a5ad063b299d32ef319eb63d5210249a9b" |
30 | S = "${WORKDIR}/git" | 30 | S = "${WORKDIR}/git" |
31 | 31 | ||
32 | inherit setuptools monitor | 32 | inherit setuptools monitor rmargparse |
33 | 33 | ||
34 | PACKAGECONFIG ?= "bash-completion" | 34 | PACKAGECONFIG ?= "bash-completion" |
35 | PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" | 35 | 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 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}" | |||
13 | SRCREV = "4ab9db648653f7ea6b9f8b1c78bff672b20b913f" | 13 | SRCREV = "4ab9db648653f7ea6b9f8b1c78bff672b20b913f" |
14 | S = "${WORKDIR}/git" | 14 | S = "${WORKDIR}/git" |
15 | 15 | ||
16 | inherit setuptools monitor | 16 | inherit setuptools monitor rmargparse |
17 | 17 | ||
18 | DEPENDS = "python-setuptools-git" | 18 | DEPENDS = "python-setuptools-git" |
19 | DEPENDS += " \ | 19 | 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 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 | ||
15 | S = "${WORKDIR}/${SRCNAME}-${PV}" | 15 | S = "${WORKDIR}/${SRCNAME}-${PV}" |
16 | 16 | ||
17 | inherit setuptools | 17 | inherit setuptools rmargparse |
18 | 18 | ||
19 | DEPENDS += " \ | 19 | DEPENDS += " \ |
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" | |||
7 | SRC_URI[md5sum] = "e9ed2a1cf91ee76fd9045f902fa58089" | 7 | SRC_URI[md5sum] = "e9ed2a1cf91ee76fd9045f902fa58089" |
8 | SRC_URI[sha256sum] = "beab2b7f91966d259796392c39ed6f260b32851861561dd9f3b9be2fd0c426a5" | 8 | SRC_URI[sha256sum] = "beab2b7f91966d259796392c39ed6f260b32851861561dd9f3b9be2fd0c426a5" |
9 | 9 | ||
10 | inherit pypi | 10 | inherit pypi rmargparse |
11 | 11 | ||
12 | DEPENDS += " \ | 12 | DEPENDS += " \ |
13 | python-pip \ | 13 | python-pip \ |