|
2 | 2 | # (c) Copyright 2019 Sensirion AG, Switzerland |
3 | 3 |
|
4 | 4 | from __future__ import absolute_import, division, print_function |
5 | | -from setuptools import setup, find_packages |
6 | | -import os |
7 | | -import re |
| 5 | +from distutils.core import setup |
8 | 6 |
|
9 | | - |
10 | | -# Read version number from version.py |
11 | | -version_line = open("sensirion_i2c_driver/version.py", "rt").read() |
12 | | -result = re.search(r"^version = ['\"]([^'\"]*)['\"]", version_line, re.M) |
13 | | -if result: |
14 | | - version_string = result.group(1) |
15 | | -else: |
16 | | - raise RuntimeError("Unable to find version string") |
17 | | - |
18 | | - |
19 | | -# Use README.rst and CHANGELOG.rst as package description |
20 | | -root_path = os.path.dirname(__file__) |
21 | | -readme = open(os.path.join(root_path, 'README.rst')).read() |
22 | | -changelog = open(os.path.join(root_path, 'CHANGELOG.rst')).read() |
23 | | -long_description = readme.strip() + "\n\n" + changelog.strip() + "\n" |
24 | | - |
25 | | - |
26 | | -setup( |
27 | | - name='sensirion-i2c-driver', |
28 | | - version=version_string, |
29 | | - author='Sensirion', |
30 | | - |
31 | | - description='Base Driver for Communicating With I2C Devices', |
32 | | - license='BSD', |
33 | | - keywords='sensirion i2c driver', |
34 | | - url='https://github.com/sensirion/python-i2c-driver', |
35 | | - packages=find_packages(exclude=['tests', 'tests.*']), |
36 | | - long_description=long_description, |
37 | | - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4', |
38 | | - install_requires=[ |
39 | | - ], |
40 | | - extras_require={ |
41 | | - 'test': [ |
42 | | - 'flake8~=3.7.8', |
43 | | - 'mock~=3.0.0', |
44 | | - 'pytest~=6.2.5', |
45 | | - 'pytest-cov~=3.0.0', |
46 | | - ] |
47 | | - }, |
48 | | - classifiers=[ |
49 | | - 'Intended Audience :: Developers', |
50 | | - 'License :: OSI Approved :: BSD License', |
51 | | - 'Programming Language :: Python :: 2.7', |
52 | | - 'Programming Language :: Python :: 3.5', |
53 | | - 'Programming Language :: Python :: 3.6', |
54 | | - 'Programming Language :: Python :: 3.7', |
55 | | - 'Programming Language :: Python :: 3.8', |
56 | | - 'Programming Language :: Python :: 3.9', |
57 | | - 'Programming Language :: Python :: 3.10', |
58 | | - 'Topic :: System :: Hardware :: Hardware Drivers' |
59 | | - ] |
60 | | -) |
| 7 | +setup() |
0 commit comments