Use absolute path references in the pants bootstrap script.

Review Request #302 — Created April 30, 2014 and submitted

jsirois
pants
pants/location_independent_bootstrap
94
pants-reviews
areitz, benjyw, tejal
commit bc3d021389edf69a8db3135a2e9eafe3a2b20055
Author: John Sirois <jsirois@twitter.com>
Date:   Wed Apr 30 17:15:26 2014 -0600

    Use absolute path references in the pants bootstrap script.
    
    This allows pants to be run from sources in other repos.

 pants | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
I could use some help from Eric.

I concocted this local test though to confirm this works:

In my fork - this branch:
$ git diff
diff --git a/src/python/pants/bin/pants_exe.py b/src/python/pants/bin/pants_exe.py
index 70ade97..b10b832 100644
--- a/src/python/pants/bin/pants_exe.py
+++ b/src/python/pants/bin/pants_exe.py
@@ -165,6 +165,7 @@ def _run():
       NailgunTask.killall(None)
 
 def main():
+  print('>>> Customized locally in %s, running in %s' % (__file__, os.path.realpath(os.getcwd())))
   try:
     _run()
   except KeyboardInterrupt:

Then in pantsbuild/pants master:
$ PANTS_DEV=1 ~/dev-jsirois-pants/pants goal list | head
*** Running pants in dev mode from /home/jsirois/dev-jsirois-pants/src/python/pants/bin/pants_exe.py ***
>>> Customized locally in /home/jsirois/dev-jsirois-pants/src/python/pants/bin/pants_exe.py, running in /home/jsirois/dev/3rdparty/pantsbuild-pants
3rdparty/BUILD:antlr2
3rdparty/BUILD:antlr3
3rdparty/BUILD:antlr-3.4
3rdparty/BUILD:antlr4
3rdparty/BUILD:checkstyle
3rdparty/BUILD:commons-lang
3rdparty/BUILD:finagle-core
3rdparty/BUILD:finagle-thrift
3rdparty/BUILD:guava
JS
ZU
  1. I patched it in and this works in my environment too.
  2. 
      
ZU
  1. ship it!
  2. 
      
JS
  1. Thanks - submitted.
  2. 
      
JS
Review request changed

Status: Closed (submitted)

Loading...