[llvm] r188309 - [lit] Support use of setup.py from other directories.
Daniel Dunbar
daniel at zuster.org
Tue Aug 13 12:08:49 PDT 2013
Author: ddunbar
Date: Tue Aug 13 14:08:48 2013
New Revision: 188309
URL: http://llvm.org/viewvc/llvm-project?rev=188309&view=rev
Log:
[lit] Support use of setup.py from other directories.
Modified:
llvm/trunk/utils/lit/setup.py
Modified: llvm/trunk/utils/lit/setup.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/setup.py?rev=188309&r1=188308&r2=188309&view=diff
==============================================================================
--- llvm/trunk/utils/lit/setup.py (original)
+++ llvm/trunk/utils/lit/setup.py Tue Aug 13 14:08:48 2013
@@ -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__,
More information about the llvm-commits
mailing list