[py-dev] setuptools and PYTHONPATH
Hi Ralf, all, so when i have installed a py egg - i seem to have problems getting my PYTHONPATH env variable respected. i refer to this situation - executed ralf's "setup.py" install - PYTHONPATH=/some/path/to/py/lib/branchdir - python && "import py" && "py.__file__" points to the egg still Does setuptools really force global installation over private environment settings? (i wouldn't regard the need to do "python setup.py develop" or something like a convenient solution, btw) best, holger
On Thu, Aug 14, 2008 at 12:33 PM, holger krekel <holger@merlinux.eu> wrote:
Hi Ralf, all,
so when i have installed a py egg - i seem to have problems getting my PYTHONPATH env variable respected. i refer to this situation
- executed ralf's "setup.py" install - PYTHONPATH=/some/path/to/py/lib/branchdir - python && "import py" && "py.__file__" points to the egg still
Does setuptools really force global installation over private environment settings?
See http://www.eby-sarna.com/pipermail/peak/2006-June/002582.html for a discussion. You can deactivate the installed package with easy_install -m py. - Ralf
On Thu, Aug 14, 2008 at 1:11 PM, Ralf Schmitt <schmir@gmail.com> wrote:
Does setuptools really force global installation over private environment settings?
See http://www.eby-sarna.com/pipermail/peak/2006-June/002582.html for a discussion. You can deactivate the installed package with easy_install -m py.
From the same thread (http://www.eby-sarna.com/pipermail/peak/2006-June/002584.html): """ This isn't what you want. What you want to do is point PYTHONPATH to a staging directory of some sort, and put that directory on the "develop"
line. What you're doing here is trying to install the library *onto itself*. -d and PYTHONPATH need to be some *other* location, to which you're installing.
which overrides the site-packages version, but also requires root access. how would I do this without requiring root access ?
mkdir ~/py_lib export PYTHONPATH=~/py_lib cd ~/sa020 python setup.py develop -d ~/py_lib """ i.e. you need to put the egg on PYTHONPATH in order to override the system wide installation, *not* the directory which contains the source code. - Ralf
On Thu, Aug 14, 2008 at 13:46 +0200, Ralf Schmitt wrote:
On Thu, Aug 14, 2008 at 1:11 PM, Ralf Schmitt <schmir@gmail.com> wrote:
Does setuptools really force global installation over private environment settings?
See http://www.eby-sarna.com/pipermail/peak/2006-June/002582.html for a discussion. You can deactivate the installed package with easy_install -m py.
From the same thread (http://www.eby-sarna.com/pipermail/peak/2006-June/002584.html): """ This isn't what you want. What you want to do is point PYTHONPATH to a staging directory of some sort, and put that directory on the "develop" line. What you're doing here is trying to install the library *onto itself*. -d and PYTHONPATH need to be some *other* location, to which you're installing.
which overrides the site-packages version, but also requires root access. how would I do this without requiring root access ?
mkdir ~/py_lib export PYTHONPATH=~/py_lib cd ~/sa020 python setup.py develop -d ~/py_lib """
i.e. you need to put the egg on PYTHONPATH in order to override the system wide installation, *not* the directory which contains the source code.
thanks for the info and clarification. looks inconvenient and IMHO changes the basic PYTHONPATH expectation - as noted down in http://docs.python.org/tut/node8.html#SECTION008120000000000000000 actually i don't really see why setuptools has to violate this. holger
Hi Ralf, with your setup script installing the py.* scripts didn't work on windows where setuptools created "py.test.exe" but this is not looked up by the windows command line when you type "py.test". I experimented a bit and think i found a somewhat sensible solution for the windows issue. As to the way scripts are installed in general - i am just using the "scripts" keyword now, not the setuptools specific one and it seems to work well. See the new svn/py/release/0.9.x/setup.py. This setup script works also works with plain distutils. It's generated by svn/py/build/gensetup.py and it's thus easy to apply systematic changes. thanks for your setup.py, anyway - was useful to look at. holger On Thu, Aug 14, 2008 at 14:27 +0200, holger krekel wrote:
On Thu, Aug 14, 2008 at 13:46 +0200, Ralf Schmitt wrote:
On Thu, Aug 14, 2008 at 1:11 PM, Ralf Schmitt <schmir@gmail.com> wrote:
Does setuptools really force global installation over private environment settings?
See http://www.eby-sarna.com/pipermail/peak/2006-June/002582.html for a discussion. You can deactivate the installed package with easy_install -m py.
From the same thread (http://www.eby-sarna.com/pipermail/peak/2006-June/002584.html): """ This isn't what you want. What you want to do is point PYTHONPATH to a staging directory of some sort, and put that directory on the "develop" line. What you're doing here is trying to install the library *onto itself*. -d and PYTHONPATH need to be some *other* location, to which you're installing.
which overrides the site-packages version, but also requires root access. how would I do this without requiring root access ?
mkdir ~/py_lib export PYTHONPATH=~/py_lib cd ~/sa020 python setup.py develop -d ~/py_lib """
i.e. you need to put the egg on PYTHONPATH in order to override the system wide installation, *not* the directory which contains the source code.
thanks for the info and clarification.
looks inconvenient and IMHO changes the basic PYTHONPATH expectation - as noted down in http://docs.python.org/tut/node8.html#SECTION008120000000000000000
actually i don't really see why setuptools has to violate this.
holger
-- collaborative expert contracting: http://merlinux.eu PyPy Python/Compiler tool chain: http://codespeak.net/pypy pylib py.test/greenlets/svn APIs: http://pylib.org
On Mon, Aug 18, 2008 at 4:44 PM, holger krekel <holger@merlinux.eu> wrote:
Hi Ralf,
with your setup script installing the py.* scripts didn't work on windows where setuptools created "py.test.exe" but this is not looked up by the windows command line when you type "py.test". I experimented a bit and think i found a somewhat sensible solution for the windows issue.
strange. I'm pretty sure this *must* work. (Or is ther a problem with the two dots?) Regards, - Ralf
On Tue, Aug 19, 2008 at 09:35 +0200, Ralf Schmitt wrote:
On Mon, Aug 18, 2008 at 4:44 PM, holger krekel <holger@merlinux.eu> wrote:
Hi Ralf,
with your setup script installing the py.* scripts didn't work on windows where setuptools created "py.test.exe" but this is not looked up by the windows command line when you type "py.test". I experimented a bit and think i found a somewhat sensible solution for the windows issue.
strange. I'm pretty sure this *must* work. (Or is ther a problem with the two dots?)
right, i *guess* it's windows not checking because of the two dots. holger
participants (2)
-
holger krekel -
Ralf Schmitt