diff --git a/.gitmodules b/.gitmodules index 1dbeda0..b0a3891 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "WiringPi"] path = WiringPi - url = https://github.com/wiringPi/WiringPi + url = https://github.com/khadas/WiringPi.git diff --git a/README.rst b/README.rst index 788ead7..362499b 100644 --- a/README.rst +++ b/README.rst @@ -119,7 +119,7 @@ Get/setup repo .. code:: bash - git clone --recursive https://github.com/WiringPi/WiringPi-Python.git + git clone --recursive https://github.com/khadas/WiringPi-Python.git cd WiringPi-Python Don't forget the ``--recursive``; it is required to also pull in the @@ -135,7 +135,12 @@ to the ``gpio`` tool. .. code:: bash - sudo apt-get install python-dev python-setuptools swig wiringpi +python2: + + ``sudo apt-get install python-dev python-setuptools swig`` + +Or python3: + ``sudo apt-get install python3-dev python3-setuptools swig`` Build & install with -------------------- @@ -146,3 +151,26 @@ Or Python 3: ``sudo python3 setup.py install`` +Build debian package +-------------------- + +.. code:: bash + + sudo apt-get update + sudo apt-get install fakeroot python3-all-dev debhelper python3-pip dh-python swig + pip3 install stdeb + ./build-deb.sh + + +Build debian package on Ubuntu 24.04 (Python 3.12) +-------------------------------------------------- + +.. code:: bash + + sudo apt-get update + sudo apt-get install fakeroot python3-all-dev debhelper python3-pip dh-python swig python3-stdeb dwz + sed -i 's/SafeConfigParser/RawConfigParser/g' /usr/lib/python3/dist-packages/stdeb/util.py + ./build-deb.sh + + +You will find debian package in deb_dist. diff --git a/WiringPi b/WiringPi index 093e0a1..ffccb9e 160000 --- a/WiringPi +++ b/WiringPi @@ -1 +1 @@ -Subproject commit 093e0a17a40e064260c1f3233b1ccdf7e4c66690 +Subproject commit ffccb9e728efc98d51f3539f8f814debb7bacbd0 diff --git a/build-deb.sh b/build-deb.sh new file mode 100755 index 0000000..618f294 --- /dev/null +++ b/build-deb.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +git submodule init +git submodule update --remote + +DEBIAN_VER=`cat WiringPi/debian-template/wiringPi/DEBIAN/control | grep Version | awk -F "-" '{print $2}'` + +python3 setup.py --command-packages=stdeb.command sdist_dsc --debian-version $DEBIAN_VER bdist_deb + +echo "" +ls -al deb_dist/*.deb +echo "" diff --git a/setup.cfg b/setup.cfg index 360d7aa..906674a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] author = Philip Howard author_email = phil@gadgetoid.com -url = https://github.com/WiringPi/WiringPi-Python/ +url = https://github.com/khadas/WiringPi-Python/ description = A python interface to WiringPi 2.0 library which allows for easily interfacing with the GPIO pins of the Raspberry Pi. Also supports i2c and SPI. long_description = file:README.rst license = LGPL diff --git a/setup.py b/setup.py index c908da6..95bf23b 100755 --- a/setup.py +++ b/setup.py @@ -60,7 +60,7 @@ def run(self): setup( name = 'wiringpi', - version = '2.46.0', + version = '3.14', ext_modules = [ _wiringpi ], py_modules = ["wiringpi"], install_requires=[],