Message122935
| Author |
glyph |
| Recipients |
benjamin.peterson, christian.heimes, flox, glyph, jafo, mark.dickinson, r.david.murray, ronaldoussoren, tarek, vstinner |
| Date |
2010年11月30日.21:09:15 |
| SpamBayes Score |
1.9518048e-10 |
| Marked as misclassified |
No |
| Message-id |
<1291151359.13.0.507161852604.issue8084@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Would it be possible to have this reverted for 2.7.2 / 3.2.1, and restore ~/.local _and_ ~/Library as equally valid locations for python code?
As I tried to explain on the mailing list, this change basically introduces a regression, and nothing else. Sorry I did not comment on the ticket at the time.
Previously it was possible to maintain a single "~/.pydistutils.cfg" for UNIX-like OSes, which would allow 'python setup.py install', 'pip install' and 'easy_install' to function without adding a 'sudo' in front of them, or any command-line options. This is important since easy_install doesn't expose a '--user'. Now, there needs to be a specific, separate config file for OS X installs.
Also, it was previously possible to pass a sane value for '--prefix', but now there is no such value. This makes it much more difficult to, for example:
cd my-c-dependency
./configure --prefix ~/.local
cd my-python-project
python setup.py install --prefix ~/.local
since Python code with C dependencies will sometimes attempt to discover the location of include files and the like via the install prefix.
'setup.py install --user' (the only remaining installation mechanism which actually works out of the box on a mac) will now place scripts into ~/Library/Python/x.y/bin, which seems a singularly unhelpful location. Again, if there are C and Python programs which interact, I now need 2 locations on my $PATH instead of one.
I don't understand what this change buys anyone. If you're treating the Mac python as a UNIX-like environment, it just spuriously breaks things. But if you're treating it as a Mac-like environment (i.e. not using a terminal), the right place to put your Python code is _inside a (framework or application) bundle_, not lying around your home directory.
Also, if there is interest in properly honoring Mac filesystem conventions, there are APIs for doing that, as documented here: <http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFileSystem/Articles/Domains.html>. Manually enumerating the user domain while ignoring, for example, the network domain, seems half-hearted and arbitrary. |
|