From 525202cc09849cec0320187852ea44adb279a80b Mon Sep 17 00:00:00 2001 From: Conr86 Date: Tue, 17 Sep 2019 13:30:33 +1000 Subject: [PATCH] Fixed package issues --- example.py | 26 +++++++++++++------------- setup.py | 2 +- __init__.py => sgp30/__init__.py | 2 +- crc.py => sgp30/crc.py | 0 sgp30.py => sgp30/sgp30.py | 0 5 files changed, 15 insertions(+), 15 deletions(-) rename __init__.py => sgp30/__init__.py (53%) rename crc.py => sgp30/crc.py (100%) rename sgp30.py => sgp30/sgp30.py (100%) diff --git a/example.py b/example.py index 99a78c0..0d27a33 100644 --- a/example.py +++ b/example.py @@ -1,14 +1,14 @@ -from smbus2 import SMBus -from sgp30 import SGP30 - -if __name__ == "__main__": - bus = SMBus(1) - sensor = SGP30(bus) - print(sensor.read_features()) - print(sensor.read_serial()) - sensor.init_sgp() - for i in range(300): - print(sensor.read_measurements()) - time.sleep(0.1) - sensor.store_baseline() +from smbus2 import SMBus +from sgp30 import SGP30 + +if __name__ == "__main__": + bus = SMBus(1) + sensor = SGP30(bus) + print(sensor.read_features()) + print(sensor.read_serial()) + sensor.init_sgp() + for i in range(300): + print(sensor.read_measurements()) + time.sleep(0.1) + sensor.store_baseline() bus.close() \ No newline at end of file diff --git a/setup.py b/setup.py index f108101..897d9bf 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open('README.md', 'r') as f: setuptools.setup( name='PySGP30', description='Library for reading data from the Sensirion SGP30', - version='0.1.6', + version='0.1.8', author='Connor Kneebone', author_email='connor@sfxrescue.com', url='https://github.com/Conr86/PySGP30', diff --git a/__init__.py b/sgp30/__init__.py similarity index 53% rename from __init__.py rename to sgp30/__init__.py index 9a1355f..087bb48 100644 --- a/__init__.py +++ b/sgp30/__init__.py @@ -1,2 +1,2 @@ from .sgp30 import SGP30 -from .crc import Crc8 +from .crc import CRC8 diff --git a/crc.py b/sgp30/crc.py similarity index 100% rename from crc.py rename to sgp30/crc.py diff --git a/sgp30.py b/sgp30/sgp30.py similarity index 100% rename from sgp30.py rename to sgp30/sgp30.py