[libxml2/python3-windows: 3/5] tstmem.py: Try importing from libxmlmods.libxml2mod if needed
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2/python3-windows: 3/5] tstmem.py: Try importing from libxmlmods.libxml2mod if needed
- Date: Thu, 18 Nov 2021 10:47:54 +0000 (UTC)
commit 08c32ea3b9d1e191612fa46c20de3169a16d5ed5
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Jul 22 14:46:48 2021 +0800
tstmem.py: Try importing from libxmlmods.libxml2mod if needed
Distutils builds place libxml2mod.pyd under the libxmlmods subdir, so try this
directory if 'import libxml2mod' failed.
python/tests/tstmem.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/python/tests/tstmem.py b/python/tests/tstmem.py
index 6b34cf38..4e339912 100755
--- a/python/tests/tstmem.py
+++ b/python/tests/tstmem.py
@@ -1,6 +1,11 @@
#!/usr/bin/python -u
import libxml2
-import libxml2mod
+
+try:
+ import libxml2mod
+except ModuleNotFoundError:
+ from libxmlmods import libxml2mod
+
import sys
def error(msg, data):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]