root/trunk/setup.py

Revision 45, 1.3 kB (checked in by KirkMcDonald, 2 years ago)

Update for DMD 0.174 and Python 2.5. Now uses D's native tuples.

Line 
1 # Note:  This setup.py is for CeleriD itself, not for an extension written in
2 # D.
3
4 import distutils.core, os, sys
5
6 import build_manifest
7
8 PACKAGE_NAME = 'celerid'
9
10 isSourceDist = 'sdist' in [arg.lower() for arg in sys.argv]
11
12 f = file('MANIFEST', 'wb')
13 try:
14     build_manifest.buildManifest(f, isSourceDist)
15 finally:
16     f.close()
17
18 includedPaths, excludedPaths = build_manifest.listFiles(isSourceDist)
19
20 allFiles = [
21     build_manifest.convertPathToDistutilsStandard(path)
22     for path in includedPaths
23 ]
24
25 # Only Python code files *within the celerid package* should go into
26 # packageFiles (Python code files in examples shouldn't).  A module named
27 # 'X.py' should later appear in packageModules as 'celerid.X'.
28 packageCodeFiles = [f for f in allFiles if f.endswith('.py') and '/' not in f]
29 packageDataFiles = [f for f in allFiles if f not in packageCodeFiles]
30
31 packageModules = [
32     PACKAGE_NAME + '.' + os.path.splitext(f)[0]
33     for f in packageCodeFiles
34 ]
35
36 distutils.core.setup(
37     name=PACKAGE_NAME,
38     package_dir={PACKAGE_NAME: os.curdir},
39     packages=[PACKAGE_NAME],
40
41     version=file('version.txt').read().strip(),
42     url='http://pyd.dsource.org/',
43     maintainer='Kirk McDonald',
44     maintainer_email='kirklin.mcdonald@gmail.com',
45     py_modules=packageModules,
46     package_data={PACKAGE_NAME: packageDataFiles},
47 )
Note: See TracBrowser for help on using the browser.