[py-dev] setuptools / undoing 0.9.1 PATH hacks (Re: 0.9.2 alpha eggs - please test)

holger krekel holger at merlinux.eu
Tue Aug 19 14:36:38 CEST 2008


Hi Harald, Ralf, 

so i created an egg with a function that tries to undo 
the path changes done with 0.9.1.  I checked that the
code works but i think that setuptools does not execute
my code at runtime, only at bdist_egg time.  I guess 
i need to investigate how i can have some code executed
at install time.  Anybody has hints? 

best, 

holger

On Tue, Aug 19, 2008 at 10:57 +0200, holger krekel wrote:
> Hi Harald, 
> 
> On Tue, Aug 19, 2008 at 09:25 +0200, Harald Armin Massa wrote:
> > other test results:
> > 
> > ----> py-0.9.2_alpha_7-py2..>
> > 
> > installs flawless.
> > 
> > But: there are a lot of useless things copied to python25\scripts:
> > 
> > py.cleanup.cmd
> > py.countloc.cmd
> > py.lookup.cmd
> > py.rest.cmd
> > py.test.cmd
> > 
> > do not have ANY use on windows, as  windows tries to open "py.cleanup"
> > when typin py.cleanup; which of course fails.
> 
> hum, i think this relates to earlier installs and/or your 
> PATH settings.  the above egg does not install "py.*". 
> What it does is this (see "def run" at the end of 
> http://codespeak.net/svn/py/release/0.9.x/setup.py): 
> rename 
>     py.test, py.rest, etc. to 
>     py_test, py_rest, etc. 
> 
> in the Python25/Scripts dir and create py.test.cmd, py.rest.cmd, ...
> helpers which calls the underscore scripts. 
> 
> But indeed, if one installs 0.9.1 and then 0.9.2-alpha one cannot 
> use "py.test" out of the box.  This relates to the old PATH hacks. 
> The new egg does not need to add to PATH which i think is good.  
> So i guess I am going to work to try to fix things by
> going through the PATH and pruning out "py/bin/" PATHS
> if they look like py lib ones.  Actually i think it
> makes sense to try to undo this PATH addition while
> upgrading, anyway.  
>  
> > Recommendation: rename those to pycleanup.cmd, pycountloc.cmd etc.
> 
> i'd like to have uniforming naming if possible. 
> 
> on two sidenotes, i wonder why setuptools does not automatically 
> delete the old py lib version and if there is a setuptool-supported
> way of uninstalling packages. 
> 
> many thanks for noting this, 
> holger
> _______________________________________________
> py-dev mailing list
> py-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/py-dev
> 

-- 
collaborative expert contracting: http://merlinux.eu 
PyPy  Python/Compiler tool chain: http://codespeak.net/pypy 
pylib py.test/greenlets/svn APIs: http://pylib.org 



More information about the Pytest-dev mailing list