[Distutils] Data files and --prefix question.
Phillip J. Eby
pje at telecommunity.com
Tue Dec 5 23:00:52 CET 2006
At 02:43 PM 12/4/2006 +0000, José Rui Faustino de Sousa wrote:
>Hi! I am writing a package installation using distutils it is very nice
>but I have it two snags: setup(... data_files=[("foo",["*.data"])],\
>...) setup.py install --prefix=<prefix> a) Shouldn't the *.data syntax
>work for data_files as it does for package_data?
Perhaps. But data_files was a distutils option, and package_data was
actually created in setuptools, which generally has options that are more
"do-what-I-mean"ish than options that are native to the distutils. :)
> b) Why does it install the data files on <prefix>/foo and not in
> <prefix>/share/foo like the documentation seems to imply? Everything else
> seems to work as advertised scripts go to <prefix>/bin packages to
> <prefix>/lib/python2.4/site-packages... Is it me or is it a bug?
I don't know. Personally I prefer to avoid data_files and use package_data
instead, since that allows the package to access data at runtime, the data
can be safely shipped in eggs, etc.
More information about the Distutils-SIG