#16593 closed defect (invalid)
py25-setuptools 0.6c8 broken in a way I don't fully comprehend
Reported by: | macports@… | Owned by: | stechert@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.6.0 |
Keywords: | Cc: | macports@… | |
Port: | py25-setuptools |
Description
Sorry for being kind of verbose, I tried to trim the problem down in irc but nobody could help me... so here goes:
after installing py25-setuptools, easy_install does not work out of the box:
$ echo $PYTHONPATH /Users/ace/lib/python2.5/site-packages # this directory exists
$ easy_install-2.5 --install-dir /Users/ace/lib/python2.5/site-packages pyamf error: /opt/local/lib/python2.5/site-packages/site.py: No such file or directory
this can be fixed: cd /opt/local/lib/python2.5/site-packages; sudo ln -s ../site.py
but then, after re-running said easy_install command, I cannot import pyamf - I have to do a
$ cd /Users/ace/lib/python2.5/site-packages $ unzip PyAMF-0.3.1-py2.5.egg
easy_install creates a suspicious pth file in /Users/ace/lib/python2.5/site-packages:
$ cat easy-install.pth import sys; sys.plen = len(sys.path) ./PyAMF-0.3.1-py2.5.egg import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'egginsert',0); sys.path[p:p]=new; sys.egginsert = p+len(new)
... from what I gather by reading site.py, a pth file should contain only path names, not python code.
also, it seems to copy site.py to that directory and then trip on it - if I re-run easy_install, I get:
$ easy_install-2.5 --install-dir /Users/ace/lib/python2.5/site-packages pyamf error: /Users/ace/lib/python2.5/site-packages/site.py is not a setuptools-generated site.py; please remove it.
Change History (7)
comment:1 Changed 16 years ago by macports@…
comment:2 Changed 16 years ago by macports@…
I stand corrected: .pth files can contain python code. So that's not part of the problem.
comment:3 Changed 16 years ago by macports@…
I kind of fixed it. This is the wrong approach:
cd /opt/local/lib/python2.5/site-packages; sudo ln -s ../site.py
because that's a non-setuptools site.py. This is better:
cd /opt/local/lib/python2.5/site-packages; sudo ln -s /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-setuptools/work/setuptools-0.6c8/site.py
after doing that, setuptools seems to work fine! However it might still be the wrong approach.
comment:4 Changed 16 years ago by mf2k (Frank Schima)
Owner: | changed from macports-tickets@… to stechert@… |
---|---|
Port: | py25-setuptools added |
Assigning to maintainer.
comment:6 Changed 16 years ago by blb@…
Resolution: | → invalid |
---|---|
Status: | new → closed |
This was recently fixed (see ticket #14912); run sudo port selfupdate
to make sure you're up to date, then upgrade your py25-setuptools port with sudo port upgrade py25-setuptools
.
oops, markup got me. Let's try that again: