[pypy-commit] jitviewer argparse-collect: (RichardN, Edd) Add the jitviewer path to PYTHONPATH automatically.

vext01 noreply at buildbot.pypy.org
Thu Sep 5 17:09:43 CEST 2013


Author: Edd Barrett <vext01 at gmail.com>
Branch: argparse-collect
Changeset: r229:f623ba2c70b0
Date: 2013-08-30 16:19 +0100
http://bitbucket.org/pypy/jitviewer/changeset/f623ba2c70b0/

Log:	(RichardN, Edd) Add the jitviewer path to PYTHONPATH automatically.

diff --git a/bin/jitviewer.py b/bin/jitviewer.py
--- a/bin/jitviewer.py
+++ b/bin/jitviewer.py
@@ -1,4 +1,10 @@
 #!/usr/bin/env pypy
 import sys
+import os.path
+
+script_path = os.path.abspath(__file__)
+pythonpath = os.path.dirname(os.path.dirname(script_path))
+sys.path.append(pythonpath)
+
 from _jitviewer.app import main
 main(sys.argv)


More information about the pypy-commit mailing list