Accessing prefix within setup.py (distutils)

Kirby Angell kangell at alertra.com
Mon Oct 4 19:37:29 EDT 2004


data_files = [ \

	('/etc/init.d', [ 'scripts/myscript' ] ),
	('/usr/local/bin', [ 'code/prog1.py' ] ),
	('/usr/local/bin', [ 'code/prog2.py' ] ),
	('/usr/local/etc', [ 'etc/prog.conf' ] )

  ]

works for me to put stuff all over the place.  I will confess to not 
having to worry about the --prefix parameter because our software is 
only used in-house.

> My question is how to avoid installing myprogram.conf into /usr/etc
> (instead of /etc) if the installer specifies a prefix of /usr? Doesn't
> distutils know the difference between a data file and a config file?
> 

-- 
Thank you,

Kirby Angell
Get notified anytime your website goes down!
http://www.alertra.com
key: 9004F4C0
fingerprint: DD7E E88D 7F50 2A1E 229D  836A DB5B A751 9004 F4C0



More information about the Python-list mailing list