From: Daniel Dunbar Date: Tue, 13 Aug 2013 19:08:48 +0000 (+0000) Subject: [lit] Support use of setup.py from other directories. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=13e26da155d245e0d1e55fb8dc9f586426112fc2;p=oota-llvm.git [lit] Support use of setup.py from other directories. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188309 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/lit/setup.py b/utils/lit/setup.py index a94e6ea833e..10de6bb4ee7 100644 --- a/utils/lit/setup.py +++ b/utils/lit/setup.py @@ -1,7 +1,14 @@ import lit +import os -# FIXME: Support distutils? from setuptools import setup, find_packages + +# setuptools expects to be invoked from within the directory of setup.py, but it +# is nice to allow: +# python path/to/setup.py install +# to work (for scripts, etc.) +os.chdir(os.path.dirname(os.path.abspath(__file__))) + setup( name = "lit", version = lit.__version__,