robweber / omni-epd

An EPD (electronic paper display) class abstraction to simplify communications across multiple display types.
GNU General Public License v3.0
83 stars 19 forks source link

Could not build wheels for IT8951, RPi.GPIO, spidev on Mac #98

Closed senhalil closed 6 months ago

senhalil commented 6 months ago

Hi! I have zombie waveshare project that was based on your repo but having trouble resuscitating it. It was many moons and systems ago (and without self documentation) so I am tracing my steps but failing to install omni-epd :/ Thinking things might go smoother, I tried to install from source but no avail.

Any ideas would be much appreciated!

Here is the terminal output in case it sparks some ideas.

(.SlowMovie) ➜  omni-epd git:(main) pip3 install --prefer-binary .

[...]

Building wheels for collected packages: omni_epd, IT8951, waveshare-epd, RPi.GPIO, spidev
  Building wheel for omni_epd (pyproject.toml) ... done
  Created wheel for omni_epd: filename=omni_epd-0.4.1-py3-none-any.whl size=1529534 sha256=efbe767578255f8736f4b0a2d227a331548087982542291b9fe3cdd5c7a46def
  Stored in directory: /Users/halilsen/Library/Caches/pip/wheels/21/04/3f/bde5286a7f58373f9c840daf93fe9d934b31d885a9d26f7b72
  Building wheel for IT8951 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for IT8951 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [34 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-13-arm64-cpython-311
      creating build/lib.macosx-13-arm64-cpython-311/IT8951
      copying src/IT8951/constants.py -> build/lib.macosx-13-arm64-cpython-311/IT8951
      copying src/IT8951/interface.py -> build/lib.macosx-13-arm64-cpython-311/IT8951
      copying src/IT8951/__init__.py -> build/lib.macosx-13-arm64-cpython-311/IT8951
      copying src/IT8951/display.py -> build/lib.macosx-13-arm64-cpython-311/IT8951
      running egg_info
      writing src/IT8951.egg-info/PKG-INFO
      writing dependency_links to src/IT8951.egg-info/dependency_links.txt
      writing requirements to src/IT8951.egg-info/requires.txt
      writing top-level names to src/IT8951.egg-info/top_level.txt
      reading manifest file 'src/IT8951.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      writing manifest file 'src/IT8951.egg-info/SOURCES.txt'
      copying src/IT8951/img_manip.c -> build/lib.macosx-13-arm64-cpython-311/IT8951
      copying src/IT8951/img_manip.pyx -> build/lib.macosx-13-arm64-cpython-311/IT8951
      copying src/IT8951/spi.c -> build/lib.macosx-13-arm64-cpython-311/IT8951
      copying src/IT8951/spi.pyx -> build/lib.macosx-13-arm64-cpython-311/IT8951
      running build_ext
      building 'IT8951.spi' extension
      creating build/temp.macosx-13-arm64-cpython-311
      creating build/temp.macosx-13-arm64-cpython-311/src
      creating build/temp.macosx-13-arm64-cpython-311/src/IT8951
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/halilsen/dev/SlowMovie/.SlowMovie/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/IT8951/spi.c -o build/temp.macosx-13-arm64-cpython-311/src/IT8951/spi.o
      src/IT8951/spi.c:1237:10: fatal error: 'linux/spi/spidev.h' file not found
      #include "linux/spi/spidev.h"
               ^~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for IT8951
  Building wheel for waveshare-epd (setup.py) ... done
  Created wheel for waveshare-epd: filename=waveshare_epd-0.0.0-py3-none-any.whl size=134828 sha256=e8645c44ac5e85246ac98aeffd77a593992bad4332bb6b093c85c706af0464ba
  Stored in directory: /private/var/folders/3v/ckpm_vlj201bbnzm78fws4h40000gn/T/pip-ephem-wheel-cache-qkip4dsu/wheels/75/fe/c7/78dd7b9522d59009b23c2702b1f317e40e1648578b6dfbd8e7
  Building wheel for RPi.GPIO (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-13-arm64-cpython-311
      creating build/lib.macosx-13-arm64-cpython-311/RPi
      copying RPi/__init__.py -> build/lib.macosx-13-arm64-cpython-311/RPi
      creating build/lib.macosx-13-arm64-cpython-311/RPi/GPIO
      copying RPi/GPIO/__init__.py -> build/lib.macosx-13-arm64-cpython-311/RPi/GPIO
      running build_ext
      building 'RPi._GPIO' extension
      creating build/temp.macosx-13-arm64-cpython-311
      creating build/temp.macosx-13-arm64-cpython-311/source
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/halilsen/dev/SlowMovie/.SlowMovie/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c source/c_gpio.c -o build/temp.macosx-13-arm64-cpython-311/source/c_gpio.o
      source/c_gpio.c:170:9: warning: cast to smaller integer type 'uint32_t' (aka 'unsigned int') from 'uint8_t *' (aka 'unsigned char *') [-Wpointer-to-int-cast]
          if ((uint32_t)gpio_mem % PAGE_SIZE)
              ^~~~~~~~~~~~~~~~~~
      source/c_gpio.c:171:34: warning: cast to smaller integer type 'uint32_t' (aka 'unsigned int') from 'uint8_t *' (aka 'unsigned char *') [-Wpointer-to-int-cast]
              gpio_mem += PAGE_SIZE - ((uint32_t)gpio_mem % PAGE_SIZE);
                                       ^~~~~~~~~~~~~~~~~~
      2 warnings generated.
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/halilsen/dev/SlowMovie/.SlowMovie/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c source/common.c -o build/temp.macosx-13-arm64-cpython-311/source/common.o
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/halilsen/dev/SlowMovie/.SlowMovie/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c source/constants.c -o build/temp.macosx-13-arm64-cpython-311/source/constants.o
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/halilsen/dev/SlowMovie/.SlowMovie/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c source/cpuinfo.c -o build/temp.macosx-13-arm64-cpython-311/source/cpuinfo.o
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/halilsen/dev/SlowMovie/.SlowMovie/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c source/event_gpio.c -o build/temp.macosx-13-arm64-cpython-311/source/event_gpio.o
      source/event_gpio.c:24:10: fatal error: 'sys/epoll.h' file not found
      #include <sys/epoll.h>
               ^~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for RPi.GPIO
  Running setup.py clean for RPi.GPIO
  Building wheel for spidev (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for spidev (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      /private/var/folders/3v/ckpm_vlj201bbnzm78fws4h40000gn/T/pip-build-env-hn86pzqb/overlay/lib/python3.11/site-packages/setuptools/dist.py:476: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!

              ********************************************************************************
              Usage of dash-separated 'description-file' will not be supported in future
              versions. Please use the underscore name 'description_file' instead.

              By 2024-Sep-26, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************

      !!
        opt = self.warn_dash_deprecation(opt, section)
      running bdist_wheel
      running build
      running build_ext
      building 'spidev' extension
      creating build
      creating build/temp.macosx-13-arm64-cpython-311
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/halilsen/dev/SlowMovie/.SlowMovie/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c spidev_module.c -o build/temp.macosx-13-arm64-cpython-311/spidev_module.o
      spidev_module.c:33:10: fatal error: 'linux/spi/spidev.h' file not found
      #include <linux/spi/spidev.h>
               ^~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for spidev
Successfully built omni_epd waveshare-epd
Failed to build IT8951 RPi.GPIO spidev
ERROR: Could not build wheels for IT8951, RPi.GPIO, spidev, which is required to install pyproject.toml-based projects
senhalil commented 6 months ago

🤦