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

Antonio Cuni anto.cuni at gmail.com
Fri Sep 6 11:02:54 CEST 2013


Hi,

On 05/09/13 17:09, vext01 wrote:
> 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)

this looks wrong.

I think that the jitviewer is supposed to be installed as a normal package 
inside the pypy distribution to work well.

You should do:
$ /path/to/pypy/bin/pypy /path/to/jitviewer/setup.py develop

this way, setuptools creates a link and the jitviewer package is installed in 
pypy even if it's physically in the repo (which is convenient for developing).

ciao,
Anto


More information about the pypy-dev mailing list