Features: * automatically set pin modes for UART (PR #158) * Encoder: README.md: added note about eqep group change (PR #214) * deprecate out of date Adafruit_I2C.py (PR #215) * Add Encoder module info to main README.md (PR #217) * Add automatic API documentation generation (PR #219) * Separate API docs into modules (PR #221) shortlog: * David Planella (46): * Encoder: README.md: added note about eqep group change * Add Encoder module info to main README.md * Added docstrings using Google syntax and Sphinx support to generate the API documentation for the Encoder and PWM modules for now. * Made kernel version check to happen only if running on a beaglebone. The readthedocs builders that import the Encoder module have an old 3.3 kernel and the autodoc build fails * Use the default readthedocs theme * Use readthedocs theme if building docs there, remove redundand search link * Readthedocs theme tweaks * Removed redundant TOC, added global description * Added UART documentation * Added documentation badge * Added ADC API docs, fixed UART module definition * API docs: added SPI module * Added SPI module attribute docs * Added Python badges to README file * Added SPI pins table and first shot at GPIO module. Functions still need to be documented * Merge branch 'readthedocs' of https://github.com/dplanella/adafruit-beaglebone-io-python into readthedocs * Documented the API docs build process * Added docstrings using Google syntax and Sphinx support to generate the API documentation for the Encoder and PWM modules for now. * Made kernel version check to happen only if running on a beaglebone. The readthedocs builders that import the Encoder module have an old 3.3 kernel and the autodoc build fails * Use the default readthedocs theme * Use readthedocs theme if building docs there, remove redundand search link * Readthedocs theme tweaks * Removed redundant TOC, added global description * Added UART documentation * Added documentation badge * Added ADC API docs, fixed UART module definition * API docs: added SPI module * Added SPI module attribute docs * Added Python badges to README file * Added SPI pins table and first shot at GPIO module. Functions still need to be documented * Documented the API docs build process * Merge branch 'readthedocs' of https://github.com/dplanella/adafruit-beaglebone-io-python into readthedocs * Update README.md * Added some more API doc content * Sync from upstream master * Minor documentation and configuration improvements * Finished documenting GPIO * rST fixes * Update README.md * Minor API doc improvements * Merge branch 'readthedocs' of https://github.com/dplanella/adafruit-beaglebone-io-python into readthedocs * Generate the API documentation from a master index and a separate file for each module * Sync from upstream master * Improvements to the API docs output config * Update docs generation description to reflect new separate modules * Updated ADC API docs * Drew Fustini (10): * use set_pin_mode() to set uart pinmux (#158) * Add SPI instructions to README (#158) * Update README.md * Fix spidev path mismatch (#216) * Merge pull request #217 from dplanella/patch-2 * Merge pull request #214 from dplanella/patch-1 * Deprecate Adafruit_BBIO.I2C in favor of Adafruit_GPIO.I2C (#215) * Merge pull request #219 from dplanella/readthedocs * relocate doc dir to avoid confusion (#218) * Merge pull request #221 from dplanella/readthedocs Signed-off-by: Drew Fustini <drew@pdp7.com>
59 lines
2.5 KiB
Python
59 lines
2.5 KiB
Python
try:
|
|
from overlays import builder
|
|
builder.compile()
|
|
builder.copy()
|
|
except:
|
|
pass
|
|
|
|
import distribute_setup
|
|
import io
|
|
import sys
|
|
import platform
|
|
distribute_setup.use_setuptools()
|
|
from setuptools import setup, Extension, find_packages
|
|
|
|
open_as_utf8 = lambda x: io.open(x, encoding='utf-8')
|
|
|
|
kernel = platform.release()
|
|
|
|
if kernel >= '4.1.0':
|
|
kernel41 = [('BBBVERSION41', None)]
|
|
else:
|
|
kernel41 = None
|
|
|
|
CFLAGS = ['-Wall', '-Werror', '-Wextra', '-Wno-missing-field-initializers', '-Wno-strict-aliasing' ]
|
|
|
|
classifiers = ['Development Status :: 3 - Alpha',
|
|
'Operating System :: POSIX :: Linux',
|
|
'License :: OSI Approved :: MIT License',
|
|
'Intended Audience :: Developers',
|
|
'Programming Language :: Python :: 2.7',
|
|
'Programming Language :: Python :: 3',
|
|
'Topic :: Software Development',
|
|
'Topic :: Home Automation',
|
|
'Topic :: System :: Hardware']
|
|
|
|
extension_args = {
|
|
'include_dirs': ['source/include/'],
|
|
'extra_compile_args': CFLAGS,
|
|
'define_macros': kernel41
|
|
}
|
|
|
|
setup(name = 'Adafruit_BBIO',
|
|
version = '1.0.10',
|
|
author = 'Justin Cooper',
|
|
author_email = 'justin@adafruit.com',
|
|
description = 'A module to control BeagleBone IO channels',
|
|
long_description = open_as_utf8('README.md').read() + open_as_utf8('CHANGELOG.md').read(),
|
|
license = 'MIT',
|
|
keywords = 'Adafruit BeagleBone IO GPIO PWM ADC',
|
|
url = 'https://github.com/adafruit/adafruit-beaglebone-io-python/',
|
|
classifiers = classifiers,
|
|
packages = find_packages(),
|
|
py_modules = ['Adafruit_I2C'],
|
|
ext_modules = [Extension('Adafruit_BBIO.GPIO', ['source/py_gpio.c', 'source/event_gpio.c', 'source/c_pinmux.c', 'source/constants.c', 'source/common.c'], **extension_args),
|
|
Extension('Adafruit_BBIO.PWM', ['source/py_pwm.c', 'source/c_pwm.c', 'source/c_pinmux.c', 'source/constants.c', 'source/common.c'], **extension_args),
|
|
Extension('Adafruit_BBIO.ADC', ['source/py_adc.c', 'source/c_adc.c', 'source/constants.c', 'source/common.c'], **extension_args),
|
|
Extension('Adafruit_BBIO.SPI', ['source/spimodule.c', 'source/c_pinmux.c', 'source/constants.c', 'source/common.c'], **extension_args),
|
|
Extension('Adafruit_BBIO.UART', ['source/py_uart.c', 'source/c_pinmux.c', 'source/c_uart.c', 'source/constants.c', 'source/common.c'], **extension_args)] )
|
|
|