[issue8767] Configure: Cannot disable unicode

Stefano Taschini report at bugs.python.org
Fri Apr 27 09:23:18 CEST 2012

Stefano Taschini <taschini at ieee.org> added the comment:

Here's the patch. It has four goals:

   1. Allow ./configure --disable-unicode to work;

   2. Have the naked interpreter running with no unicode support;

   3. Be able to compile most of the stdlib;

   4. Be able to run the test suite.

The one-line modification to configure.ac (and consequentley autoreconf'ed configure) achieve goal 1.

The changes to the three C files (which are nothing more than a few #ifdef Py_USING_UNICODE) achieve goal 2: you can run "./python -S".

The fix for site.py takes care of posixpath, glob, (and a few other modules) and makes it possible to compile most of the C extensions of the stdlib, goal 3 -- The compilation process under posix requires posixpath and glob to work.  The most notable extension that won't be built is, unsurprisingly enough, io. Fortunately it does not play in Python 2.7 the central role it plays in Python 3. Still, a few other modules depend on it and won't be usable.

The changes in Lib/test/script_helper.py and Lib/test/test_support.py make it possible to run the test suite. Roughly one third of the tests will fail, though, but I think that's acceptable. In relation to my purpose for submitting this patch ( #1065986 ) , I note that test_pydoc runs and succeeds.

keywords: +patch
Added file: http://bugs.python.org/file25377/issue8767.patch

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list