[Python-Dev] Fixing #7175: a standard location for Python config files
Tarek Ziadé
ziade.tarek at gmail.com
Thu Aug 12 09:26:31 CEST 2010
On Thu, Aug 12, 2010 at 7:00 AM, Russell E. Owen <rowen at uw.edu> wrote:
...
>
> If the files are shared among all users then /usr/local/<something>
> seems more reasonable.
>
> I also think whatever you choose for linux is also the best choice for
> Mac OS X (my preferred platform). While there are other possible
> directories, such as ~/Library/Application Support/<something>, all
> tools derived from unix that I know about use the unix convention (ssh,
> X11, bash...) and I would argue that Python is close enough to count
> even though it is a framework build. Put another way, copying the unix
> convention is simple, is exactly what power users would expect and I
> don't see it would do any harm.
Choosing an arbitrary location we think is good on every system is fine
and non risky I think, as long as Python let the various distribution
change those paths though configuration.
In fact, that's one of the future goal of the sysconfig module I had in mind.
Instead of having it reading paths from python variables, I would like
to introduce
a configuration file global to Python containing all the installation paths, and
the paths we are currently discussing.
That file could then be changed by distributions depending on their layouts.
It will avoid distributions to hack Python to change those paths.
For instance, Ubuntu currently patches distutils to change the
installation paths.
So let's:
- define all the default locations for each system
- define a sysconfig.cfg file that contains all installation paths,
for each target system
- change sysconfig.py so it uses it, instead of the global dicts it
currently has
Regards
Tarek
--
Tarek Ziadé | http://ziade.org
More information about the Python-Dev
mailing list