Python 2 now has idle2, pydoc2 and 2to3-2.7
This also fixes the shebang line of the python3 scripts.
They contain backslashes which we need to escape for sed.
In Python 3.7.2, Windows now uses a venv redirector instead of copying
the interpreter in to the virtualenv. Also this changes the virtualenv
binary path from Scripts to bin to be consistent with the normal POSIX
location.
Signed-off-by: Dan Yeaw <dan@yeaw.me>
We currently patch setuptools itself to not import distutils.msvc9compiler,
which fails because it fails to detect the msvc version and falls back to an unsupported
version 6 and raises.
This doesn't help much in case setuptools is installed through pip which doesn't contain
the fix.
This fixes msvc9compiler.py instead to not fail on import but at the compiler instance creation,
i.e. the point where the version is actually used. The setuptools fix remains for now to make
updates easier.
Fixes#5155
This is also a problem with meson which tries to execute things in the build
directory using the build directory DLLs by prepending those to PATH.
Since meson uses a Python helper the PATH gets updated to include the
system prefix first which makes things link against the installed libraries
instead and fail because symbols are missing.
One of the reasons why this was added in the first place is that Python loads
C extensions in lib-dynload which then can't find the libraries in prefix
(e.g. "import tkinter") if it isn't in PATH.
By moving the prefix at the end of PATH we make both cases work.
Starting with Python 3.8 C extensions will no longer use PATH for loading
DLL dependencies, see https://github.com/python/cpython/pull/12302
so we will have to look into this again then.
HAVE_INET_PTON is hardcoded to 1 in the official Windows build. Since we use autotools
we need to make the check work on Windows.
This makes socket.inet_ntop() and socket.inet_pton() available like with the official build.
Add code at the end of `_sysconfigdata.py` that modifys `build_time_vars` at
module load time with python syntax.
Remove all the sed replaces from PKGBUILD because its hard to review and prone to breakage
Finally a test is added to detect syntax errors next time early on
Fixes https://github.com/msys2/MINGW-packages/issues/5048
https://github.com/python/cpython/pull/9258 changed callproc to
use functions from the internal libffi which we don't use.
Just copy the functions into callproc directly instead.
python uses _POSIX_THREADS to decide if it uses posix or nt threads,
but _POSIX_THREADS get included all the time by header includes
(pthread, unistd) in mingw. This was already patched but py3.7 added a new
header with a similar check which was missing.
This resulted in a mix of ntthread/posix api usage an crashes.