diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2012-12-21 22:48:02 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2012-12-21 22:48:02 +0100 |
commit | c37f36f2843f0f9c1ef938920b47978d6e28ed4e (patch) | |
tree | afea03f1df470ebb8cda16fc7728d4358e06101e /setupinfo.py | |
parent | 4c6a7f4eba4208cbedc653e3277ebd7dc79b9614 (diff) | |
download | python-lxml-c37f36f2843f0f9c1ef938920b47978d6e28ed4e.tar.gz |
add compile time option for Py2 that makes the API always return Unicode strings for names and text instead of byte strings for pure ASCII
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 ef4fcc48..6316bed3 100644 --- a/setupinfo.py +++ b/setupinfo.py @@ -250,6 +250,8 @@ def define_macros(): macros.append(('WITHOUT_THREADING', None)) if OPTION_WITH_REFNANNY: macros.append(('CYTHON_REFNANNY', None)) + if OPTION_WITH_UNICODE_STRINGS: + macros.append(('LXML_UNICODE_STRINGS', '1')) return macros _ERROR_PRINTED = False @@ -359,6 +361,7 @@ def option_value(name): staticbuild = bool(os.environ.get('STATICBUILD', '')) # pick up any commandline options and/or env variables OPTION_WITHOUT_OBJECTIFY = has_option('without-objectify') +OPTION_WITH_UNICODE_STRINGS = has_option('with-unicode-strings') OPTION_WITHOUT_ASSERT = has_option('without-assert') OPTION_WITHOUT_THREADING = has_option('without-threading') OPTION_WITHOUT_CYTHON = has_option('without-cython') |