[pypy-dev] new autopath logic?

holger krekel hpk at trillke.net
Fri May 14 16:42:11 CEST 2004

Hi Rocco,

[Rocco Moretti Fri, May 14, 2004 at 09:04:02AM -0500]
> holger krekel wrote:
> >[Laura Creighton Wed, May 05, 2004 at 06:44:21PM +0200]
> >
> >>Sounds good.  Maybe we write a PEP and get it into the standard library,
> >>too.
> >
> >wow, that took 2 minutes roundtrip :-) 
> >
> >Yes, putting it in a standard place would be nicer than having to 
> >distribute it all over the project. For the time beeing this needs
> >to be done, though. 
> Well, until it gets into the standard library, you could spin it out as 
> a separate project. Set up a quick distutils script to install it into 
> the library path, and it's like it's in the standard library - and this 
> would work with existing versions of Python too.

Yes, this would work but we want to avoid dependencies on stuff
other than distributed in .../pypy/src as long as possible. 

The main point was that i want to have one single unmodified version 
of 'autopath.py' that can be used verbatim in multiple projects.   

I have meanwhile implemented such a version (based on looking for
__init__.py upwards) and it works reasonably well with some obvious
restrictions.  With the upcoming 'std' library (containing Armin's and
my new 'utest' packge) you will be able to do

    from std.magic import autopath 

with the kind-of-same desired effect.  However, with the strict 
dependency rule above we cannot use this as 'std' is not guaruanteed
to be in the path.

> This would add a dependency to PyPy, but as long as it is small and 
> doesn't update too often, this shouldn't be too onerous.

Let's at least try to keep the number of pre-installed dependencies at
zero as along as we can :-) 



More information about the Pypy-dev mailing list