Skip to content

Commit a100a73

Browse files
committed
modify setup.py
1 parent 01b2dfb commit a100a73

File tree

4 files changed

+35
-26
lines changed

4 files changed

+35
-26
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ dist/
33
pymycobot.egg-info/
44

55
log
6-
.vscode/.ropeproject/config.py
7-
.vscode/.ropeproject/objectdb
6+
.vscode/
7+
pymycobot/__pycache__/

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include *.txt
2+
include LICENSE
3+
include README.md

setup.py

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,45 @@
11
import sys
22

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):
48
print("This mycobot version requires Python2.7, 3.5 or later.")
59
sys.exit(1)
610

711
import setuptools
812

9-
version = "2.1.2"
1013

11-
if sys.version_info[:2] == (2, 7):
14+
if PYTHON_VERSION == (2, 7):
1215
long_description = ""
1316
else:
1417
long_description = open("pymycobot/README.md").read()
1518

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+
1643
change_log = '''
1744
# 2021.1.25
1845
@@ -54,24 +81,3 @@
5481
5582
'''
5683

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-
File renamed without changes.

0 commit comments

Comments
 (0)