fivdi / pigpio

Fast GPIO, PWM, servo control, state change notification and interrupt handling with Node.js on the Raspberry Pi
MIT License
948 stars 89 forks source link

add operating system declaration #67

Closed johnslemmer closed 5 years ago

johnslemmer commented 6 years ago

When developing an app on something other than linux NPM will fail more gracefully when pigpio is included in optionalDependencies.

fivdi commented 5 years ago

@johnslemmer I'm sorry for not responding sooner here. I ended up taking a different approach to resolving the issue of it not being possible to install pigpio on non-Linux systems. It should now be possible to install pigpio on non-Linux systems successfully. It will not be possible to use pigpio on non-Linux systems, but the installation should work. This was achieved by modifying binding.gyp rather than package.json. binding.gyp tells gyp that the pigpio C++ code should only be compiled on Linux systems. Note that the appropriate tools like compilers still need to be installed on the non-Linux systems for this to work.