summaryrefslogtreecommitdiffstats
path: root/package/python-pylibftdi/0001-do-not-use-find-library.patch
diff options
context:
space:
mode:
authorChristian Kellermann <christian.kellermann@solectrix.de>2017-03-01 17:18:39 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-03-05 21:38:45 +0100
commit5b7a53ab8cbe6949f8878aff8b25e5ef589b9eff (patch)
treeba66d79abefc3094213396d75ed9177744fb5850 /package/python-pylibftdi/0001-do-not-use-find-library.patch
parente2ac546c1951ba8a3e88965d3023eb38a9493f28 (diff)
downloadbuildroot-5b7a53ab8cbe6949f8878aff8b25e5ef589b9eff.tar.gz
buildroot-5b7a53ab8cbe6949f8878aff8b25e5ef589b9eff.zip
python-pylibftdi: new package
Adds the python binding for libftdi to buildroot. Signed-off-by: Christian Kellermann <christian.kellermann@solectrix.de> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/python-pylibftdi/0001-do-not-use-find-library.patch')
-rw-r--r--package/python-pylibftdi/0001-do-not-use-find-library.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/package/python-pylibftdi/0001-do-not-use-find-library.patch b/package/python-pylibftdi/0001-do-not-use-find-library.patch
new file mode 100644
index 0000000000..ae8fe2dfad
--- /dev/null
+++ b/package/python-pylibftdi/0001-do-not-use-find-library.patch
@@ -0,0 +1,31 @@
+Hard code library loading
+
+Shortcut the search for the libraries in case the built in
+find_library is broken.
+
+As buildroot does not ship any of the external programs that the core
+procedure use to find libraries use the canonical name of the shared
+object and load it.
+
+In this case this affects loading libftdi and libusb.
+
+This should be reliable as we specify said libs as dependencies of
+this package.
+
+Signed-off-by: Christian Kellermann <christian.kellermann@solectrix.de>
+
+---
+diff -purN pylibftdi-0.15.0.orig/pylibftdi/driver.py pylibftdi-0.15.0/pylibftdi/driver.py
+--- pylibftdi-0.15.0.orig/pylibftdi/driver.py 2015-04-26 22:41:39.000000000 +0200
++++ pylibftdi-0.15.0/pylibftdi/driver.py 2017-02-27 13:08:56.502958000 +0100
+@@ -121,8 +121,8 @@ class Driver(object):
+ lib = getattr(cdll, lib_path)
+ break
+ if lib is None:
+- raise LibraryMissingError('{} library not found (search: {})'.format(
+- name, search_list))
++ return cdll.LoadLibrary(name + '.so')
++
+ return lib
+
+ @property
OpenPOWER on IntegriCloud