diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2021-11-19 13:11:59 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2021-11-19 13:11:59 +0100 |
commit | 7837d13c450eaf48dd9b05c60e3c245b3c7ffe9b (patch) | |
tree | ceecf0f8508c4046181babe80459414487a5ae82 /setupinfo.py | |
parent | 982f8d5612925010a12a70748a077af846def6be (diff) | |
download | python-lxml-7837d13c450eaf48dd9b05c60e3c245b3c7ffe9b.tar.gz |
Define LIBXML_STATIC and LIBXSLT_STATIC when linking statically against libxml2/libxslt. This is needed on Windows but shouldn't get in the way otherwise.
https://www.aleksey.com/xmlsec/api/xmlsec-notes-compiling-windows.html
Diffstat (limited to 'setupinfo.py')
-rw-r--r-- | setupinfo.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/setupinfo.py b/setupinfo.py index a44de250..a17bec56 100644 --- a/setupinfo.py +++ b/setupinfo.py @@ -347,6 +347,9 @@ def define_macros(): macros.append(('LXML_UNICODE_STRINGS', '1')) if OPTION_WITH_COVERAGE: macros.append(('CYTHON_TRACE_NOGIL', '1')) + if OPTION_BUILD_LIBXML2XSLT: + macros.append(('LIBXML_STATIC', None)) + macros.append(('LIBXSLT_STATIC', None)) # Disable showing C lines in tracebacks, unless explicitly requested. macros.append(('CYTHON_CLINE_IN_TRACEBACK', '1' if OPTION_WITH_CLINES else '0')) return macros |