Restructure to allow pip install from git

update readme with install instructions
pull/10/head
Blair Azzopardi 2017-12-30 18:01:12 +00:00
rodzic 1a111f6359
commit 6cb713196e
6 zmienionych plików z 79 dodań i 5 usunięć

28
.gitignore vendored 100644
Wyświetl plik

@ -0,0 +1,28 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
test.txt

1
MANIFEST.in 100644
Wyświetl plik

@ -0,0 +1 @@
include micropyGPS.py

Wyświetl plik

@ -14,6 +14,27 @@ Features:
- Parser written with a serial UART data source in mind; works on a single character at a time with
robust error handling for noisy embedded environments
- Modeled after the great [TinyGPS] Arduino library
## Install / uninstall
Install by cloning from git and running install via setuptools.
```sh
git clone https://github.com/bsdz/micropyGPS.git
python setup.py install
```
Or install directly from github using pip.
```sh
pip install git+https://github.com/bsdz/micropyGPS.git
```
To uninstall use the following pip command.
```sh
pip uninstall micropyGPS
```
## Basic Usage
@ -208,4 +229,4 @@ Beyond the pyBoard, micropyGPS should run on other embedded platforms that have
[TinyGPS]:http://arduiniana.org/libraries/tinygps/
[pyboard]:http://docs.micropython.org/en/latest/pyboard/pyboard/quickref.html
[MTK_command]:https://github.com/inmcm/MTK_commands
[Ultimate GPS Breakout]:http://www.adafruit.com/product/746
[Ultimate GPS Breakout]:http://www.adafruit.com/product/746

Wyświetl plik

@ -1 +0,0 @@
__author__ = 'inmcm'

13
setup.py 100644
Wyświetl plik

@ -0,0 +1,13 @@
from setuptools import setup, find_packages
setup(name='micropyGPS',
version='1.0',
description='GPS NMEA sentence parser',
author='Calvin McCoy',
author_email='calvin.mccoy@gmail.com',
url='https://github.com/inmcm/micropyGPS',
py_modules = ['micropyGPS'],
include_package_data=True,
test_suite="tests.py",
)

Wyświetl plik

@ -7,8 +7,7 @@ Tests for micropyGPS module
from micropyGPS import MicropyGPS
if __name__ == "__main__":
def run_tests():
sentence_count = 0
test_RMC = ['$GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62\n',
@ -148,4 +147,17 @@ if __name__ == "__main__":
print('Sentences Attempted:', sentence_count)
print('Sentences Found:', my_gps.clean_sentences)
print('Sentences Parsed:', my_gps.parsed_sentences)
print('CRC_Fails:', my_gps.crc_fails)
print('CRC_Fails:', my_gps.crc_fails)
import unittest
class TestMicroPyGPS(unittest.TestCase):
def test_smoke(self):
try:
run_tests()
except:
self.fail("smoke test raised exception")
if __name__ == "__main__":
run_tests()