Add setup.py, addresses #9
This commit is contained in:
commit
4b06259a92
34
README.md
34
README.md
|
@ -6,6 +6,40 @@ Command line interface for testing internet bandwidth using speedtest.net
|
||||||
|
|
||||||
speedtest-cli works with Python 2.4-3.3
|
speedtest-cli works with Python 2.4-3.3
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### pip / easy_install
|
||||||
|
|
||||||
|
`pip install speedtest-cli`
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
`easy_install speedtest-cli`
|
||||||
|
|
||||||
|
### Github
|
||||||
|
|
||||||
|
`pip install git+https://github.com/sivel/speedtest-cli.git`
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://github.com/sivel/speedtest-cli.git
|
||||||
|
python speedtest-cli/setup.py
|
||||||
|
```
|
||||||
|
|
||||||
|
### Just download (just like the way it was)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
wget -O speedtest-cli https://github.com/sivel/speedtest-cli/raw/master/speedtest_cli.py
|
||||||
|
chmod +x speedtest-cli
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -o speedtest-cli https://github.com/sivel/speedtest-cli/raw/master/speedtest_cli.py
|
||||||
|
chmod +x speedtest-cli
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
|
@ -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