[Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages
Barry Warsaw
barry at python.org
Mon Jan 7 22:01:42 CET 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Jan 7, 2008, at 11:37 AM, Phillip J. Eby wrote:
>> Python automatically adds ~/.python/site-packages to sys.path; this
>> is
>> added /before/ the system site-packages file. An open question is
>> whether it needs to go at the front of the list. It should
>> definitely
>> be searched before the system site-packages.
>
> What about including the Python version in the directory name? C
> Extensions may not work correctly across versions, and bytecode will
> get recompiled a lot if you're using multiple versions. Also, if
> this is a 2.6/3.0 change, it's likely that the *source* won't be
> compatible across versions either. :)
D'oh, yes of course. So make that:
~/.python/lib/pythonX.Y/site-packages
>> Python treats ~/.python/site-packages the same as the system site-
>> packages, w.r.t. .pth files, etc.
>>
>> Open question: should we add yet another environment variable to
>> control this? It's pretty typical for apps to expose such a thing so
>> that the base directory (e.g. ~/.python) can be moved.
>>
>> I think that's all that's needed. It would make playing with
>> easy_install/setuptools nicer to have this.
>
> Assuming that this is a true "site" directory (i.e., .pth files are
> recognized), then yes.
IMO, it should be a true site directory.
- -Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iQCVAwUBR4KTN3EjvBPtnXfVAQI6twP9HUQ23I0KCGZy4CC9sA6vvM5xYfmEgKQb
7H9AP84nSqaaX0iyONmRqlPahzHaEkjkoMW68EA3AIkXagf72sNbyBMO1p7I7ZQ6
5X6dR78o8w+NywO6sgdgxqQq3ikXNEEAy2EICLamT94Um1QxR7OV7SlihdpDs20w
MujSDYAr9CQ=
=el6S
-----END PGP SIGNATURE-----
More information about the Python-Dev
mailing list