Hi David, I am learning a lot from this list....
On Mon, 02 Feb 2009 12:31:18 +0900, David Cournapeau <da...@ar.media.kyoto-u.ac.jp> >> > prefix = sys.prefix >> > libdir = sys.prefix/lib/pythonX.Y/site-packages/pkgname >> > datadir = sys.prefix/share/mypackage >> > docdir = sys.prefix/share/doc/mypackage .. > I never said it was self-evident. And about the part of determining what > the right place is: the whole point is that you, as a developer, won't > have to care :) As a python developer... I think you do.... :-) First thing you want to go looking for is the documentation. omg - that can be impossible to find for most packages. Lucky I was trained in the school of 'if you don't understand the program - go debug the code'.... Sorry to say this, but I didn't know packages even included documentation. It is d&*med difficult to find in linux. > I think this does not have to be as complicated. We already need to tag > some files in the setup.py file, so we could do: > > from distutils.core import setup, Extension > > setup(name='example', > version='1.0', > description='Example', > author='You', > author_email='m...@python.net', > packages=['example', 'example.foo'], > ext_modules=[Extension('example.foo._bar', > ['example/foo/bar.c'])], > pdfdoc=['doc/doc.pdf'], > htmldoc=['doc/html'], > pacakge_data=['example/data/data1.dat', 'example/data/data2.dat'] > ) > > Note that except pdfdoc and htmldoc, all this is already there in > distutils. Then, you could do > > python setup.py install --prefix=tmp > > ending up in (on Linux): > > tmp/lib/python-$PYVER/site-packages/example/__init__.py > ... > tmp/lib/python-$PYVER/site-packages/example/foo/bar/_bar.so > tmp/lib/python-$PYVER/site-packages/example/data/data1.dat > ... > tmp/lib/python-$PYVER/site-packages/example/doc/doc.pdf Very interesting... Regards David _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig