mirror of
git://soft.sys114.com/WiringPi2-Python
synced 2025-12-19 02:58:41 +09:00
Fix for python3
This commit is contained in:
2
Makefile
2
Makefile
@@ -2,7 +2,7 @@ all: bindings
|
||||
python setup.py build
|
||||
|
||||
bindings:
|
||||
swig3.0 -python wiringpi.i
|
||||
swig3.0 -python -threads wiringpi.i
|
||||
|
||||
install:
|
||||
sudo python setup.py install
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
%module wiringpi2
|
||||
|
||||
%{
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
#define PyInt_AS_LONG PyLong_AsLong
|
||||
#define PyString_FromStringAndSize PyBytes_FromStringAndSize
|
||||
#endif
|
||||
|
||||
#include "WiringPi/wiringPi/wiringPi.h"
|
||||
#include "WiringPi/wiringPi/wiringPiI2C.h"
|
||||
#include "WiringPi/wiringPi/wiringPiSPI.h"
|
||||
|
||||
Reference in New Issue
Block a user