[Python-ideas] Add a site.cfg to keep a persistent list of paths

Tarek Ziadé ziade.tarek at gmail.com
Tue Oct 19 23:26:04 CEST 2010


There's one feature I want to add in distutils2: the develop command
setuptools provides. Basically it adds a "link" file into
site-packages, and does some magic at startup to load the path that is
contained in the link file. The use case is to be able to have a
project added in the python path without installing it.

I am not a huge fan of adding files in site-packages for this though,
and the magic it supposes. I thought of another mechanism: a
persistent list of paths site.py would load.

So the idea is to have two files:
- a site.cfg at the python level, with a persistent list of paths
- a .local/site.cfg at the user level for user-defined paths.

Then distutils2 would add/remove paths in these files in its develop command.

This file could contain paths and also possibly sitedirs.

Does this sound crazy ?

Tarek Ziadé | http://ziade.org

More information about the Python-ideas mailing list