[Tutor] distutils site.cfg variable expansion
Bill Campbell
bill at celestial.net
Thu Apr 28 22:24:16 CEST 2011
I'm learning my way around package building using setuptools, and
would like to have scripts for a system administration package
installed under $(prefix)/sbin instead of under the default
$(prefix)/bin directory without requiring the installer to use
the manual 'python setup.py install --install-scripts=...'.
I would like to have something in the setup.cfg file like this
which would be handled by the normal ConfigParser expansion.
Either I have the syntax wrong, or the setuptools/distutils
configuration parsing is different.
[global]
prefix=/path/to/prefix
[install]
install-scripts=%(prefix)s/sbin
Better yet would be for the prefix to be available from the
command line or taken from sys.prefix if not specified.
Is there a way to do this other than fiddling the site.cfg file?
Bill
--
INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice: (206) 236-1676 Mercer Island, WA 98040-0820
Fax: (206) 232-9186 Skype: jwccsllc (206) 855-5792
In a nation ruled by swine, all pigs are upwardly mobile.
-- Hunter S. Thompson
More information about the Tutor
mailing list