/ setup.py
setup.py
 1  # Available at setup time due to pyproject.toml
 2  from pybind11.setup_helpers import Pybind11Extension, build_ext
 3  from setuptools import setup
 4  from setuptools_scm import get_version
 5  
 6  __version__ = get_version()
 7  
 8  # The main interface is through Pybind11Extension.
 9  # * You can add cxx_std=11/14/17, and then build_ext can be removed.
10  # * You can set include_pybind11=false to add the include directory yourself,
11  #   say from a submodule.
12  
13  ext_modules = [
14      Pybind11Extension("neopixel_write_pi5",
15          ["src/main.cpp", "src/utils/piolib/piolib.c", "src/utils/piolib/pio_rp1.c"],
16          define_macros = [('VERSION_INFO', __version__)],
17          include_dirs = ['./src/utils/piolib/include'],
18          cxx_std = "20",
19          extra_compile_args = ["-g3"],
20          ),
21  ]
22  
23  setup(
24      name="adafruit-blinka-neopixel-pi5",
25      version=__version__,
26      url="https://github.com/adafruit/adafruit-blinka-neopixel-pi5",
27      description="Control NeoPixel & compatibles on a Pi 5",
28      long_description="A pio-based driver",
29      ext_modules=ext_modules,
30      # Currently, build_ext only provides an optional "highest supported C++
31      # level" feature, but in the future it may provide more features.
32      cmdclass={"build_ext": build_ext},
33      zip_safe=False,
34      python_requires=">=3.11",
35  )