-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
57 lines (48 loc) · 1.6 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
import codecs
import setuptools
import sys
from hypermedia import __version__
def read_requirements_file(name):
reqs = []
try:
with open(name) as req_file:
for line in req_file:
if '#' in line:
line = line[0:line.index('#')]
line = line.strip()
if line:
reqs.append(line)
except IOError:
pass
return reqs
install_requirements = read_requirements_file('requirements.txt')
test_requirements = read_requirements_file('test-requirements.txt')
if sys.version_info < (2, 7):
test_requirements.append('unittest2')
if sys.version_info < (3, ):
test_requirements.append('mock>1.0,<2')
with codecs.open('README.rst', 'rb', encoding='utf-8') as file_obj:
long_description = '\n' + file_obj.read()
setuptools.setup(
name='hypermedia',
version=__version__,
author='Dave Shawley',
author_email='[email protected]',
url='http://github.com/dave-shawley/hypermedia',
description='Links representations together.',
long_description=long_description,
packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
zip_safe=True,
platforms='any',
install_requires=install_requirements,
test_suite='nose.collector',
tests_require=test_requirements,
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Setuptools Plugin',
'Development Status :: 1 - Planning',
],
)