diff --git a/MANIFEST.in b/MANIFEST.in index 3ff82a5c..8123492d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,5 @@ -include README.md LICENSE pypi_readme.rst +global-exclude *.py[cod] __pycache__ *.so graft test +include README.rst +include LICENSE +include requirements.txt diff --git a/README.md b/README.md deleted file mode 100755 index d7537170..00000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -## Introduction - -Arm Mbed CLI is the name of the Arm Mbed command-line tool, packaged as `mbed-cli`. Mbed CLI enables Git- and Mercurial-based version control, dependencies management, code publishing, support for remotely hosted repositories (GitHub, GitLab and mbed.org), use of the Arm Mbed OS build system and export functions and other operations. - -For details about installing and using Mbed CLI, please see [Mbed CLI's official documentation](https://os.mbed.com/docs/mbed-os/latest/tools/developing-mbed-cli.html). diff --git a/pypi_readme.rst b/README.rst similarity index 92% rename from pypi_readme.rst rename to README.rst index 776932a9..f3825eba 100644 --- a/pypi_readme.rst +++ b/README.rst @@ -1,4 +1,5 @@ -.. image:: https://circleci.com/gh/ARMmbed/mbed-cli.svg?style=svg +Arm Mbed CLI +============ Mbed CLI is the name of the `Arm Mbed `_ 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. diff --git a/circle_tests.py b/circle_tests.py index 2bc380a8..1520aef4 100644 --- a/circle_tests.py +++ b/circle_tests.py @@ -74,5 +74,5 @@ def remove_readonly(func, path, _): proc.communicate() if proc.returncode != 0: - print "\n------------\nERROR: \"%s\"" % cmd + print("\n------------\nERROR: \"%s\"" % cmd) sys.exit(1) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..33c2948a --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +pyserial>=3.0,<4.0 +mbed-os-tools>=0.0.9,<0.1.0 +mercurial>=5.2 diff --git a/setup.py b/setup.py index e285ae9b..d0c7c27f 100644 --- a/setup.py +++ b/setup.py @@ -12,41 +12,55 @@ import os from setuptools import setup +from setuptools import find_packages -with open("README.md", "r") as fh: +NAME = 'mbed-cli' +__version__ = '1.10.3' + +repository_dir = os.path.dirname(__file__) + +# .rst readme needed for pypi +with open(os.path.join(repository_dir, 'README.rst')) as fh: + long_description = fh.read() + +with open(os.path.join(repository_dir, 'requirements.txt')) as fh: + requirements = fh.readlines() + +with open("README.rst", "r") as fh: long_description = fh.read() setup( - name="mbed-cli", - version="1.10.2", - 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", - long_description=long_description, - long_description_content_type="text/markdown", - url='http://github.com/ARMmbed/mbed-cli', author='Arm mbed', author_email='support@mbed.org', - packages=["mbed"], - entry_points={ - 'console_scripts': [ - 'mbed=mbed.mbed:main', - 'mbed-cli=mbed.mbed:main', - ] - }, - python_requires='>=2.7.10, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.0, !=3.4.1, !=3.4.2, <4', classifiers=( + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', - "License :: OSI Approved :: Apache Software License", - "Operating System :: OS Independent", + 'Programming Language :: Python', + 'Topic :: Software Development :: Build Tools', + 'Topic :: Software Development :: Embedded Systems', ), - install_requires=[ - "pyserial>=3.0,<4.0", - "mbed-os-tools>=0.0.9,<0.1.0", - "mercurial>=5.2" - ] + description="Command line tool for interacting with Mbed OS projects", + keywords="Mbed OS CLI", + include_package_data=True, + install_requires=requirements, + license='Apache 2.0', + long_description=long_description, + name=NAME, + packages=find_packages(), + python_requires='>=2.7.10, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4', + url="http://github.com/ARMmbed/mbed-cli", + version=__version__, + entry_points={ + 'console_scripts': [ + 'mbed=mbed.mbed:main', + 'mbed-cli=mbed.mbed:main', + ] + } )