]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Limit sysv_ipc to non-Windows installs
authorMatthew Wilkes <git@matthewwilkes.name>
Mon, 25 Mar 2019 19:53:20 +0000 (19:53 +0000)
committerMatthew Wilkes <git@matthewwilkes.name>
Mon, 25 Mar 2019 19:53:20 +0000 (19:53 +0000)
This dependency is compatible with "most (all?) Unixes", Windows support
is unofficial and only under Cygwin. Cygwin and WSL Python installs have
values of `platform.system()` other than Windows, therefore this prevents
installlation of `sysv_ipc` under standard Windows. This will cause `PulseIn`
to generate import errors on Windows, but as there is no Windows driver this
is likely not a problem. It will, however, allow for dependency resolution
and packaging to work on Windows.

setup.py

index 7663c15e1b50c8421ff4d1ce6b05a34f388dae29..cb3549cb8057373c8fa75661d006e446f6decebb 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -40,7 +40,7 @@ setup(
         "RPi.GPIO; platform_machine=='armv7l' or platform_machine=='armv6l'",
         "rpi_ws281x>=4.0.0; platform_machine=='armv7l' or platform_machine=='armv6l'",
         "spidev; sys_platform=='linux'",
-        "sysv_ipc"
+        "sysv_ipc; platform_system != 'Windows'"
     ],
     license='MIT',
     classifiers=[