[reportlab-users] Install fails under virtualenv
Tim Lesher
tlesher at gmail.com
Tue Jun 10 21:31:59 EDT 2008
On Tue, Jun 10, 2008 at 5:52 PM, Robin Becker <robin at reportlab.com> wrote:
> unfortunately I think a lot of the setup.py code has been contributed by
> more than one person. I think the DATA_FILES setup is attempting to ensure
> that non-python code/data gets placed at the right place. It's using
> distutils' view of where home should be, not what distutils will really use.
> I suppose that code is now bad for your usage. Does anyone know the semantic
> difference between date_files and package_data?
The short answer is "data_files has been around for a long time;
package_data was added in 2.4 to address just this issue. :-)"
The data_files directive takes a dict mapping destination directories
(relative to sys.prefix) to lists of files to put there. (
http://docs.python.org/dist/node13.html)
The package_data directive takes a dict mapping package names to lists of
files to put into wherever that package is being installed (essentially
doing what reportlabs' setup.py is trying to do by hand in package_home). (
http://docs.python.org/dist/node12.html)
I don't know the history of the reportlabs code, but I suspect that the code
in setup.py predates the existence of distutils' package_data feature. All
of the files in the data_files are being, in fact, copied into the
reportlabs package tree.
The only refinement I can see is that for the files being copied into
reportlabs/tools/xxxx, they could be added to mappings for the appropriate
subpackage rather than reportlabs itself, but in reality it amounts to the
same place.
--
Tim Lesher <tlesher at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20080610/9bafbd81/attachment.html>
More information about the reportlab-users
mailing list