Commit Graph

132 Commits

Author SHA1 Message Date
Alexey Pavlov
0ab6b3b9a0 python{2,3}: Rebuild with pdcurses 2019-05-28 11:57:54 +03:00
Christoph Reiter
8a162525a7 python: better compatibility with unpatched setuptools. Fixes #5155
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
2019-04-21 16:40:58 +02:00
Christoph Reiter
0f597c3bb0 python3: append prefix to PATH instead of prepending it. Fixes #5146
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.
2019-04-16 23:49:48 +02:00
Alexey Pavlov
ea45e57abc python3: Update to 3.7.3 2019-04-16 08:44:55 +03:00
Christoph Reiter
91a728c082 python3: fix HAVE_INET_PTON configure check on Windows. Fixes #5184
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.
2019-04-13 17:56:50 +02:00
Алексей
ab5330dd37 Revert "Revert "python3: Improve patching _sysconfigdata.py"" 2019-03-19 10:02:39 +03:00
Алексей
f8b5c1212f Revert "python3: Improve patching _sysconfigdata.py" 2019-03-18 15:13:13 +03:00
Philipp Hörist
a403fbaa9b python3: Improve patching _sysconfigdata.py
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
2019-03-17 11:31:56 +01:00
Alexey Pavlov
20a5734777 python3: Update to 3.7.2 2018-12-25 08:58:30 +03:00
Christoph Reiter
32ad463f76 python3: fix ctypes module build. Fixes #4572 (#4575)
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.
2018-10-21 21:58:09 +03:00
Christoph Reiter
5d5eb4b85a python3: fix checksum
I always forget..
2018-10-21 19:57:29 +02:00
Christoph Reiter
e73064270e python3: add a ctypes import to the tests
the last build is missing ctypes, this makes it easier to detect it early next time
2018-10-21 19:54:42 +02:00
Alexey Pavlov
685e2cafa7 python3: Update o 3.7.1 2018-10-21 11:23:57 +03:00
Christoph Reiter
2155c280d4 python3: revert openssl fix, no longer needed (#4476)
* Revert "python3: fix openssl build checks (#4462)"

This reverts commit 6c2bb843f8.

* python3: bump pkgrel
2018-09-27 21:17:48 +03:00
Christoph Reiter
6c2bb843f8 python3: fix openssl build checks (#4462)
openssl no longer includes windows.h and requires the user to do so first.
2018-09-25 23:29:50 +03:00
Alexey Pavlov
391ba3179a openssl 1.1.x rebuilds 2018-09-25 07:41:07 +03:00
Alexey Pavlov
694ef05b27 python3: Fix user site location 2018-08-03 14:55:26 +03:00
Christoph Reiter
b843352b2c python3: fix python3-config handling of multiple arguments (#4118)
"python3-config --ldflags --cflags" doesn't return anything because
"$*" results in one string, not sure why this was changed in the first place.

Switch it back to "$@" which expands to multiple words.

Noticed because I wondered why this patch is needed on Windows only:
https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-gobject-introspection/0055-fix-python-detection.patch
2018-07-28 15:51:00 +03:00
Alexey Pavlov
72041ca33c python3: Make sysconfig relocatable. Patch 000 do it only partially 2018-07-14 12:56:19 +03:00
Alexey Pavlov
65174a16e0 python3: Fix loading classes from sibling files 2018-07-13 15:38:07 +03:00
Alexey Pavlov
20f13ad8ff python3: Unify getpath module for detecting absolute path for Windows
and Unix
2018-07-12 21:19:30 +03:00
Alexey Pavlov
ec7e6dae7f python3: commit missing patch 2018-07-12 18:40:28 +03:00
Alexey Pavlov
357d52eb06 python3: Add back PyGetSepA and fix invoke in traceback. More fixes for getpath module. Fix warnings 2018-07-12 15:05:57 +03:00
Alexey Pavlov
1b3b2f52ca python3: More general fixes for NT vs POSIX threads 2018-07-09 14:29:26 +03:00
Christoph Reiter
c054d829f0 python3: undef _POSIX_THREADS in one more place; switch back to nt-threads
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.
2018-07-07 09:32:43 +02:00
Alexey Pavlov
21de383ca7 python3: Remove extra entry from modules search paths. Drop unused
function
2018-07-06 23:39:20 +03:00
Christoph Reiter
7f63602920 python3: fix checksums
oops..
2018-07-06 17:46:42 +02:00
Christoph Reiter
fbca0b8b73 python3: Fix _PyIsSelectable_fd(). See #4048
It should always return true under Windows but used _MSC_VER to check for that.
This fixes nonblocking sockets (or when used with a timeout).
2018-07-06 17:33:23 +02:00
Christoph Reiter
0b2ca8a09b python3: add one more is_cygpty() check to isatty()
With 3.6 this used some other API which already used is_cygpty() but now
uses isatty() directly.

This fixes the interactive prompt under mintty.
2018-07-06 15:03:43 +02:00
Christoph Reiter
457a2fe523 python3: don't build the readline module (#4051)
The official CPython doesn't either on Windows.
One less thing to care about.
2018-07-06 15:13:38 +03:00
Alexey Pavlov
2ee64da925 python3: Fix dependencies. Remove extra code 2018-07-06 11:01:45 +03:00
Алексей
edc01d04d6 Update python to 3.7.0 (#4047)
* 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
2018-07-06 09:57:52 +03:00
Jeroen Ooms
ea2788bb38 python3: fix typos (#3903) 2018-06-07 07:45:01 +03:00
Alexey Pavlov
44ae786b75 python3: Apply patches with messages 2018-05-04 08:03:28 +03:00
Alexey Pavlov
0104255da0 python3: Update to 3.6.5 2018-04-16 10:51:53 +03:00
Christoph Reiter
7d9dec05dd python3: include official .rc files for the dlls/execs. See #3139 (#3310)
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)
2018-01-23 12:24:19 +03:00
Alexey Pavlov
18dbeae777 python3: Update to 3.6.4 2017-12-21 11:17:44 +03:00
Christoph Reiter
65d2264f48 python3: Disable broken gdbm module (#3064)
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.
2017-10-20 09:31:35 +03:00
Christoph Reiter
aebcb31d18 python3: Update to 3.6.3 (#3012) 2017-10-05 07:16:35 +03:00
K.Takata
7b9be58500 python2,3: Update iscygpty (#2836)
Fix potential buffer overflow.
2017-09-03 21:45:18 +03:00
Christoph Reiter
eaa55b62c2 python3: Use is_cygpty() to detect a terminal; disable readline with a real Windows console (#2675)
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
2017-08-14 13:41:05 +03:00
Christoph Reiter
c08a79ec63 python3: Update to 3.6.2 (#2700) 2017-08-13 00:26:27 +03:00
Christoph Reiter
3f6c286d6a python3: Make multiprocessing.Queue work; Add some tests. Fixes #837 (#2619)
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.
2017-06-26 07:02:42 +03:00
Christoph Reiter
9d5fdcc956 python3: Update to 3.6.2rc1 (#2599) 2017-06-19 11:59:14 +03:00
Christoph Reiter
9757046077 python3: Update to 3.6.1 (#2587)
* 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
2017-06-15 17:40:51 +03:00
Alexey Pavlov
be533f846c python3: Rebuild. 2017-04-10 08:19:39 +03:00
Nikolay Polyarniy
142833ed75 python3: segfault fix in GetTickCount64 (#2337)
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.
2017-04-10 07:30:20 +03:00
Alexey Pavlov
8081fcd018 python3: Update to 3.5.3 2017-02-27 09:39:55 +03:00
Alexey Pavlov
a911df0cf0 python2,3: Rebuild. Fix patches checksum 2016-11-07 14:53:05 +03:00
Andrew Dutcher
40fca6cbff Python: Fixed patch for distutils.util.change_root to account for case when neither path has a drive letter (#1899) 2016-11-06 20:26:44 +03:00