[pypy-dev] running the pypy toolchain
list-sink at trainedmonkeystudios.org
Thu Aug 20 09:30:20 CEST 2009
On Mon, 2009-08-17 at 14:51 -0600, Maciej Fijalkowski wrote:
> On Fri, Aug 14, 2009 at 3:44 PM, Terrence
> Cole<list-sink at trainedmonkeystudios.org> wrote:
> > On Thu, 2009-08-13 at 12:27 +1000, Ben Mellor wrote:
> >> On Wed, 12 Aug 2009 17:44:02 -0700
> >> Terrence Cole <list-sink at trainedmonkeystudios.org> wrote:
> >> > On Tue, 2009-08-11 at 03:16 -0600, Maciej Fijalkowski wrote:
> >> > > Hi.
> >> > >
> >> > > It's really cool that you find pypy as a good platform for writing
> >> > > interpreters, we're definitely
> >> > > happy with that :-) In general, we try to remove stuff from lang
> >> > > rather then put more of it
> >> > > there. So js/smalltalk/befunge interpreters would hopefully soon
> >> > > become projects on
> >> > > its own.
> >> >
> >> > Thank you for the reply. I was thinking that the current situation in
> >> > the lang directory would be unmanagable and I was wondering what I was
> >> > missing :-).
> >> >
> >> > I have not run into any documentation on making the pypy toolchain run
> >> > from an installed location, rather than from the svn checkout dir.
> >> > Since I don't even understand how autopath works yet, I figured that
> >> > getting something more sophisticated working than what everyone else is
> >> > doing in the lang directory would be an adventure better left for later.
> >> > Is there a plan for making pypy installable? Is it already possible and
> >> > I just haven't looked hard enough?
> >> What I'm currently doing with an interpreter I'm messing around with is to just
> >> put the path to PyPy in my PYTHONPATH (I'm using the 1.1.0 release right now,
> >> but I think it would work for an svn checkout as well). That works for running
> >> on top of CPython, even with my interpreter project directory completely
> >> outside of the PyPy tree.
> > That did the trick! My test suite is a bit of a kludge now though since
> > I can't reference my interpreter from an absolute pypy path. I have
> > added .. to my sys.path manually to get them working again, but it's
> > very ugly. Is there a better way to handle this?
> I'm not sure, but PYTHONPATH can handle multiple paths, like:
> is this what you wanted?
I think it would work, but maybe I should just describe what I'm trying
My tests are in befunge/tests/. I need to import the interpreter from
befunge/Interpreter.py. Before, I just dropped autopath.py into tests
and did 'import pypy.lang.befunge.Interpreter'. Now that autopath is
not an option, I need some way to tell my tests to look in ../ for
interpreter sources. I was hoping there was a common idiom less
cringeworthy than sys.path=['..']+sys.path. It seems like this would be
a common problem, but maybe I'm just over-thinking it.
More information about the Pypy-dev