-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
72 lines (65 loc) · 2.2 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
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
#!/usr/bin/env python
from setuptools import setup
import sys
# build dependency list
reqs = ['appdirs', 'beautifulsoup4', 'html5lib', 'colorama',
'requests', 'pytz', 'python-dateutil', 'babel']
extras = {'tests': ['pymysql', 'coverage',
'pytest', 'pytest-cov', 'tox'],
'docs': ['sphinx', ]}
if sys.version_info < (3, 3):
extras['tests'].append('mock')
if sys.version_info >= (3,):
pass
elif sys.version_info >= (2, 7):
pass
elif sys.version_info >= (2, 6):
reqs.extend(['argparse', 'ordereddict', 'importlib'])
extras['tests'].append('unittest2')
extras['tests'].append('subprocess32')
else:
sys.stderr.write("Clans requires Python 2.6+ or 3.3+\n")
sys.exit(1)
# http://stackoverflow.com/a/7071358/735926
import re
VERSIONFILE='clans/__init__.py'
verstrline = open(VERSIONFILE, 'rt').read()
VSRE = r'^__version__\s+=\s+[\'"]([^\'"]+)[\'"]'
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % VERSIONFILE)
with open('README.rst') as f:
readme = f.read()
with open('HISTORY.rst') as f:
history = f.read()
setup(name='clans',
version=verstr,
description='A command-line client for the '
'GrinnellPlans social network.',
long_description=readme + '\n\n' + history,
url='https://github.com/baldwint/clans',
author='Tom Baldwin',
author_email='[email protected]',
license='MIT',
classifiers=(
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: End Users/Desktop',
'Topic :: Internet :: Finger',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
),
install_requires=reqs,
extras_require=extras,
packages=['clans', 'clans.ext'],
entry_points = {
'console_scripts': ['clans=clans.ui:main'],
},
)