Skip to content

Commit 8fc4995

Browse files
committed
Merge branch 'ninioperdido-master'
2 parents 70a8528 + a7fd107 commit 8fc4995

File tree

2 files changed

+11
-34
lines changed

2 files changed

+11
-34
lines changed

library/Makefile

Lines changed: 0 additions & 24 deletions
This file was deleted.

library/setup.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
#!/usr/bin/env python
22
# Python wrapper for the rpi_ws281x library.
33
# Authors:
4-
# Phil Howard ([email protected])
4+
# Phil Howard ([email protected])
55
# Tony DiCola ([email protected])
66

77
from setuptools import setup, find_packages, Extension
88
from setuptools.command.build_py import build_py
9-
import subprocess
109

1110
class CustomInstallCommand(build_py):
12-
"""Customized install to run library Makefile"""
1311
def run(self):
1412
print("Compiling ws281x library...")
15-
proc =subprocess.Popen(["make"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
16-
print(proc.stderr.read())
1713
build_py.run(self)
1814

1915
setup(name = 'rpi_ws281x',
@@ -26,8 +22,13 @@ def run(self):
2622
url = 'https://github.com/rpi-ws281x/rpi-ws281x-python/',
2723
cmdclass = {'build_py':CustomInstallCommand},
2824
packages = ['rpi_ws281x'],
29-
ext_modules = [Extension('_rpi_ws281x',
30-
sources=['rpi_ws281x_wrap.c'],
31-
include_dirs=['lib/'],
32-
library_dirs=['lib-built/'],
33-
libraries=['ws2811'])])
25+
ext_modules = [Extension('_rpi_ws281x',
26+
include_dirs = ['.'],
27+
sources = ['rpi_ws281x_wrap.c',
28+
'lib/dma.c',
29+
'lib/mailbox.c',
30+
'lib/main.c',
31+
'lib/pcm.c',
32+
'lib/pwm.c',
33+
'lib/rpihw.c',
34+
'lib/ws2811.c'])])

0 commit comments

Comments
 (0)