meta-sunxi/recipes-devtools/python/files/setup.py.patch
Jens Lucius 339dc8af45 python: added pyA20 for controlling GPIO
pyA20 allows controlling GPIO, SPI and I2C on Allwinner boards from python.
Although it is named A20 it should work on A10, A13 and other CPUs.
Provided by Olimex for their boards but should work for others as well.
Tested on A20-OLinuXino-MICRO.

Signed-off-by: Jens Lucius <info@jenslucius.com>
2014-11-28 09:22:02 +01:00

52 lines
1.9 KiB
Diff

--- pyA20-0.2.0/setup.py 2014-09-04 12:17:18.000000000 +0200
+++ pyA20-0.2.0/setup.py 2014-11-24 17:44:37.000000000 +0100
@@ -43,31 +43,31 @@
Detect processor type
:return:
"""
- cpuinfo = open("/proc/cpuinfo", 'r')
- for line in cpuinfo:
- if "Hardware" in line:
- processor = line.split(":")[1].rstrip()
+ #cpuinfo = open("/proc/cpuinfo", 'r')
+ #for line in cpuinfo:
+ # if "Hardware" in line:
+ # processor = line.split(":")[1].rstrip()
- if "sun4i" in processor:
- print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A10)")
+ # if "sun4i" in processor:
+ # print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A10)")
- elif "sun5i" in processor:
- print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A13)")
+ # elif "sun5i" in processor:
+ # print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A13)")
- elif "sun7i" in processor:
- print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A20)")
+ # elif "sun7i" in processor:
+ # print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A20)")
- else:
- print ("Detected processor: " + print_color("unknown"))
+ # else:
+ # print ("Detected processor: " + print_color("unknown"))
- if processor_type not in processor:
- print_warning()
+ # if processor_type not in processor:
+ # print_warning()
- return
+ return
- print ("No processor detected")
- print_warning()
+ #print ("No processor detected")
+ #print_warning()
class build_ext(_build_ext):