distutils

Gerhard Häring gh at ghaering.de
Wed Aug 20 03:30:22 CEST 2003


Bryan wrote:
> what is the correct way to pass custom values to a distutil's setup script?  i'd like to pass on the command line the libraries_dir
> path.  should i just parse it out from sys.argv?

What works for me is passing values via environment variables.

Examples:

LOCALBASE: in the FreeBSD ports system, if set, use it, else default to 
/usr/local

PG_ROOT: the source to the PostgreSQL build tree I use in pyPgSQL (only 
for win32, default to ../postgresql)

Perhaps using environment variables is a simple way to solve your 
problems as well.

-- Gerhard





More information about the Python-list mailing list