summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-07-18 17:00:56 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-07-18 17:00:56 -0700
commit8a49d355cb142eae6e882890616c3a5ead17f2ab (patch)
tree154e1e1bac04f91645689ac93d6f75d526085143
parent1f8bac8e3b13fee637ea47ed87128a1fd7e3b8e9 (diff)
parent1f818b94d843c92c2f5cde29168d54c61b5f073b (diff)
downloadcloud-init-8a49d355cb142eae6e882890616c3a5ead17f2ab.tar.gz
Avoid depending on argparse in 2.7 or greater
At least (currently) for rhel7 the argparse package does not get installed (even though rpm say it is installed by the python core package) and this causes things that mention argparse in there requirements to not believe that argparse is installed (even though it is) so to avoid this whole mess we can just avoid depending on argparse in python versions where we don't need to (since it was included in the stdlib in python 2.7+)
-rwxr-xr-xpackages/brpm3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/brpm b/packages/brpm
index b41b675f..45e47610 100755
--- a/packages/brpm
+++ b/packages/brpm
@@ -137,6 +137,9 @@ def generate_spec_contents(args, tmpl_fn, top_dir, arc_fn):
# Map to known packages
requires = []
for p in pkgs:
+ if p == 'argparse' and sys.version_info[0:2] >= (2, 7):
+ # Not needed on anything but 2.6 or older.
+ continue
tgt_pkg = PKG_MP[args.distro].get(p)
if not tgt_pkg:
raise RuntimeError(("Do not know how to translate pypi dependency"