GNOME Bugzilla – Bug 691081
Support py2 and py3 at the same time
Last modified: 2013-01-03 17:20:52 UTC
This patch reworks the build system so that we use the same sources to build both a python2 loader and a python3 loader. The python 2 keeps the same name for backward compatobility, while the py3 one is explicitely called python3. Supporting py2 and py3 in the same build is tricky since the existing autotools support is limited, so we make some assumptions: - there are separate --enable-python2 and --enable-python3 flags, --enable-python has been removed - for py2 we only check the binary and the python2-config tool, while for py3 we use the proper AM_PATH_PYTHON macro - for py2 we manually detect pyexecdir, hopefully with the same logic used by the AM_PATH_PYTHON macro - we do not check for Python.h header anymore since it is not strictly needed and autoconf caching makes it difficult - we build the tests and examples only for python3