-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
68 lines (61 loc) · 2.27 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
# -*- coding: utf-8 -*-
# (c) Copyright 2019 Sensirion AG, Switzerland
from __future__ import absolute_import, division, print_function
from setuptools import setup, find_packages
import os
import re
# Read version number from version.py
version_line = open("sensirion_shdlc_driver/version.py", "rt").read()
result = re.search(r"^version = ['\"]([^'\"]*)['\"]", version_line, re.M)
if result:
version_string = result.group(1)
else:
raise RuntimeError("Unable to find version string")
# Use README.rst and CHANGELOG.rst as package description
root_path = os.path.dirname(__file__)
readme = open(os.path.join(root_path, 'README.rst')).read()
changelog = open(os.path.join(root_path, 'CHANGELOG.rst')).read()
long_description = readme.strip() + "\n\n" + changelog.strip() + "\n"
setup(
name='sensirion-shdlc-driver',
version=version_string,
author='Sensirion',
author_email='[email protected]',
description='Base Driver for Communicating With Sensirion SHDLC Devices',
license='BSD',
keywords='shdlc sensirion sensor driver',
url='https://github.com/sensirion/python-shdlc-driver',
packages=find_packages(exclude=['tests', 'tests.*']),
long_description=long_description,
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4',
install_requires=[
'pyserial~=3.0',
],
extras_require={
# Dependencies for the firmware update (optional since not all devices
# support firmware updates)
'fwupdate': [
'intelhex~=2.0',
],
# Dependencies for tests
'test': [
'flake8~=3.7.8',
'intelhex~=2.0', # from the "fwupdate" extra
'mock~=3.0.0',
'pytest~=6.2.5',
'pytest-cov~=3.0.0',
]
},
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7',
'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 :: 3.10',
'Topic :: System :: Hardware :: Hardware Drivers'
]
)