Add setup.py support
This commit is contained in:
		
							parent
							
								
									f42e98f29f
								
							
						
					
					
						commit
						acb1049463
					
				|  | @ -0,0 +1,21 @@ | ||||||
|  | #!/usr/bin/env python | ||||||
|  | 
 | ||||||
|  | import setuptools | ||||||
|  | 
 | ||||||
|  | setuptools.setup( | ||||||
|  |     name='speedtest-cli', | ||||||
|  |     version='0.2', | ||||||
|  |     description=('Command line interface for testing internet bandwidth using ' | ||||||
|  |                  'speedtest.net'), | ||||||
|  |     author='Matt Martz', | ||||||
|  |     author_email='matt@sivel.net', | ||||||
|  |     url='https://github.com/sivel/speedtest-cli', | ||||||
|  |     license='Apache License, Version 2.0', | ||||||
|  |     py_modules=['speedtest_cli'], | ||||||
|  |     entry_points={ | ||||||
|  |         'console_scripts': [ | ||||||
|  |             'speedtest=speedtest_cli:main', | ||||||
|  |             'speedtest-cli=speedtest_cli:main' | ||||||
|  |         ] | ||||||
|  |     } | ||||||
|  | ) | ||||||
|  | @ -517,10 +517,14 @@ def speedtest(): | ||||||
|         print_('Share results: http://www.speedtest.net/result/%s.png' % |         print_('Share results: http://www.speedtest.net/result/%s.png' % | ||||||
|                resultid[0]) |                resultid[0]) | ||||||
| 
 | 
 | ||||||
| if __name__ == '__main__': | 
 | ||||||
|  | def main(): | ||||||
|     try: |     try: | ||||||
|         speedtest() |         speedtest() | ||||||
|     except KeyboardInterrupt: |     except KeyboardInterrupt: | ||||||
|         print_('\nCancelling...') |         print_('\nCancelling...') | ||||||
| 
 | 
 | ||||||
|  | if __name__ == '__main__': | ||||||
|  |     main() | ||||||
|  | 
 | ||||||
| # vim:ts=4:sw=4:expandtab | # vim:ts=4:sw=4:expandtab | ||||||
		Loading…
	
		Reference in New Issue