-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
62 lines (49 loc) · 1.82 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
import os
import sys
from setuptools import find_packages, setup
from setuptools import __version__ as setuptools_ver
import iottalkpy
BASE_DIR = os.path.dirname(__file__)
REQUIRE_DIR = os.path.join(BASE_DIR, 'requirements')
def readlines(fname):
with open(os.path.join(REQUIRE_DIR, fname)) as f:
return tuple(map(str.strip, f.readlines()))
def get_requires():
if (sys.version_info.major, sys.version_info.minor) == (3, 4):
fname = 'python34.txt'
else:
fname = 'python3.txt'
# in case of setuptools is old and not support `install_requires` with version
# e.g. The setuptools of Arduino Yun Rev1 is v0.6.
major = int(setuptools_ver.partition('.')[0])
if major < 20:
fname = 'compat.txt'
return readlines(fname)
def get_test_requires():
return readlines('test.txt')
setup(
name='iottalk-py',
version=iottalkpy.version,
author='the IoTtalk team',
author_email='[email protected]',
maintainer='Iblis Lin',
maintainer_email=('[email protected]'),
url='https://github.com/IoTtalk/iottalk-py',
packages=find_packages(exclude=['tests']),
install_requires=get_requires(),
tests_require=get_test_requires(),
long_description=open(os.path.join(BASE_DIR, 'README.rst')).read(),
long_description_content_type='text/x-rst',
platforms=['Linux', 'FreeBSD'],
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
],
)