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.
* Initial python-3.7 port
* python3: Add setup.config.in to remove before patching
* python3: Implement setenv for mingw. Fix building with NT threads. Build
with unicode
* Fix typos
* Fix linking core modules
* Mingw build have exec_prefix
* Remove deprecated patch
* Fix building python and modules. Failing to build readline module and
install not working yet
* More getpath changes and more aggressive path separator conversion
* Fix readline module compilation and linking errors
* python3: By default building with posix threads, NT threads are broken.
Some patches optimization. First buildable commit
* Py_DecodeLocale handle char, not wchar
* Fix building multiprocessing module with posix threads
Use windres to build the resource files and include them in the
dll and executables. Since we need a different resource for the
console/gui version move the creation of the python3w.exe file from
the PKGBUILD into the Makefile.
With a bit of luck this should allow one to opt into the new long paths
feature on Windows 10, like with the official builds.
(no Windows 10 here, can't test)
gdbm is broken and as a result breaks dbm/shelve (dbm.open fails)
Don't include it so the dbm.dumb backend is used instead,
like with the official CPython build.
CPython uses isatty() to detect a terminal and change some settings
like line buffering and interactive mode. Use is_cygpty() to make
this also work under mintty.
See https://github.com/Alexpux/MINGW-packages/issues/2645
This also removes the bash script which forced the interactive mode
when python3 was started without arguments. This is no longer needed as
Python now detects the terminal output and does this automatically.
Also use is_cygpty() to detect when not under mintty and disable the readline
module there, as using it breaks input of certain characters and
leads to errors on shutdown when it tries to save the readline history.
(The readline module is not available in the official Python build)
See https://github.com/Alexpux/MINGW-packages/issues/2656
With non-mingw builds POSIX_SEMAPHORES_NOT_ENABLED is not enabled and
sem_unlink is a no-op. Change it to always be provided on Windows instead.
This adds a minimal test suite which makes it easier to catch regressions
in the future for common MSYS2 related bugs.
* python3: Update to 3.6.1
The patches starting with 16 are new to fix the build.
Some no longer relevant patches were dropped, the rest is just refreshed.
* Bump pkgrel of all packages containing Python 3 bytecode/extensions.
The package list was generated using:
pkgfile.exe -R mingw64 -r "cpython.*\\.(py[cod]|dll)"
* lensfun: Add cmake to makedepends
* numpy: Don't hardcode the Python version
* blender: rebuild for new Python
* boost: Don't hardcode Python versions; rebuild
* pillow: Don't hardcode Python version; rebuild
* python-dateutil: Don't hardcode Python versions
* sip: Don't hardcode Python versions
* pyqt4: Don't hardcode Python versions; rebuild
* pyqt5: Don't hardcode Python versions; rebuild
* opencv: Update Python3 version in patch
On Windows XP SP3 there is no GetTickCount64, current workaround for this problem has a bug: ```GetProcAddress(hKernel32, "GetTickCount64")``` returns ```NULL```, but next if compares result with ```-1``` and so it tries to call function by ```NULL``` address. This leads to segfault.