-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·47 lines (43 loc) · 1.46 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
#!/usr/bin/env python
from distutils.core import setup
import os.path
import tempfile
selfdir = os.path.dirname(os.path.realpath(__file__))
alppy = open(os.path.join(selfdir, 'alp.py'))
alpname = os.path.join(tempfile.gettempdir(), 'alp')
alp = open(alpname, 'w')
alp.write(alppy.read())
alppy.close()
alp.close()
readme = open(os.path.join(selfdir, 'README.txt')).read()
conf = dict(
name='Alp',
version='0.1.1',
author='Niels G. W. Serup',
author_email='ngws@metanohi.name',
package_dir={'': '.'},
py_modules = ['alp'],
scripts=[alpname],
url='http://metanohi.name/projects/alp/',
license='GPLv3+',
description='Alp time tools',
classifiers=['Development Status :: 4 - Beta',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities',
'Environment :: Console',
'License :: OSI Approved :: GNU General Public License (GPL)',
'License :: DFSG approved',
'Operating System :: OS Independent',
'Programming Language :: Python'
]
)
try:
# setup.py register wants unicode data..
conf['long_description'] = readme.decode('utf-8')
setup(**conf)
except Exception:
# ..but setup.py sdist upload wants byte data
conf['long_description'] = readme
setup(**conf)