1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

add python3.9 check to neopixel install

This commit is contained in:
Dave Conway-Jones 2022-02-24 17:15:43 +00:00
parent 1a7077c938
commit bc73218905
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-pi-neopixel", "name" : "node-red-node-pi-neopixel",
"version" : "1.0.0", "version" : "2.0.0",
"description" : "A Node-RED node to output to a neopixel (ws2812) string of LEDS from a Raspberry Pi.", "description" : "A Node-RED node to output to a neopixel (ws2812) string of LEDS from a Raspberry Pi.",
"dependencies" : { "dependencies" : {
}, },
@ -16,6 +16,7 @@
"neopixel" "neopixel"
], ],
"node-red": { "node-red": {
"version": ">=2.0.0",
"nodes": { "nodes": {
"rpi-neopixels": "neopixel.js" "rpi-neopixels": "neopixel.js"
} }
@ -27,5 +28,6 @@
"name": "Dave Conway-Jones", "name": "Dave Conway-Jones",
"email": "ceejay@vnet.ibm.com", "email": "ceejay@vnet.ibm.com",
"url": "http://nodered.org" "url": "http://nodered.org"
} },
"engines" : { "node" : ">=12.0.0" }
} }

View File

@ -1,7 +1,7 @@
#!/usr/bin/env node #!/usr/bin/env node
var fs = require('fs'); var fs = require('fs');
if (!fs.existsSync('/usr/local/lib/python2.7/dist-packages/unicornhat.py')) { if (!fs.existsSync('/usr/local/lib/python2.7/dist-packages/unicornhat.py') && !fs.existsSync('/usr/local/lib/python3.9/dist-packages/unicornhat.py')) {
console.warn("WARNING : Can't find required python library"); console.warn("WARNING : Can't find required python library");
console.warn("WARNING : Please install using the following command"); console.warn("WARNING : Please install using the following command");
console.warn("WARNING : Note: this uses root..."); console.warn("WARNING : Note: this uses root...");