Fix for building new WiringPi from source dist; build simplifications.
diff --git a/MANIFEST.in b/MANIFEST.in
index d252ee2..b146ec8 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,7 +1,6 @@
-graft WiringPi/wiringPi
-graft WiringPi/devLib
+recursive-include WiringPi *.h
include README.md
include LICENSE.txt
-include setup.cfg
-include wiringpi.py
-include wiringpi_wrap.c
+include bindings.i
+include constants.py
+include wiringpi-class.py
diff --git a/README.md b/README.md
index 377a07d..516b8d2 100644
--- a/README.md
+++ b/README.md
@@ -11,59 +11,11 @@
WiringPi implements new functions for managing IO expanders.
-# Quick Build
+# Quick Install
-A quick and dirty build script is supplied to install WiringPi-Python for Python 2 and 3. Just:
+`pip install wiringpi`
-```
-sudo apt-get install wiringpi
-git clone --recursive https://github.com/WiringPi/WiringPi-Python.git
-cd WiringPi-Python
-./build.sh
-```
-
-# Manual Build
-
-## Get/setup repo
-```bash
-git clone --recursive https://github.com/WiringPi/WiringPi-Python.git
-cd WiringPi-Python
-git submodule update --init
-```
-
-## Prerequisites
-To rebuild the bindings
-you **must** first have python-dev, python-setuptools and swig installed. Wiring Pi should also be installed system-wide
-for access to the `gpio` tool.
-```bash
-sudo apt-get install python-dev python-setuptools swig wiringpi
-```
-
-## Build WiringPi
-```bash
-cd WiringPi
-sudo ./build
-```
-
-## Generate Bindings
-
-Return to the root directory of the repository and:
-
-`swig2.0 -python wiringpi.i`
-
-or
-
-`swig3.0 -thread -python wiringpi.i`
-
-## Build & install with
-
-`sudo python setup.py install`
-
-Or Python 3:
-
-`sudo python3 setup.py install`
-
-## Usage
+# Usage
import wiringpi
@@ -112,3 +64,27 @@
**Full details at:**
http://www.wiringpi.com
+
+# Manual Build
+
+## Get/setup repo
+```bash
+git clone --recursive https://github.com/WiringPi/WiringPi-Python.git
+cd WiringPi-Python
+```
+
+## Prerequisites
+To rebuild the bindings
+you **must** first have python-dev, python-setuptools and swig installed. Wiring Pi should also be installed system-wide
+for access to the `gpio` tool.
+```bash
+sudo apt-get install python-dev python-setuptools swig wiringpi
+```
+
+## Build & install with
+
+`sudo python setup.py install`
+
+Or Python 3:
+
+`sudo python3 setup.py install`
diff --git a/build.sh b/build.sh
deleted file mode 100755
index e57689f..0000000
--- a/build.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-swig2.0 -python -threads wiringpi.i
-sudo python setup.py build install
-sudo python test.py
diff --git a/setup.cfg b/setup.cfg
index b88034e..c68c02d 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,2 +1,7 @@
[metadata]
-description-file = README.md
+author = Philip Howard
+author_email = phil@gadgetoid.com
+url = https://github.com/WiringPi/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.md
+license = LGPL
diff --git a/setup.py b/setup.py
index 9e40f3e..542a08c 100755
--- a/setup.py
+++ b/setup.py
@@ -1,13 +1,17 @@
#!/usr/bin/env python
-from setuptools import setup, find_packages, Extension
+from setuptools import setup, Extension
from glob import glob
sources = glob('WiringPi/devLib/*.c')
sources += glob('WiringPi/wiringPi/*.c')
-sources += ['wiringpi_wrap.c']
+sources += ['wiringpi.i']
-sources.remove('WiringPi/devLib/piFaceOld.c')
+try:
+ sources.remove('WiringPi/devLib/piFaceOld.c')
+except ValueError:
+ # the file is already excluded in the source distribution
+ pass
_wiringpi = Extension(
'_wiringpi',
@@ -18,16 +22,8 @@
setup(
name = 'wiringpi',
- version = '2.44',
- author = "Philip Howard",
- author_email = "phil@gadgetoid.com",
- url = 'https://github.com/WiringPi/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=open('README.md').read(),
+ version = '2.44.2',
ext_modules = [ _wiringpi ],
py_modules = ["wiringpi"],
install_requires=[],
- headers=glob('WiringPi/wiringPi/*.h')+glob('WiringPi/devLib/*.h')
)