-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
99 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python2 | ||
# Some Angstrom images are missing the py_compile module; get it if not | ||
# present: | ||
# Fix credit:https://github.com/alexanderhiam/PyBBIO/blob/master/setup.py | ||
import random, os | ||
python_lib_path = random.__file__.split('random')[0] | ||
if not os.path.exists(python_lib_path + 'py_compile.py'): | ||
print "py_compile module missing; installing to %spy_compile.py" %\ | ||
python_lib_path | ||
import urllib2 | ||
url = "http://hg.python.org/cpython/raw-file/4ebe1ede981e/Lib/py_compile.py" | ||
py_compile = urllib2.urlopen(url) | ||
with open(python_lib_path+'py_compile.py', 'w') as f: | ||
f.write(py_compile.read()) | ||
print "testing py_compile..." | ||
try: | ||
import py_compile | ||
print "py_compile installed successfully" | ||
except Exception, e: | ||
print "*py_compile install failed, could not import" | ||
print "*Exception raised:" | ||
raise e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,3 @@ | ||
# Some Angstrom images are missing the py_compile module; get it if not | ||
# present: | ||
# Fix credit:https://github.com/alexanderhiam/PyBBIO/blob/master/setup.py | ||
import random, os | ||
python_lib_path = random.__file__.split('random')[0] | ||
if not os.path.exists(python_lib_path + 'py_compile.py'): | ||
print "py_compile module missing; installing to %spy_compile.py" %\ | ||
python_lib_path | ||
import urllib2 | ||
url = "http://hg.python.org/cpython/raw-file/4ebe1ede981e/Lib/py_compile.py" | ||
py_compile = urllib2.urlopen(url) | ||
with open(python_lib_path+'py_compile.py', 'w') as f: | ||
f.write(py_compile.read()) | ||
print "testing py_compile..." | ||
try: | ||
import py_compile | ||
print "py_compile installed successfully" | ||
except Exception, e: | ||
print "*py_compile install failed, could not import" | ||
print "*Exception raised:" | ||
raise e | ||
|
||
try: | ||
from overlays import builder | ||
builder.compile() | ||
|
@@ -35,15 +13,14 @@ | |
'Operating System :: POSIX :: Linux', | ||
'License :: OSI Approved :: MIT License', | ||
'Intended Audience :: Developers', | ||
'Programming Language :: Python :: 2.6', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Topic :: Software Development', | ||
'Topic :: Home Automation', | ||
'Topic :: System :: Hardware'] | ||
|
||
setup(name = 'Adafruit_BBIO', | ||
version = '0.0.20', | ||
version = '0.0.30', | ||
author = 'Justin Cooper', | ||
author_email = '[email protected]', | ||
description = 'A module to control BeagleBone IO channels', | ||
|
@@ -54,7 +31,7 @@ | |
classifiers = classifiers, | ||
packages = find_packages(), | ||
py_modules = ['Adafruit_I2C'], | ||
ext_modules = [Extension('Adafruit_BBIO.GPIO', ['source/py_gpio.c', 'source/event_gpio.c', 'source/constants.c', 'source/common.c'], extra_compile_args=['-Wno-format-security']), | ||
ext_modules = [Extension('Adafruit_BBIO.GPIO', ['source/py_gpio.c', 'source/event_gpio.c', 'source/constants.c', 'source/common.c'], extra_compile_args=['-Wno-format-security']), | ||
Extension('Adafruit_BBIO.PWM', ['source/py_pwm.c', 'source/c_pwm.c', 'source/constants.c', 'source/common.c'], extra_compile_args=['-Wno-format-security']), | ||
Extension('Adafruit_BBIO.ADC', ['source/py_adc.c', 'source/c_adc.c', 'source/constants.c', 'source/common.c'], extra_compile_args=['-Wno-format-security']), | ||
Extension('Adafruit_BBIO.SPI', ['source/spimodule.c', 'source/constants.c', 'source/common.c'], extra_compile_args=['-Wno-format-security']), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters