-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_setup.py
90 lines (79 loc) · 2.67 KB
/
make_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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/python
# -*- coding: us-ascii -*-
# vim: syntax=python
#
# Copyright 2006-2012 Noriyuki Hosaka [email protected]
#
d = dict(
NAME='python-bglib-library',
AUTHOR="Noriyuki Hosaka",
AUTHOR_EMAIL= "[email protected]",
VERSION=open("VERSION").read().strip(),
HOMEPAGE="https://github.com/bgnori/bglib",
DESCRIPTION = "backgammon programming utilities for python",
LONG_DESCRIPTION=open("DESCRIPTION").read(),
install_requires=open("freeze.txt").readlines(),
)
setup_str = '''\
#!/usr/bin/python
# -*- coding: us-ascii -*-
# vim: syntax=python
#
# Copyright 2006-2012 Noriyuki Hosaka [email protected]
#
from setuptools import setup
import os.path
try:
# add classifiers and download_url syntax to distutils
from distutils.dist import DistributionMetadata
DistributionMetadata.classifiers = None
DistributionMetadata.download_url = None
except:
pass
setup(
name="{NAME}",
version="{VERSION}",
zip_safe=False,
description="""{DESCRIPTION}""",
long_description="""{LONG_DESCRIPTION}""",
author="{AUTHOR}",
author_email="{AUTHOR_EMAIL}",
package_dir = {{
'bglib':'bglib', #root
}},
packages = ['bglib',
'bglib.doc',
'bglib.encoding',
'bglib.image',
'bglib.image.resource',
'bglib.model',
'bglib.protocol'
],
package_data = {{
'bglib.image.resource':[os.path.join('matrix','default.css'),
os.path.join('matrix','*.png'),
os.path.join('minimal','*.ttf'),
os.path.join('minimal','default.css'),
os.path.join('kotobuki','*.ttf'),
os.path.join('kotobuki','default.css'),
os.path.join('nature','*.ttf'),
os.path.join('nature','default.css'),
os.path.join('flower','*.ttf'),
os.path.join('flower','default.css'),
os.path.join('neon','*.ttf'),
os.path.join('neon','default.css'),
os.path.join('deutsche','*.ttf'),
os.path.join('deutsche','default.css'),
os.path.join('safari','default.css'),
os.path.join('safari','*.jpg'),
os.path.join('safari','*.png'),
],
}},
py_modules=[],
install_requires= {install_requires},
provides=['bglib'],
url="{HOMEPAGE}",
license="proprietary",
)
'''
print setup_str.format(**d)