<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi - I'm trying to use distutils to set up a
package that has lots of config files that are co-located with the package
itself. The problem I'm having is how to install these files in the same place
as my python package. The following ugly hack is what I came up with, but I
can't believe there isn't a better way. If it matters, the platforms I'm using
are windows and linux.</FONT></DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2>Craig</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>MANIFEST.in:</FONT></DIV>
<DIV><FONT face=Arial size=2>graft Rooms<BR>graft Devices</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>setup.py:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>from distutils.core import setup<BR>import
glob<BR>import os.path</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>from distutils.dist import Distribution<BR>i =
Distribution().get_command_obj('install')<BR>i.finalize_options()<BR>path =
i.install_purelib</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>setup(name="Photronica",<BR>
author="Craig D",<BR> author_email="<A
href="mailto:craig.durland@hp.com">craig.durland@hp.com</A>",<BR>
package_dir = {"Photronica": ""},<BR>
packages=["Photronica","Photronica.DAS"],<BR> data_files =
[<BR> (os.path.join(path,"Photronica","Devices"),
glob.glob("Devices/*")),<BR>
(os.path.join(path,"Photronica","Rooms"),
glob.glob("Rooms/*")),<BR> ]<BR>)</FONT></DIV></BODY></HTML>