|
1 | 1 | import sys |
2 | 2 |
|
3 | | -if (2, 7) != sys.version_info[:2] < (3, 5): |
| 3 | + |
| 4 | +PYTHON_VERSION = sys.version_info[:2] |
| 5 | +VERSION = "2.1.2" |
| 6 | + |
| 7 | +if (2, 7) != PYTHON_VERSION < (3, 5): |
4 | 8 | print("This mycobot version requires Python2.7, 3.5 or later.") |
5 | 9 | sys.exit(1) |
6 | 10 |
|
7 | 11 | import setuptools |
8 | 12 |
|
9 | | -version = "2.1.2" |
10 | 13 |
|
11 | | -if sys.version_info[:2] == (2, 7): |
| 14 | +if PYTHON_VERSION == (2, 7): |
12 | 15 | long_description = "" |
13 | 16 | else: |
14 | 17 | long_description = open("pymycobot/README.md").read() |
15 | 18 |
|
| 19 | +setuptools.setup( |
| 20 | + name="pymycobot", |
| 21 | + version=VERSION, |
| 22 | + author="Zachary Zhang", |
| 23 | + author_email="lijun.zhang@elephantrobotics.com", |
| 24 | + description="Python API for serial communication of MyCobot.", |
| 25 | + long_description=long_description, |
| 26 | + long_description_content_type="text/markdown", |
| 27 | + url="https://github.com/elephantrobotics/pymycobot", |
| 28 | + packages=setuptools.find_packages(), |
| 29 | + classifiers=[ |
| 30 | + 'Programming Language :: Python :: 2.7', |
| 31 | + "Programming Language :: Python :: 3.5", |
| 32 | + "Programming Language :: Python :: 3.6", |
| 33 | + "Programming Language :: Python :: 3.7", |
| 34 | + "Programming Language :: Python :: 3.8", |
| 35 | + "Programming Language :: Python :: 3.9", |
| 36 | + "License :: OSI Approved :: MIT License", |
| 37 | + "Operating System :: OS Independent", |
| 38 | + ], |
| 39 | + install_requires=['pyserial'], |
| 40 | + python_requires= '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*', |
| 41 | +) |
| 42 | + |
16 | 43 | change_log = ''' |
17 | 44 | # 2021.1.25 |
18 | 45 |
|
|
54 | 81 |
|
55 | 82 | ''' |
56 | 83 |
|
57 | | -setuptools.setup( |
58 | | - name="pymycobot", |
59 | | - version=version, |
60 | | - author="Zachary Zhang", |
61 | | - author_email="lijun.zhang@elephantrobotics.com", |
62 | | - description="Python API for serial communication of MyCobot.", |
63 | | - long_description=long_description, |
64 | | - long_description_content_type="text/markdown", |
65 | | - url="https://github.com/elephantrobotics/pymycobot", |
66 | | - packages=setuptools.find_packages(), |
67 | | - classifiers=[ |
68 | | - 'Programming Language :: Python :: 2.7', |
69 | | - "Programming Language :: Python :: 3", |
70 | | - "License :: OSI Approved :: MIT License", |
71 | | - "Operating System :: OS Independent", |
72 | | - ], |
73 | | - install_requires=['pyserial'], |
74 | | - python_requires= '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*', |
75 | | -) |
76 | | - |
77 | | - |
|
0 commit comments