Skip to content

Commit 2898ddf

Browse files
committed
Modified mbed-os-tools setup.py
1 parent 4d6bcf1 commit 2898ddf

File tree

2 files changed

+39
-15
lines changed

2 files changed

+39
-15
lines changed

requirements.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
PySerial>=3.0,<4.0
2+
requests>=2.0,<3.0
3+
intelhex>=2.0,<3.0
4+
future
5+
PrettyTable>=0.7.2
6+
fasteners
7+
appdirs>=1.4,<2.0
8+
junit-xml>=1.0,<2.0
9+
lockfile
10+
six>=1.0,<2.0
11+
colorama>=0.3,<0.5

setup.py

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,23 @@
2121
OWNER_NAMES = "Jimmy Brisson, Brian Daniels"
2222
2323

24+
repository_dir = os.path.dirname(__file__)
25+
2426

25-
# Utility function to cat in a file (used for the README)
2627
def read(fname):
27-
with open(os.path.join(os.path.dirname(__file__), fname), 'r') as f:
28+
"""
29+
Utility function to cat in a file (used for the README)
30+
@param fname: the name of the file to read, relative to the directory containing this file
31+
@return: The string content of the opened file
32+
"""
33+
with open(os.path.join(repository_dir, fname), mode='r',
34+
encoding="utf8") as f:
2835
return f.read()
2936

3037

38+
with open(os.path.join(repository_dir, 'requirements.txt')) as fh:
39+
requirements = fh.readlines()
40+
3141
setup(
3242
name="mbed-os-tools",
3343
version=read("src/mbed_os_tools/VERSION.txt").strip(),
@@ -44,19 +54,22 @@ def read(fname):
4454
package_data={"": ["VERSION.txt"]},
4555
license="Apache-2.0",
4656
test_suite="test",
47-
install_requires=[
48-
"PySerial>=3.0,<4.0",
49-
"requests>=2.0,<3.0",
50-
"intelhex>=2.0,<3.0",
51-
"future",
52-
"PrettyTable>=0.7.2",
53-
"fasteners",
54-
"appdirs>=1.4,<2.0",
55-
"junit-xml>=1.0,<2.0",
56-
"lockfile",
57-
"six>=1.0,<2.0",
58-
"colorama>=0.3,<0.5",
59-
],
57+
classifiers=(
58+
'Development Status :: 5 - Production/Stable',
59+
'Intended Audience :: Developers',
60+
'License :: OSI Approved :: Apache Software License',
61+
'Programming Language :: Python :: 2',
62+
'Programming Language :: Python :: 2.7',
63+
'Programming Language :: Python :: 3',
64+
'Programming Language :: Python :: 3.5',
65+
'Programming Language :: Python :: 3.6',
66+
'Programming Language :: Python :: 3.7',
67+
'Programming Language :: Python',
68+
'Topic :: Software Development :: Build Tools',
69+
'Topic :: Software Development :: Embedded Systems',
70+
),
71+
python_requires='>=2.7.10, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4',
72+
install_requires=requirements,
6073
tests_require=read("test_requirements.txt").splitlines(),
6174
extras_require={
6275
"pyocd": ["pyocd==0.14.0"]

0 commit comments

Comments
 (0)