python-watchdog: add support for uClibc
PATCH 1/2 python-watchdog: add support for uClibc
From: Yegor Yefremov <[email protected]>
This patch fixes uClibc detection.
--- ...dd-a-workaround-to-support-uClibc-library.patch | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 package/python-watchdog/0001-Add-a-workaround-to-support-uClibc-library.patch
package/python-watchdog/0001-Add-a-workaround-to-support-uClibc-library.patch new file +43 -0
@@ -0,0 +1,43 @@ +From c3b3c4581b25d7e62f5c2ce1484133229d5e657a Mon Sep 17 00:00:00 2001 +From: Yegor Yefremov <[email protected]> +Date: Fri, 16 Feb 2018 13:26:23 +0100 +Subject: [PATCH] Add a workaround to support uClibc library + +uClibc based systems provide only libc.so.0 and libc.so.1 +symlinks. + +So try to find libc.so.0 if neither libc.so nor libc.so.6 +could be found. + +Signed-off-by: Yegor Yefremov <[email protected]> +--- + src/watchdog/observers/inotify_c.py | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/watchdog/observers/inotify_c.py b/src/watchdog/observers/inotify_c.py +index 5f208b6..0dc7b50 100644 +--- a/src/watchdog/observers/inotify_c.py ++++ b/src/watchdog/observers/inotify_c.py +@@ -45,7 +45,19 @@ def _load_libc(): + try: + return ctypes.CDLL('libc.so') + except (OSError, IOError): ++ pass ++ ++ try: + return ctypes.CDLL('libc.so.6') ++ except (OSError, IOError): ++ pass ++ ++ # uClibc ++ try: ++ return ctypes.CDLL('libc.so.0') ++ except (OSError, IOError) as err: ++ raise err ++ + + libc = _load_libc() + +-- +2.1.4 +
Signature · 1 line
2.1.4
PATCH 2/2 python-watchdog: add missing runtime dependency
From: Yegor Yefremov <[email protected]>
Script watchmedo requires python-setuptools.
--- package/python-watchdog/Config.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
package/python-watchdog/Config.in +4 -3
@@ -1,8 +1,9 @@ config BR2_PACKAGE_PYTHON_WATCHDOG bool "python-watchdog" - select BR2_PACKAGE_PYTHON_PYYAML - select BR2_PACKAGE_PYTHON_ARGH - select BR2_PACKAGE_PYTHON_PATHTOOLS + select BR2_PACKAGE_PYTHON_ARGH # runtime + select BR2_PACKAGE_PYTHON_PATHTOOLS # runtime + select BR2_PACKAGE_PYTHON_PYYAML # runtime + select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime help Python API and shell utilities to monitor file system events.
Signature · 1 line
2.1.4
Thomas Petazzoni
AppliedPATCH 2/2 python-watchdog: add missing runtime dependency
Hello,
Quoted 14 lines · yegorslists at googlemail.com
From: Yegor Yefremov <[email protected]>
Script watchmedo requires python-setuptools.
Signed-off-by Yegor Yefremov <[email protected]>--- package/python-watchdog/Config.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)package/python-watchdog/Config.in +0
-0
package/python-watchdog/Config.in line 6
Quoted 9 lines
package/python-watchdog/Config.in +4
-3@@ -1,8 +1,9 @@ config BR2_PACKAGE_PYTHON_WATCHDOG bool "python-watchdog" - select BR2_PACKAGE_PYTHON_PYYAML - select BR2_PACKAGE_PYTHON_ARGH - select BR2_PACKAGE_PYTHON_PATHTOOLS + select BR2_PACKAGE_PYTHON_ARGH # runtime + select BR2_PACKAGE_PYTHON_PATHTOOLS # runtime + select BR2_PACKAGE_PYTHON_PYYAML # runtime + select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime
I applied, but since this dependency is only needed for the watchmedo.py script, does it make sense to make this a mandatory dependency ?
Also, skimming through the watchmedo.py script, I couldn't see what was bringing this dependecny on setuptools. Could you enlighten me (it's mainly for my own curiosity, I trust you when you said it was needed).
Applied, thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/2 python-watchdog: add missing runtime dependency
Quoted 22 lines · Thomas Petazzoni
Hello,
Quoted 19 lines · yegorslists at googlemail.com
From: Yegor Yefremov <[email protected]>
Script watchmedo requires python-setuptools.
Signed-off-by Yegor Yefremov <[email protected]>--- package/python-watchdog/Config.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)package/python-watchdog/Config.in +0
-3@@ -1,8 +1,9 @@ config BR2_PACKAGE_PYTHON_WATCHDOG bool "python-watchdog" - select BR2_PACKAGE_PYTHON_PYYAML - select BR2_PACKAGE_PYTHON_ARGH - select BR2_PACKAGE_PYTHON_PATHTOOLS
Quoted 8 lines
package/python-watchdog/Config.in line 6
Quoted 4 lines
package/python-watchdog/Config.in +4
-0+ select BR2_PACKAGE_PYTHON_ARGH # runtime + select BR2_PACKAGE_PYTHON_PATHTOOLS # runtime + select BR2_PACKAGE_PYTHON_PYYAML # runtime + select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtimeI applied, but since this dependency is only needed for the
watchmedo.pyscript, does it make sense to make this a mandatory dependency ?
We make it already for some other packages like crossbar for example.
Quoted 3 lines
Also, skimming through the
watchmedo.pyscript, I couldn't see what was bringing this dependecny on setuptools. Could you enlighten me (it's mainly for my own curiosity, I trust you when you said it was needed).
The whole entry_points mechanism is described here:
https://stackoverflow.com/a/9615473/1113139
That's why setuptools package is needed on target.
Yegor
Quoted 7 lines
Applied, thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering
https://bootlin.com
PATCH 2/2 python-watchdog: add missing runtime dependency
In reply to yegorslists at googlemail.comQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"yegorslists" == yegorslists <[email protected]> writes:
From: Yegor Yefremov <[email protected]>
Script watchmedo requires python-setuptools.Signed-off-by Yegor Yefremov <[email protected]>
Committed to 2018.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 python-watchdog: add support for uClibc
In reply to yegorslists at googlemail.comHello,
Quoted 9 lines · yegorslists at googlemail.com
From: Yegor Yefremov <[email protected]>
This patch fixes uClibc detection.
Signed-off-by Yegor Yefremov <[email protected]>--- ...dd-a-workaround-to-support-uClibc-library.patch | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 package/python-watchdog/0001-Add-a-workaround-to-support-uClibc-library.patch
Applied to master, thanks. Did you submit this patch upstream ?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/2 python-watchdog: add support for uClibc
Quoted 7 lines · Thomas Petazzoni
Hello,
Quoted 4 lines · yegorslists at googlemail.com
From: Yegor Yefremov <[email protected]>
This patch fixes uClibc detection.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Yegor Yefremov <[email protected]>--- ...dd-a-workaround-to-support-uClibc-library.patch | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 package/python-watchdog/0001-Add-a-workaround-to-support-uClibc-library.patchApplied to master, thanks. Did you submit this patch upstream ?
I'll do this, but the project seems to be abandoned :-(
Yegor
Quoted 5 lines
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering
https://bootlin.com
PATCH 1/2 python-watchdog: add support for uClibc
In reply to yegorslists at googlemail.comQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"yegorslists" == yegorslists <[email protected]> writes:
From: Yegor Yefremov <[email protected]>
This patch fixes uClibc detection.Signed-off-by Yegor Yefremov <[email protected]>
Committed to 2018.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard