Reputation: 955
How can I configure the Python Interpreter build project to build with UCS4 support on Windows? For example, I want to create Python 2.6.9, 64 bits + UCS4 support for Windows.
We want to produce pre-compiled python files (.pyc files) for multiple platforms. Due to our existing build setup we wish to build all the .pyc files on Windows, with those files in turn being distributed for use on other, Unix-like platforms.
So, we need to have various versions of the Python interpreter on Windows - versions that do not exist as an installer package.
I have built Python 2.6.9 32 bits with UCS2 support using Visual Studio and the unmodified Python source tree and Visual Studio project files. I see in pyconfig.h there is #define Py_UNICODE_SIZE 2. However, changing this 2 to a 4 has no effect on the resulting Python Interpreter.
Upvotes: 1
Views: 670
Reputation: 49886
Python uses configure tools to configure the build. If you can't run the configure script, you may want to install cygwin in order to run the configure script. You'll want to pass the flag --enable-unicode=ucs4
to get UCS4, and you'll likely need a number of other flags to get it to work with the microsoft compiler.
Of course, if you can tolerate a cygwin-based version, and install all the necessary cygwin bits to build, you'll be able to build under cygwin without supplying a lot of flags, because configure will auto-detect the necessary settings.
Upvotes: 1