Skip to content

Commit 39701bb

Browse files
committed
Updating python_requires and classifiers
- Fixed a python 3 issue in circle_tests - Updated `setup.py`
1 parent 61891bd commit 39701bb

File tree

7 files changed

+62
-31
lines changed

7 files changed

+62
-31
lines changed

MANIFEST.in

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

README.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

pypi_readme.rst renamed to README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. image:: https://circleci.com/gh/ARMmbed/mbed-cli.svg?style=svg
1+
## Arm Mbed CLI
22

33
Mbed CLI is the name of the `Arm Mbed <https://mbed.com>`_ command line tool, packaged as mbed-cli, which enables the full mbed workflow: repositories version control, maintaining dependencies, publishing code, updating from remotely hosted repositories (GitHub, GitLab and mbed.com), and invoking Arm Mbed's own build system and export functions, among other operations.
44

circle_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ def remove_readonly(func, path, _):
7474
proc.communicate()
7575

7676
if proc.returncode != 0:
77-
print "\n------------\nERROR: \"%s\"" % cmd
77+
print("\n------------\nERROR: \"%s\"" % cmd)
7878
sys.exit(1)

mbed/_version.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""The version number is based on SemVer.
2+
Breaking changes in SDK will increment the major version number.
3+
references:
4+
- https://semver.org/
5+
- https://www.python.org/dev/peps/pep-0440/
6+
"""
7+
SDK_MAJOR = '1'
8+
SDK_MINOR = '10'
9+
SDK_PATCH = '3'
10+
_locked = False
11+
__version__ = '1.10.3'

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pyserial>=3.0,<4.0
2+
mbed-os-tools>=0.0.9,<0.1.0
3+
mercurial>=5.2

setup.py

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,60 @@
1212

1313
import os
1414
from setuptools import setup
15+
from setuptools import find_packages
1516

16-
with open("README.md", "r") as fh:
17+
NAME = 'mbed-cli'
18+
__version__ = None
19+
20+
repository_dir = os.path.dirname(__file__)
21+
22+
# single source for project version information without side effects
23+
with open(os.path.join(repository_dir, 'mbed', '_version.py')) as fh:
24+
exec(fh.read())
25+
26+
# .rst readme needed for pypi
27+
with open(os.path.join(repository_dir, 'README.rst')) as fh:
28+
long_description = fh.read()
29+
30+
with open(os.path.join(repository_dir, 'requirements.txt')) as fh:
31+
requirements = fh.readlines()
32+
33+
with open("README.rst", "r") as fh:
1734
long_description = fh.read()
1835

1936
setup(
20-
name="mbed-cli",
21-
version="1.10.2",
22-
description="Arm Mbed command line tool for repositories version control, publishing and updating code from remotely hosted repositories (GitHub, GitLab and mbed.com), and invoking Mbed OS own build system and export functions, among other operations",
23-
long_description=long_description,
24-
long_description_content_type="text/markdown",
25-
url='http://github.com/ARMmbed/mbed-cli',
2637
author='Arm mbed',
2738
author_email='[email protected]',
28-
packages=["mbed"],
29-
entry_points={
30-
'console_scripts': [
31-
'mbed=mbed.mbed:main',
32-
'mbed-cli=mbed.mbed:main',
33-
]
34-
},
35-
python_requires='>=2.7.10, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.0, !=3.4.1, !=3.4.2, <4',
3639
classifiers=(
40+
'Development Status :: 5 - Production/Stable',
41+
'Intended Audience :: Developers',
42+
'License :: OSI Approved :: Apache Software License',
3743
'Programming Language :: Python :: 2',
3844
'Programming Language :: Python :: 2.7',
3945
'Programming Language :: Python :: 3',
40-
'Programming Language :: Python :: 3.4',
4146
'Programming Language :: Python :: 3.5',
4247
'Programming Language :: Python :: 3.6',
4348
'Programming Language :: Python :: 3.7',
44-
"License :: OSI Approved :: Apache Software License",
45-
"Operating System :: OS Independent",
49+
'Programming Language :: Python',
50+
'Topic :: Internet',
51+
'Topic :: Software Development :: Embedded Systems',
52+
'Topic :: Software Development :: Object Brokering',
4653
),
47-
install_requires=[
48-
"pyserial>=3.0,<4.0",
49-
"mbed-os-tools>=0.0.9,<0.1.0",
50-
"mercurial>=5.2"
51-
]
54+
description="Command line tool for interacting with Mbed OS projects",
55+
keywords="Mbed OS CLI",
56+
include_package_data=True,
57+
install_requires=requirements,
58+
license='Apache 2.0',
59+
long_description=long_description,
60+
name=NAME,
61+
packages=find_packages(),
62+
python_requires='>=2.7.10, !=3.4.1, !=3.4.2, <4',
63+
url="http://github.com/ARMmbed/mbed-cli",
64+
version=__version__,
65+
entry_points={
66+
'console_scripts': [
67+
'mbed=mbed.mbed:main',
68+
'mbed-cli=mbed.mbed:main',
69+
]
70+
}
5271
)

0 commit comments

Comments
 (0)