]> Repositories - Adafruit_Blinka-hackapet.git/blob - setup.py
Add Clockwork Pi board
[Adafruit_Blinka-hackapet.git] / setup.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 # Note: To use the 'upload' functionality of this file, you must:
5 #   $ pip install twine
6
7 import io
8 import os
9 import sys
10
11 from setuptools import setup, find_packages
12
13 here = os.path.abspath(os.path.dirname(__file__))
14
15 # Import the README and use it as the long-description.
16 # Note: this will only work if 'README.md' is present in your MANIFEST.in file!
17 with io.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
18     long_description = '\n' + f.read()
19
20 board_reqs = []
21 if os.path.exists('/proc/device-tree/compatible'):
22     with open('/proc/device-tree/compatible', 'rb') as f:
23         compat = f.read()
24     if b'nvidia,tegra' in compat:
25         board_reqs = ['Jetson.GPIO']
26     if b'brcm,bcm2835' in compat or \
27        b'brcm,bcm2836' in compat or \
28        b'brcm,bcm2837' in compat or \
29        b'brcm,bcm2838' in compat:
30         board_reqs = ['RPi.GPIO', 'rpi_ws281x>=4.0.0']
31
32 setup(
33     name='Adafruit-Blinka',
34     use_scm_version=True,
35     setup_requires=["setuptools_scm"],
36     description='CircuitPython APIs for non-CircuitPython versions of Python such as CPython on Linux and MicroPython.',
37     long_description=long_description,
38     long_description_content_type='text/x-rst',
39     author='Adafruit Industries',
40     author_email='circuitpython@adafruit.com',
41     python_requires='>=3.4.0',
42     url='https://github.com/adafruit/Adafruit_Blinka',
43     package_dir={'': 'src'},
44     packages=find_packages("src"),
45     # py_modules lists top-level single file packages to include.
46     # find_packages only finds packages in directories with __init__.py files.
47     py_modules=['analogio', 'bitbangio', 'board', 'busio', 'digitalio', 'micropython', 'pulseio', 'neopixel_write'],
48     package_data={'adafruit_blinka.microcontroller.bcm283x.pulseio': ['libgpiod_pulsein']},
49     install_requires=[
50         "Adafruit-PlatformDetect>=2.5.0",
51         "Adafruit-PureIO>=1.1.0",
52         "sysv_ipc; platform_system != 'Windows' and platform_machine != 'mips'",
53         "pyftdi>=0.40.0"
54     ] + board_reqs,
55     license='MIT',
56     classifiers=[
57         # Trove classifiers
58         # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
59         'License :: OSI Approved :: MIT License',
60         'Programming Language :: Python',
61         'Programming Language :: Python :: 3',
62         'Programming Language :: Python :: 3.5',
63         'Programming Language :: Python :: Implementation :: MicroPython',
64     ],
65 )