Skip to content

Commit

Permalink
Add setup.py, addresses #9
Browse files Browse the repository at this point in the history
  • Loading branch information
sivel committed Jul 31, 2013
2 parents c22a41c + 2f0027c commit 4b06259
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,40 @@ Command line interface for testing internet bandwidth using speedtest.net

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

Expand Down
21 changes: 21 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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'
]
}
)
6 changes: 5 additions & 1 deletion speedtest-cli → speedtest_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,14 @@ def speedtest():
print_('Share results: http://www.speedtest.net/result/%s.png' %
resultid[0])

if __name__ == '__main__':

def main():
try:
speedtest()
except KeyboardInterrupt:
print_('\nCancelling...')

if __name__ == '__main__':
main()

# vim:ts=4:sw=4:expandtab

0 comments on commit 4b06259

Please sign in to comment.