From 9cc42d9b7752603ae409e7c95a8cb5bec4d7b5b2 Mon Sep 17 00:00:00 2001 From: Chintalagiri Shashank Date: Sat, 11 May 2019 04:23:19 +0530 Subject: Make __main__ functional again and install a script entry point. --- setup.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 1df0868..0e43155 100644 --- a/setup.py +++ b/setup.py @@ -16,6 +16,7 @@ # limitations under the License. import os + def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() @@ -25,13 +26,13 @@ METADATA = { 'version': 0.1, 'author': 'Paulo Henrique Silva , Hamilton Kibbe ', 'author_email': "ph.silva@gmail.com, ham@hamiltonkib.be", - 'description': ("Utilities to handle Gerber (RS-274X) files."), + 'description': "Utilities to handle Gerber (RS-274X) files.", 'license': "Apache", 'keywords': "pcb gerber tools", 'url': "http://github.com/curtacircuitos/pcb-tools", 'packages': ['gerber', 'gerber.render'], 'long_description': read('README.md'), - 'classifiers':[ + 'classifiers': [ "Development Status :: 3 - Alpha", "Topic :: Utilities", "License :: OSI Approved :: Apple Public Source License", @@ -40,6 +41,11 @@ METADATA = { SETUPTOOLS_METADATA = { 'install_requires': ['cairocffi==0.6'], + 'entry_points': { + 'console_scripts': [ + 'gerber-render = gerber.__main__:main', + ], + }, } @@ -53,9 +59,10 @@ def install(): except ImportError: from sys import stderr stderr.write('Could not import setuptools, using distutils') - stderr.write('NOTE: You will need to install dependencies manualy') + stderr.write('NOTE: You will need to install dependencies manually') from distutils.core import setup setup(**METADATA) + if __name__ == '__main__': install() -- cgit