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 /meta-openstack/classes | |
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>
Diffstat (limited to 'meta-openstack/classes')
-rw-r--r-- | meta-openstack/classes/rmargparse.bbclass | 3 |
1 files changed, 3 insertions, 0 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 | } | ||