From 8ce7742e19838e6c4a50cf909c954ea9cf49eac9 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Nov 26 2018 23:27:41 +0000 Subject: Hack up an ugly --nodeps install arg to avoid Python 3 problems See comment for full description. Signed-off-by: Adam Williamson --- diff --git a/setup.py b/setup.py index 9637fc7..dc03f33 100644 --- a/setup.py +++ b/setup.py @@ -46,6 +46,22 @@ try: except ImportError: longdesc = open('README.md').read() +# this is sloppy and wrong, see https://stackoverflow.com/a/4792601 +# discussion, but should be okay for our purposes. the problem here +# is that if you run 'python3 setup.py install' with all the install +# requires in place, setuptools installs scripts from several of the +# deps to /usr/local/bin , overriding the system copies in /usr/bin. +# This seems to happen when the copy in /usr/bin is for Python 2 not +# Python 3 - e.g. because /usr/bin/fedmsg-logger is Python 2, if you +# do 'python3 setup.py install' here, due to the fedmsg dep, you get +# a /usr/local/bin/fedmsg-logger which is Python 3...we want to be +# able to avoid this, so hack up a 'no deps' +if "--nodeps" in sys.argv: + installreqs = [] + sys.argv.remove("--nodeps") +else: + installreqs = open('install.requires').read().splitlines() + setup( name="autocloudreporter", version="1.0.3",