diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-08-17 18:39:25 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-08-17 18:39:25 (GMT) |
commit | 339d0f720e86dc34837547c90d3003a4a68d7d46 (patch) | |
tree | 2059e5d02f490540e759800b127d50f3fcd8c2b5 /setup.py | |
parent | f75976617bb36c892ee8a0f6a6fd3caddbd38cea (diff) | |
download | cpython-339d0f720e86dc34837547c90d3003a4a68d7d46.zip cpython-339d0f720e86dc34837547c90d3003a4a68d7d46.tar.gz cpython-339d0f720e86dc34837547c90d3003a4a68d7d46.tar.bz2 |
Patch #445762: Support --disable-unicode
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -185,6 +185,11 @@ class PyBuildExt(build_ext): if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' ) + try: + have_unicode = unicode + except NameError: + have_unicode = 0 + # lib_dirs and inc_dirs are used to search for files; # if a file is found in one of those directories, it can # be assumed that no additional -I,-L directives are needed. @@ -235,7 +240,8 @@ class PyBuildExt(build_ext): # Python C API test module exts.append( Extension('_testcapi', ['_testcapimodule.c']) ) # static Unicode character database - exts.append( Extension('unicodedata', ['unicodedata.c']) ) + if have_unicode: + exts.append( Extension('unicodedata', ['unicodedata.c']) ) # access to ISO C locale support exts.append( Extension('_locale', ['_localemodule.c']) ) |