[FRPythoneers] Distutils question

Jim Vickroy Jim.Vickroy at noaa.gov
Mon Aug 26 08:38:46 MDT 2002

Hello Matt,

I do not have experience with distutils in the Linux/Unix world, but on 
MS Windows here is a way to do it:

# begin --------------------------------

from distutils.core import setup
import os.path

# the distribution also includes documentation and configuration files:

target_directory = os.path.join('Lib', 'site-
packages', 'sec', 'sxi', 'config')
config_file = (target_directory, [os.path.join
('sec', 'sxi', 'config', 'product.xml')])
target_directory = os.path.join('Lib', 'site-
packages', 'sec', 'sxi', 'doc')
doc_file = (target_directory, [os.path.join
('sec', 'sxi', 'doc', 'users_guide.html')])

   packages         = ['generic', 'sec.sxi'],
   data_files       = [config_file, doc_file])

# end --------------------------------

----- Original Message -----
From: Matt Gushee <mgushee at havenrock.com>
Date: Sunday, August 25, 2002 8:36 pm
Subject: [FRPythoneers] Distutils question

> Hi, Folks--
> I'm finally getting around to learning how to use DistUtils, but 
> there'sone or two things I'm finding puzzling. First of all: is 
> there a simple
> way to tell DistUtils to install non-Python files as a part of the
> package tree? 
> Let's say I have a package called 'Botty' which is going to get
> installed as $PREFIX/$PYTHON/site-packages/Botty. The package 
> includes a
> set of icons in an 'icons' subdirectory, which I want installed as
> $PREFIX/$PYTHON/site-packages/Botty/icons. Calling it a sub-
> package of
> Botty doesn't seem to work, because the icons aren't Python files. 
> I know I can specify a 'data' argument in my setup script, but without
> some pretty sophisticated path-hacking, the icons are liable to 
> wind up
> in /var/lib or some other odd corner of the filesystem.
> Any suggestions?
> -- 
> Matt Gushee
> Englewood, Colorado, USA
> mgushee at havenrock.com
> http://www.havenrock.com/
> _______________________________________________
> This message sent by the FRPythoneers mailing list.
> Unsubscribe: echo unsubscribe | FRPythoneers-
> request at lists.community.tummy.comURL: 
> http://lists.community.tummy.com/mailman/listinfo/frpythoneers

More information about the FRPythoneers mailing list