-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
79 lines (71 loc) · 2.34 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
73
74
75
76
77
78
79
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
from setuptools import setup, find_packages
# Python versions this package is compatible with
python_requires = '>=3.6, <4'
# Packages that this package imports. List everything apart from standard lib packages.
install_requires = [
'sensirion-i2c-driver>=1.0.0,<2.0',
'sensirion-driver-adapters>=2.1.9,<3.0',
'sensirion-driver-support-types~=0.2.0',
'sensirion-shdlc-sensorbridge>=0.1.1,<0.3.0'
]
# Packages required for tests and docs
extras_require = {
'test': [
'flake8~=3.7.8',
'pytest~=6.2.5',
'pytest-cov~=3.0.0',
],
'docs': [
'click==8.0.4',
'jinja2==3.0.1',
'sphinx~=4.2.0',
'sphinx-rtd-theme~=0.5.2',
],
'examples': [
'sensirion-i2c-sht4x~=1.0.0'
]
}
# Read version number from version.py
version_line = open("sensirion_i2c_stc3x/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.md as package description
root_path = os.path.dirname(__file__)
long_description = open(os.path.join(root_path, 'README.md')).read()
setup(
name='sensirion_i2c_stc3x',
version=version_string,
author='Sensirion',
author_email='info@sensirion.com',
description='I2C driver for the Sensirion STC3X sensor family',
license='BSD',
keywords="""Sensirion STC3X
I2C
STC31-C
STC31""",
project_urls={
"Documentation": "https://sensirion.github.io/python-i2c-stc3x",
"Repository": "https://github.com/Sensirion/python-i2c-stc3x",
"Changelog": "https://github.com/Sensirion/python-i2c-stc3x/blob/master/CHANGELOG.md",
},
packages=find_packages(exclude=['tests', 'tests.*']),
long_description=long_description,
long_description_content_type='text/markdown',
python_requires=python_requires,
install_requires=install_requires,
extras_require=extras_require,
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.8',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)