diff options
author | Monty Taylor <mordred@inaugust.com> | 2013-06-05 11:40:13 -0400 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2013-06-10 21:31:47 -0700 |
commit | d1c53ddad7a90529f151fa08feee41c6d16c44a1 (patch) | |
tree | d93defed7a2c759f0f1fff6d211c1003dbc64a37 /setup.py | |
parent | 04984a51b1a6f933531063b53b9efa5bf3edfb23 (diff) | |
download | pbr-d1c53ddad7a90529f151fa08feee41c6d16c44a1.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
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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( |