Skip to content

Commit 53f6f02

Browse files
authored
Merge pull request #209 from ARMmbed/setup_classifier
Setup classifiers for: - mbed-os-tools - mbed-ls - mbed-greentea - mbest-host-test
2 parents 883bdb2 + a5ee75c commit 53f6f02

File tree

15 files changed

+175
-54
lines changed

15 files changed

+175
-54
lines changed

MANIFEST.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
global-exclude *.py[cod] __pycache__ *.so
2+
graft test
13
include README.md
4+
include LICENSE
5+
include CONTRIBUTING.md
6+
include requirements.txt
27
include test_requirements.txt

packages/mbed-greentea/MANIFEST.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
include README.md LICENSE CONTRIBUTING.md
1+
global-exclude *.py[cod] __pycache__ *.so
2+
graft test
3+
include README.md
4+
include LICENSE
5+
include CONTRIBUTING.md
6+
include requirements.txt
7+
include test_requirements.txt
28
include .coveragerc
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mbed-os-tools>=0.0.9,<0.1.0
2+
mbed-host-tests>=1.5.0,<2

packages/mbed-greentea/setup.py

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,31 @@
2727
from distutils.core import setup
2828
from setuptools import find_packages
2929

30-
3130
DESCRIPTION = "mbed 3.0 onwards test suite, codename Greentea. The test suite is a collection of tools that enable automated testing on mbed-enabled platforms"
3231
OWNER_NAMES = 'Anna Bridge, Qinghao Shi'
3332
OWNER_EMAILS = 'Anna.Bridge@arm.com, qinghao.shi@arm.com'
3433

34+
repository_dir = os.path.dirname(__file__)
35+
3536

3637
def read(fname):
3738
"""
3839
Utility function to cat in a file (used for the README)
39-
@param fname: the name of the file to read, relative to the directory containing this file
40+
@param fname: the name of the file to read,
41+
relative to the directory containing this file
4042
@return: The string content of the opened file
4143
"""
42-
return open(os.path.join(os.path.dirname(__file__), fname), encoding="utf-8").read()
44+
with open(os.path.join(repository_dir, fname), mode='r') as f:
45+
return f.read()
46+
47+
48+
with open(os.path.join(repository_dir, 'requirements.txt')) as fh:
49+
requirements = fh.readlines()
4350

51+
with open(os.path.join(repository_dir, 'test_requirements.txt')) as fh:
52+
test_requirements = fh.readlines()
4453

54+
python_requires = '>=2.7.10, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4'
4555
setup(name='mbed-greentea',
4656
version='1.7.3',
4757
description=DESCRIPTION,
@@ -56,13 +66,24 @@ def read(fname):
5666
license="Apache-2.0",
5767
test_suite='test',
5868
entry_points={
59-
"console_scripts": ["mbedgt=mbed_greentea.mbed_greentea_cli:main",],
69+
"console_scripts": ["mbedgt=mbed_greentea.mbed_greentea_cli:main", ],
6070
},
61-
install_requires=[
62-
"mbed-os-tools>=0.0.9,<0.1.0",
63-
"mbed-host-tests>=1.5.0,<2"
64-
],
65-
tests_require=[
66-
"mock>=2"
67-
]
68-
)
71+
classifiers=(
72+
'Development Status :: 5 - Production/Stable',
73+
'Intended Audience :: Developers',
74+
'License :: OSI Approved :: Apache Software License',
75+
'Programming Language :: Python :: 2',
76+
'Programming Language :: Python :: 2.7',
77+
'Programming Language :: Python :: 3',
78+
'Programming Language :: Python :: 3.5',
79+
'Programming Language :: Python :: 3.6',
80+
'Programming Language :: Python :: 3.7',
81+
'Programming Language :: Python',
82+
'Topic :: Software Development :: Build Tools',
83+
'Topic :: Software Development :: Embedded Systems',
84+
'Topic :: Software Development :: Testing',
85+
),
86+
python_requires=python_requires,
87+
install_requires=requirements,
88+
tests_require=test_requirements
89+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
mock>=2
12
coverage
23
coveralls

packages/mbed-host-tests/MANIFEST.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
global-exclude *.py[cod] __pycache__ *.so
2+
graft test
13
include README.md
4+
include requirements.txt
5+
include test_requirements.txt
26
include .coveragerc
7+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mbed-os-tools>=0.0.9,<0.1.0

packages/mbed-host-tests/setup.py

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,27 @@
3131
OWNER_NAMES = 'Qinghao Shi'
3232
OWNER_EMAILS = 'qinghao.shi@arm.com'
3333

34+
repository_dir = os.path.dirname(__file__)
35+
3436

3537
def read(fname):
3638
"""
3739
Utility function to cat in a file (used for the README)
38-
@param fname: the name of the file to read, relative to the directory containing this file
40+
@param fname: the name of the file to read,
41+
relative to the directory containing this file
3942
@return: The string content of the opened file
4043
"""
41-
return open(os.path.join(os.path.dirname(__file__), fname), encoding="utf8").read()
44+
with open(os.path.join(repository_dir, fname), mode='r') as f:
45+
return f.read()
46+
47+
48+
with open(os.path.join(repository_dir, 'requirements.txt')) as fh:
49+
requirements = fh.readlines()
4250

51+
with open(os.path.join(repository_dir, 'test_requirements.txt')) as fh:
52+
test_requirements = fh.readlines()
4353

54+
python_requires = '>=2.7.10, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4'
4455
setup(name='mbed-host-tests',
4556
version='1.5.9',
4657
description=DESCRIPTION,
@@ -55,14 +66,26 @@ def read(fname):
5566
license="Apache-2.0",
5667
test_suite='test',
5768
entry_points={
58-
"console_scripts":
59-
["mbedhtrun=mbed_host_tests.mbedhtrun:main",
60-
"mbedflsh=mbed_host_tests.mbedflsh:main"],
69+
"console_scripts":
70+
["mbedhtrun=mbed_host_tests.mbedhtrun:main",
71+
"mbedflsh=mbed_host_tests.mbedflsh:main"],
6172
},
62-
install_requires=[
63-
"mbed-os-tools>=0.0.9,<0.1.0"
64-
],
65-
tests_require=[
66-
"mock>=2"
67-
]
73+
classifiers=(
74+
'Development Status :: 5 - Production/Stable',
75+
'Intended Audience :: Developers',
76+
'License :: OSI Approved :: Apache Software License',
77+
'Programming Language :: Python :: 2',
78+
'Programming Language :: Python :: 2.7',
79+
'Programming Language :: Python :: 3',
80+
'Programming Language :: Python :: 3.5',
81+
'Programming Language :: Python :: 3.6',
82+
'Programming Language :: Python :: 3.7',
83+
'Programming Language :: Python',
84+
'Topic :: Software Development :: Build Tools',
85+
'Topic :: Software Development :: Embedded Systems',
86+
'Topic :: Software Development :: Testing',
87+
),
88+
python_requires=python_requires,
89+
install_requires=requirements,
90+
tests_require=test_requirements
6891
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
mock>=2
12
coverage
23
coveralls

packages/mbed-ls/MANIFEST.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
include README.md LICENSE CONTRIBUTING.md
1+
global-exclude *.py[cod] __pycache__ *.so
2+
graft test
3+
include README.md
4+
include requirements.txt
5+
include test_requirements.txt
26
include .coveragerc

0 commit comments

Comments
 (0)