root/branches/dj/setup.py

Revision 3162, 1.4 kB (checked in by paul, 1 year ago)

Fix setup.py to include the icon theme directories in the python egg.

  • Property svn:eol-style set to native
Line 
1 import os
2 import glob
3 import ez_setup # From http://peak.telecommunity.com/DevCenter/setuptools
4 ez_setup.use_setuptools()
5
6 from setuptools import setup, find_packages
7 from dabo.__version__ import version
8
9 daboVersion = version["version"]
10
11 # List the paths under dabo/icon/themes:
12 iconDir = "dabo/icons/themes"
13 iconDirs = {}
14 def getIconSubDir(arg, dirname, fnames):
15     if ".svn" not in dirname and "cards" not in dirname.lower() and dirname[-1] != "\\":
16         icons = glob.glob(os.path.join(dirname, "*.png"))
17         if icons:
18             subdir = os.path.join(iconDir, dirname[len(arg)+1:])
19             subdir = subdir.replace(os.sep, ".")
20             iconDirs[subdir] = ["*.png"]
21 os.path.walk(iconDir, getIconSubDir, iconDir)
22
23 package_data = {
24         '':['ANNOUNCE', 'AUTHORS', 'ChangeLog', 'INSTALL',
25         'LICENSE.TXT', 'README', 'TODO'],
26         'dabo.icons': ['*.png', '*.ico'],
27         'dabo.icons.cards.small': ['*.png', '*.ico'],
28         'dabo.icons.cards.large': ['*.png', '*.ico'],
29         'dabo.lib.reporting':['*.rfxml'],
30         'dabo.lib.reporting_stefano':['*.rfxml'],
31         'dabo.ui.uiwx.macImageProblem':['*.png'],
32         'dabo.ui.uiwx.masked':['README'],
33         }
34
35 package_data.update(iconDirs)
36
37
38 setup(
39         name = "Dabo",
40         version = daboVersion,
41         url = 'http://dabodev.com/',
42         author = 'Ed Leafe and Paul McNett',
43         author_email = 'dev@dabodev.com',
44         description = 'Dabo 3-tier Application Framework',
45         license = 'MIT',
46         packages = find_packages(),
47         package_data = package_data,
48 )
Note: See TracBrowser for help on using the browser.