2 # -*- coding: utf-8 -*-
 
   4 # SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
 
   6 # SPDX-License-Identifier: MIT
 
   8 # Note: To use the 'upload' functionality of this file, you must:
 
  15 from setuptools import setup, find_packages
 
  17 here = os.path.abspath(os.path.dirname(__file__))
 
  19 # Import the README and use it as the long-description.
 
  20 # Note: this will only work if 'README.md' is present in your MANIFEST.in file!
 
  21 with io.open(os.path.join(here, "README.rst"), encoding="utf-8") as f:
 
  22     long_description = "\n" + f.read()
 
  25 if os.path.exists("/proc/device-tree/compatible"):
 
  26     with open("/proc/device-tree/compatible", "rb") as f:
 
  28     if b"nvidia,tegra" in compat:
 
  29         board_reqs = ["Jetson.GPIO"]
 
  31         b"brcm,bcm2835" in compat
 
  32         or b"brcm,bcm2836" in compat
 
  33         or b"brcm,bcm2837" in compat
 
  34         or b"brcm,bcm2838" in compat
 
  35         or b"brcm,bcm2711" in compat
 
  37         board_reqs = ["RPi.GPIO", "rpi_ws281x>=4.0.0", "sysv_ipc>=1.1.0"]
 
  40     name="Adafruit-Blinka",
 
  42         # This is needed for the PyPI version munging in the Github Actions release.yml
 
  43         "git_describe_command": "git describe --tags --long",
 
  44         "local_scheme": "no-local-version",
 
  46     setup_requires=["setuptools_scm"],
 
  47     description="CircuitPython APIs for non-CircuitPython versions of Python such as CPython on Linux and MicroPython.",
 
  48     long_description=long_description,
 
  49     long_description_content_type="text/x-rst",
 
  50     author="Adafruit Industries",
 
  51     author_email="circuitpython@adafruit.com",
 
  52     python_requires=">=3.7.0",
 
  53     url="https://github.com/adafruit/Adafruit_Blinka",
 
  54     package_dir={"": "src"},
 
  55     packages=find_packages("src") + ["micropython-stubs"],
 
  56     # py_modules lists top-level single file packages to include.
 
  57     # find_packages only finds packages in directories with __init__.py files.
 
  74         "adafruit_blinka.microcontroller.bcm283x.pulseio": [
 
  78         "adafruit_blinka.microcontroller.amlogic.meson_g12_common.pulseio": [
 
  81         "micropython-stubs": ["*.pyi"],
 
  83     include_package_data=True,
 
  85         "Adafruit-PlatformDetect>=3.52.0",
 
  86         "Adafruit-PureIO>=1.1.7",
 
  88         "adafruit-circuitpython-typing",
 
  94         # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
 
  95         "License :: OSI Approved :: MIT License",
 
  96         "Programming Language :: Python",
 
  97         "Programming Language :: Python :: 3",
 
  98         "Programming Language :: Python :: 3.7",
 
  99         "Programming Language :: Python :: Implementation :: MicroPython",