We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a2abf9d + d4537ea commit baf3509Copy full SHA for baf3509
1 file changed
iptc/xtables.py
@@ -798,10 +798,14 @@ class XTablesError(Exception):
798
_optind = ct.c_long.in_dll(_libc, "optind")
799
_optarg = ct.c_char_p.in_dll(_libc, "optarg")
800
801
-_lib_xtables, xtables_version = find_library("xtables")
+xtables_version = os.getenv("PYTHON_IPTABLES_XTABLES_VERSION")
802
+if xtables_version:
803
+ _searchlib = "libxtables.so.%s" % (xtables_version,)
804
+else:
805
+ _searchlib = "xtables"
806
+_lib_xtables, xtables_version = find_library(_searchlib)
807
_xtables_libdir = os.getenv("XTABLES_LIBDIR")
808
if _xtables_libdir is None:
- import os.path
809
for xtdir in ["/lib/xtables", "/lib64/xtables", "/usr/lib/xtables",
810
"/usr/lib/iptables", "/usr/lib64/xtables",
811
"/usr/lib64/iptables", "/usr/local/lib/xtables",
0 commit comments