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