[reportlab-users] [PATCH] Fix setup.py

Thomas Petazzoni thomas.petazzoni at enix.org
Tue Sep 18 07:40:52 EDT 2007


Le Tue, 18 Sep 2007 12:10:59 +0100,
Robin Becker <robin at reportlab.com> a écrit :

> Thanks for the patch, but yes you're right it probably ought to go in

> the lib area; are you saying it's hard to get it there?

Yes, it seems so, but I'm not a distutils expert at all.

The package_data directive is described at [1]. It needs to be a
dictionary associating a package name with a list of files. The files
must be available from the current directory, and will be installed in
the same path in the package directory once installed.

package_data = { 'mypkg' : [ 'foo/bar.txt', 'bar/foo.txt' ] }

will install 'foo/bar.txt' and 'bar/foo.txt' as available from the
current directory of the sources (relatively to where setup.py is
located) to $prefix/python-2.5/site-packages/mypkg/foo/bar.txt and

So package_data doesn't work for the case of hyphen.mashed because it
is located in ../rl_addons/rl_accel/ in the source tree, but should be
located in the lib subdirectory once installed.

The data_files directive is described at [2]. It allows to install a
file to an arbitrary path. Except that we don't know what's the path of
the package directory (i.e $prefix/python-2.5/site-packages/$pkgname).

The solution is probably to install hyphen.mashed into another
directory, maybe /usr/share/reportlab/. I can tree to propose a patch
to implement this, but I don't know how to test if the hyphenation
mechanism still works correctly after my changes. Can you help on that
point ?



[1] http://docs.python.org/dist/node12.html
[2] http://docs.python.org/dist/node13.html
Thomas Petazzoni - thomas.petazzoni at enix.org
http://{thomas,sos,kos}.enix.org - http://www.toulibre.org

More information about the reportlab-users mailing list