Skip to content

Commit

Permalink
Link against libcec.
Browse files Browse the repository at this point in the history
  • Loading branch information
trainman419 committed Oct 20, 2013
1 parent c77d066 commit 91a3731
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ all: cec.so
cec.so: build/lib.linux-x86_64-2.7/cec.so
cp $< $@

build/lib.linux-x86_64-2.7/cec.so: cec.cpp
build/lib.linux-x86_64-2.7/cec.so: cec.cpp setup.py
python setup.py build

test: all
./test.py
.PHONY: test
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from distutils.core import setup, Extension

python_cec = Extension('cec', sources = [ 'cec.cpp' ])
python_cec = Extension('cec', sources = [ 'cec.cpp' ], libraries = [ 'cec' ])

setup(name='cec', version='0.1',
description="Python bindings for libcec",
Expand Down
7 changes: 7 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env python

import cec

adapters = cec.list_adapters()

print adapters

0 comments on commit 91a3731

Please sign in to comment.