[Python-Dev] Python and the Linux Standard Base (LSB)
Barry Warsaw
barry at python.org
Thu Nov 30 00:49:52 CET 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Nov 29, 2006, at 5:18 AM, glyph at divmod.com wrote:
> Yes, let's do that, please. I've long been annoyed that site.py
> sets up a local user installation directory, a very useful feature,
> but _only_ on OS X. I've long since promoted my personal hack to
> add a local user installation directory into a public project --
> divmod's "Combinator" -- but it would definitely be preferable for
> Python to do something sane by default (and have setuptools et. al.
> support it).
>
> I'd suggest using "~/.local/lib/pythonX.X/site-packages" for the
> "official" UNIX installation location, since it's what we're
> already using, and ~/.local seems like a convention being slowly
> adopted by GNOME and the like. I don't know the cultural
> equivalent in Windows - "%USERPROFILE%\Application Data\PythonXX"
> maybe?
>
> It would be nice if site.py would do this in the same place as it
> sets up the "darwin"-specific path, and to set that path as a
> module global, so packaging tools could use "site.userinstdir" or
> something. Right now, if it's present, it's just some random entry
> on sys.path.
+1 from me also for the concept. I'm not sure I like ~/.local though
- -- it seems counter to the app-specific dot-file approach old
schoolers like me are used to. OTOH, if that's a convention being
promoted by GNOME and other frameworks, then I don't have too much
objection.
I also think that setuptools has the potential to be a big
improvement here because it's much easier to install and use egg
files than it is to get distutils to DTRT with setup.py. (I still
detest the command name 'easy_install' but hey that's still fixable
right? :). What might be nice would be to build a little more
infrastructure into Python to support eggs, by say adding a default
PEP 302 style importer that knows how to search for eggs in
'nests' (a directory containing a bunch of eggs).
What if then that importer were general enough, or had a subclass
that implemented a policy for applications where <prefix>/lib/
pythonX.X/app-packages/<application> became a nest directory. All my
app would have to do would be to drop an instance of one of those in
the right place on sys.path and Python would pick up all the eggs in
my app-package directory. Further, easy_install could then grow an --
install-app switch or somesuch that would install the egg in the app-
package directory.
I haven't really thought this through so maybe it's a stupid idea,
but ISTM that would make management, installation, and use in an
application about as simple as possible. (Oh yeah, add an --
uninstall switch too :).
- -Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRW4cpnEjvBPtnXfVAQK/7wP/fS/MnVm6Msq6kB3qJce5BOK4NFo0ewGG
uephuUfux+AWKMhl6KIIe7xeT6yO4yS/U/DF0sZ35JoOK8ebyH0JO/pup+lCfA3r
ODQL45s+G1yycZDjUh3/a9+RakdhpfBRvjU3V/IFH7ayiM9PIHxKjTIzjXo3m1Pq
1hxb5BHS/8I=
=kPE7
-----END PGP SIGNATURE-----
More information about the Python-Dev
mailing list