diff --git a/examples/debug_i2c_simpletest.py b/examples/debug_i2c_simpletest.py index 09d9209..37e6b79 100644 --- a/examples/debug_i2c_simpletest.py +++ b/examples/debug_i2c_simpletest.py @@ -1,11 +1,10 @@ """This example uses the LIS3DH accelerometer. Debug_I2C can be used with any I2C device.""" -import busio import board import digitalio -from adafruit_debug_i2c import DebugI2C import adafruit_lis3dh +from adafruit_debug_i2c import DebugI2C -i2c = DebugI2C(busio.I2C(board.SCL, board.SDA)) +i2c = DebugI2C(board.I2C()) int1 = digitalio.DigitalInOut(board.ACCELEROMETER_INTERRUPT) accelerometer = adafruit_lis3dh.LIS3DH_I2C(i2c, address=0x19, int1=int1) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..284ba72 --- /dev/null +++ b/setup.py @@ -0,0 +1,53 @@ +"""A setuptools based setup module. + +See: +https://packaging.python.org/en/latest/distributing.html +https://github.com/pypa/sampleproject +""" + +from setuptools import setup, find_packages + +# To use a consistent encoding +from codecs import open +from os import path + +here = path.abspath(path.dirname(__file__)) + +# Get the long description from the README file +with open(path.join(here, "README.rst"), encoding="utf-8") as f: + long_description = f.read() + +setup( + name="adafruit-circuitpython-debug-i2c", + use_scm_version=True, + setup_requires=["setuptools_scm"], + description="Wrapper library for debugging I2C.", + long_description=long_description, + long_description_content_type="text/x-rst", + # The project's main homepage. + url="https://github.com/adafruit/Adafruit_CircuitPython_Debug_I2C", + # Author details + author="Adafruit Industries", + author_email="circuitpython@adafruit.com", + install_requires=["Adafruit-Blinka"], + # Choose your license + license="MIT", + # See https://pypi.python.org/pypi?%3Aaction=list_classifiers + classifiers=[ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Topic :: Software Development :: Libraries", + "Topic :: System :: Hardware", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + ], + # What does your project relate to? + keywords="adafruit blinka circuitpython micropython debug_i2c i2c debug", + # You can just specify the packages manually here if your project is + # simple. Or you can use find_packages(). + # TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER, + # CHANGE `py_modules=['...']` TO `packages=['...']` + py_modules=["adafruit_debug_i2c"], +) diff --git a/setup.py.disabled b/setup.py.disabled deleted file mode 100644 index a80b9bf..0000000 --- a/setup.py.disabled +++ /dev/null @@ -1,4 +0,0 @@ -""" -This library is not deployed to PyPI. It is either a board-specific helper library, or -does not make sense for use on or is incompatible with single board computers and Linux. -"""