Philip Howard | 567ee00 | 2013-03-27 22:22:00 +0000 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | |
| 3 | from setuptools import setup, find_packages, Extension |
Phil Howard | 60cc642 | 2015-03-11 12:20:54 +0000 | [diff] [blame] | 4 | from glob import glob |
Philip Howard | 567ee00 | 2013-03-27 22:22:00 +0000 | [diff] [blame] | 5 | |
Phil Howard | 3f99ba1 | 2016-02-29 12:12:28 +0000 | [diff] [blame] | 6 | sources = glob('WiringPi/devLib/*.c') |
| 7 | sources += glob('WiringPi/wiringPi/*.c') |
| 8 | sources += ['wiringpi_wrap.c'] |
| 9 | |
| 10 | sources.remove('WiringPi/devLib/piFaceOld.c') |
| 11 | |
Phil Howard | 77ce6cd | 2016-03-09 11:49:38 +0000 | [diff] [blame] | 12 | _wiringpi = Extension( |
| 13 | '_wiringpi', |
Phil Howard | 2204176 | 2014-07-18 11:48:01 +0000 | [diff] [blame] | 14 | include_dirs=['WiringPi/wiringPi','WiringPi/devLib'], |
neuralassembly | 91b71d7 | 2017-03-29 17:25:14 +0900 | [diff] [blame^] | 15 | sources=sources, |
| 16 | extra_link_args=['-lcrypt', '-lrt'] |
Philip Howard | 567ee00 | 2013-03-27 22:22:00 +0000 | [diff] [blame] | 17 | ) |
| 18 | |
| 19 | setup( |
Phil Howard | 77ce6cd | 2016-03-09 11:49:38 +0000 | [diff] [blame] | 20 | name = 'wiringpi', |
neuralassembly | 91b71d7 | 2017-03-29 17:25:14 +0900 | [diff] [blame^] | 21 | version = '2.44', |
Philip Howard | 567ee00 | 2013-03-27 22:22:00 +0000 | [diff] [blame] | 22 | author = "Philip Howard", |
| 23 | author_email = "phil@gadgetoid.com", |
Andrew Scheller | 7526b38 | 2016-02-29 16:54:20 +0000 | [diff] [blame] | 24 | url = 'https://github.com/WiringPi/WiringPi-Python/', |
Philip Howard | 2215ad3 | 2013-03-27 23:04:22 +0000 | [diff] [blame] | 25 | description = """A python interface to WiringPi 2.0 library which allows for |
Philip Howard | 567ee00 | 2013-03-27 22:22:00 +0000 | [diff] [blame] | 26 | easily interfacing with the GPIO pins of the Raspberry Pi. Also supports |
| 27 | i2c and SPI""", |
Phil Howard | a012c71 | 2016-02-28 12:27:52 +0000 | [diff] [blame] | 28 | long_description=open('README.md').read(), |
Phil Howard | 77ce6cd | 2016-03-09 11:49:38 +0000 | [diff] [blame] | 29 | ext_modules = [ _wiringpi ], |
| 30 | py_modules = ["wiringpi"], |
Philip Howard | 567ee00 | 2013-03-27 22:22:00 +0000 | [diff] [blame] | 31 | install_requires=[], |
Phil Howard | 60cc642 | 2015-03-11 12:20:54 +0000 | [diff] [blame] | 32 | headers=glob('WiringPi/wiringPi/*.h')+glob('WiringPi/devLib/*.h') |
Philip Howard | 567ee00 | 2013-03-27 22:22:00 +0000 | [diff] [blame] | 33 | ) |