[Distutils] allowing $py_version in ~/.pydistutils.cfg

Phillip J. Eby pje at telecommunity.com
Thu Jan 26 22:56:57 CET 2006


At 12:40 AM 1/26/2006 -0800, Andrew Straw wrote:
>Hi,
>
>Attempting to use variable subsitition in my ~/.pydistutils.cfg file
>(which I'd like to use across both Python 2.3 and Python 2.4), I find that
>
>[install]
>prefix=~/py$py_version_short-$PLAT
>
>works fine
>
>while the $variables in
>
>[easy_install]
>site_dirs=~/py$py_version_short-$PLAT/lib/python$py_version_short/site-packages
>
>don't get expanded.
>
>These $variables seem to be an undocumented distutils feature (at least
>they aren't in the online docs for distutils), but they're nevertheless
>handy. Would it be possible to include them in setuptools? They are
>implemented in distutils.util subst_vars().

Actually they're implemented by distutils.command.install.install, but it 
looks fairly straightforward to add.  I've put it on my to-do list.



More information about the Distutils-SIG mailing list