Files
MINGW-packages/mingw-w64-python3/0350-MINGW-setup-_multiprocessing-module.patch
Алексей 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

26 lines
1.2 KiB
Diff

diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py
--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:13.307417300 +0300
+++ Python-3.7.0/setup.py 2018-06-30 11:16:13.525817600 +0300
@@ -1584,7 +1584,7 @@
macros = dict()
libraries = ['rt']
- if host_platform == 'win32':
+ if host_platform.startswith(('mingw', 'win')):
multiprocessing_srcs = [ '_multiprocessing/multiprocessing.c',
'_multiprocessing/semaphore.c',
]
@@ -1596,8 +1596,12 @@
sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')):
multiprocessing_srcs.append('_multiprocessing/semaphore.c')
+ multiprocessing_libs = []
+ if host_platform.startswith(('mingw', 'win')):
+ multiprocessing_libs += ['ws2_32']
exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
define_macros=list(macros.items()),
+ libraries=multiprocessing_libs,
include_dirs=["Modules/_multiprocessing"]))
# End multiprocessing