summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2013-06-05 11:40:13 -0400
committerMonty Taylor <mordred@inaugust.com>2013-06-10 21:31:47 -0700
commit0fea9c036e77a5c6b4d829a41b8a5770f9c4a9f0 (patch)
tree5d98606b27915db75df5c730e4747aa0035bbcbe
parentb8d5f454daa89123272f32e6d506936e52469280 (diff)
downloadoslo-version-0fea9c036e77a5c6b4d829a41b8a5770f9c4a9f0.tar.gz
Use pip instead of easy_install for installation.
If we're running the installation of dependencies for installation ourselves anyway - just use pip and be done with it. This means that our requirements will get installed consistently regardless of whether we're using pip, python setup.py install or a tox environment. Change-Id: If92557a33a76553ad36bd136fa87780857a894b1
-rwxr-xr-xsetup.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index dcc3d3e..0fd8d96 100755
--- a/setup.py
+++ b/setup.py
@@ -14,6 +14,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import os
+import sys
+
+try:
+ sys.path += [x for x in os.listdir(".") if x.endswith(".egg")]
+ import d2to1 # flake8: noqa
+except ImportError:
+ import subprocess
+ if not subprocess.call(
+ [sys.executable] +
+ "-m pip.__init__ install distribute<0.7 d2to1>=0.2.10,<0.3".split()
+ ):
+ sys.exit(subprocess.call([sys.executable] + sys.argv))
import setuptools
setuptools.setup(