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
commit676445299dae888b357a821eae2ae6a9db49b90d (patch)
tree154e1e1bac04f91645689ac93d6f75d526085143
parentd86e75313524298e52469d4e55fa945ec731e938 (diff)
parent35b902c05711c8637999ad3fb72d5e04aae36dad (diff)
downloadvyos-cloud-init-676445299dae888b357a821eae2ae6a9db49b90d.tar.gz
vyos-cloud-init-676445299dae888b357a821eae2ae6a9db49b90d.zip
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"