summarylogtreecommitdiffstats
path: root/0022-MINGW-exclude-unix-only-modules.patch
diff options
context:
space:
mode:
authoratomlong2021-08-28 11:19:04 +0800
committeratomlong2021-08-28 13:15:13 +0800
commit89a67c05174951d172252b1db96ff93cc4ec4bcd (patch)
treed8c39fa79b201cf9aea28c51e7446a252ed8fee4 /0022-MINGW-exclude-unix-only-modules.patch
parentcf8d8d8771493a2aa8370ed323d06dc733a84181 (diff)
downloadaur-89a67c05174951d172252b1db96ff93cc4ec4bcd.tar.gz
Update to 3.9.6
Diffstat (limited to '0022-MINGW-exclude-unix-only-modules.patch')
-rw-r--r--0022-MINGW-exclude-unix-only-modules.patch94
1 files changed, 94 insertions, 0 deletions
diff --git a/0022-MINGW-exclude-unix-only-modules.patch b/0022-MINGW-exclude-unix-only-modules.patch
new file mode 100644
index 000000000000..f69bb3c4b8e5
--- /dev/null
+++ b/0022-MINGW-exclude-unix-only-modules.patch
@@ -0,0 +1,94 @@
+From 44e8fbcb587f72cbfb477128f50524cb3c1ad021 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:31 +0530
+Subject: [PATCH 022/N] MINGW exclude unix only modules
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ setup.py | 41 +++++++++++++++++++++++++++++------------
+ 1 file changed, 29 insertions(+), 12 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index b29d23b..5280ea0 100644
+--- a/setup.py
++++ b/setup.py
+@@ -886,13 +886,21 @@ class PyBuildExt(build_ext):
+ if (self.config_h_vars.get('FLOCK_NEEDS_LIBBSD', False)):
+ # May be necessary on AIX for flock function
+ libs = ['bsd']
+- self.add(Extension('fcntl', ['fcntlmodule.c'],
+- libraries=libs))
++ if not MS_WINDOWS:
++ self.add(Extension('fcntl', ['fcntlmodule.c'],
++ libraries=libs))
++ else:
++ self.missing.append('fcntl')
+ # pwd(3)
+- self.add(Extension('pwd', ['pwdmodule.c']))
++ if not MS_WINDOWS:
++ self.add(Extension('pwd', ['pwdmodule.c']))
++ else:
++ self.missing.append('pwd')
+ # grp(3)
+- if not VXWORKS:
++ if not VXWORKS and not MS_WINDOWS:
+ self.add(Extension('grp', ['grpmodule.c']))
++ else:
++ self.missing.append('grp')
+ # spwd, shadow passwords
+ if (self.config_h_vars.get('HAVE_GETSPNAM', False) or
+ self.config_h_vars.get('HAVE_GETSPENT', False)):
+@@ -917,7 +925,10 @@ class PyBuildExt(build_ext):
+
+ # Lance Ellinghaus's syslog module
+ # syslog daemon interface
+- self.add(Extension('syslog', ['syslogmodule.c']))
++ if not MS_WINDOWS:
++ self.add(Extension('syslog', ['syslogmodule.c']))
++ else:
++ self.missing.append('syslog')
+
+ # Python interface to subinterpreter C-API.
+ self.add(Extension('_xxsubinterpreters', ['_xxsubinterpretersmodule.c']))
+@@ -943,7 +954,10 @@ class PyBuildExt(build_ext):
+ self.add(Extension('_csv', ['_csv.c']))
+
+ # POSIX subprocess module helper.
+- self.add(Extension('_posixsubprocess', ['_posixsubprocess.c']))
++ if not MS_WINDOWS:
++ self.add(Extension('_posixsubprocess', ['_posixsubprocess.c']))
++ else:
++ self.missing.append('_posixsubprocess')
+
+ def detect_test_extensions(self):
+ # Python C API test module
+@@ -1125,13 +1139,16 @@ class PyBuildExt(build_ext):
+ # the encryption.
+ return
+
+- if self.compiler.find_library_file(self.lib_dirs, 'crypt'):
+- libs = ['crypt']
+- else:
+- libs = []
++ if not MS_WINDOWS:
++ if self.compiler.find_library_file(self.lib_dirs, 'crypt'):
++ libs = ['crypt']
++ else:
++ libs = []
+
+- self.add(Extension('_crypt', ['_cryptmodule.c'],
+- libraries=libs))
++ self.add(Extension('_crypt', ['_cryptmodule.c'],
++ libraries=libs))
++ else:
++ self.missing.append('_crypt')
+
+ def detect_socket(self):
+ # socket(2)
+--
+2.32.0
+