python-pywin32: enable clangarm64
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--- pywin32-b304-orig/setup.py 2022-05-02 15:48:48.000000000 +0800
|
||||
+++ pywin32-b304/setup.py 2022-11-06 03:52:44.815094500 +0800
|
||||
+++ pywin32-b304/setup.py 2022-12-30 22:54:05.942789300 +0800
|
||||
@@ -83,6 +83,9 @@
|
||||
from setuptools.command.build_ext import build_ext
|
||||
from distutils.command.build import build
|
||||
@@ -45,7 +45,7 @@
|
||||
if self.pch_header:
|
||||
self.extra_compile_args = self.extra_compile_args or []
|
||||
|
||||
@@ -353,6 +364,59 @@
|
||||
@@ -353,6 +364,62 @@
|
||||
if found_mfc:
|
||||
break
|
||||
|
||||
@@ -57,9 +57,12 @@
|
||||
+ # MinGW-w64 doesn't define these.
|
||||
+ self.extra_compile_args.append("-D__WIN32__")
|
||||
+ # Extra compile args
|
||||
+ if "64 bit" in sys.version:
|
||||
+ if "AMD64" in sys.version:
|
||||
+ self.extra_compile_args.append("-D_M_X64") # pythoncom & win32ui
|
||||
+ self.extra_compile_args.append("-D_AMD64_") # mapi
|
||||
+ if "ARM64" in sys.version:
|
||||
+ self.extra_compile_args.append("-D_M_ARM64") # pythoncom & win32ui
|
||||
+ self.extra_compile_args.append("-D_ARM64_") # mapi
|
||||
+ else:
|
||||
+ self.extra_compile_args.append("-D_M_IX86") # pythoncom & win32ui
|
||||
+ self.extra_compile_args.append("-D_X86_") # mapi
|
||||
@@ -105,7 +108,7 @@
|
||||
self.extra_compile_args.append("-DUNICODE")
|
||||
self.extra_compile_args.append("-D_UNICODE")
|
||||
self.extra_compile_args.append("-DWINNT")
|
||||
@@ -362,6 +426,19 @@
|
||||
@@ -362,6 +429,19 @@
|
||||
def __init__(self, name, **kw):
|
||||
kw.setdefault("extra_compile_args", []).extend(["-D_AFXDLL", "-D_AFXEXT"])
|
||||
|
||||
@@ -125,7 +128,7 @@
|
||||
WinExt.__init__(self, name, **kw)
|
||||
|
||||
def get_pywin32_dir(self):
|
||||
@@ -372,7 +449,7 @@
|
||||
@@ -372,7 +452,7 @@
|
||||
def finalize_options(self, build_ext):
|
||||
WinExt_pythonwin.finalize_options(self, build_ext)
|
||||
|
||||
@@ -134,7 +137,7 @@
|
||||
self.extra_link_args.append("-mwindows")
|
||||
else:
|
||||
self.extra_link_args.append("/SUBSYSTEM:WINDOWS")
|
||||
@@ -383,6 +460,9 @@
|
||||
@@ -383,6 +463,9 @@
|
||||
|
||||
class WinExt_win32(WinExt):
|
||||
def __init__(self, name, **kw):
|
||||
@@ -144,7 +147,7 @@
|
||||
WinExt.__init__(self, name, **kw)
|
||||
|
||||
def get_pywin32_dir(self):
|
||||
@@ -393,7 +473,7 @@
|
||||
@@ -393,7 +476,7 @@
|
||||
def finalize_options(self, build_ext):
|
||||
WinExt_win32.finalize_options(self, build_ext)
|
||||
|
||||
@@ -153,7 +156,7 @@
|
||||
self.extra_link_args.append("-mconsole")
|
||||
self.extra_link_args.append("-municode")
|
||||
else:
|
||||
@@ -410,6 +490,8 @@
|
||||
@@ -410,6 +493,8 @@
|
||||
class WinExt_win32com(WinExt):
|
||||
def __init__(self, name, **kw):
|
||||
kw["libraries"] = kw.get("libraries", "") + " oleaut32 ole32"
|
||||
@@ -162,7 +165,7 @@
|
||||
|
||||
# COM extensions require later windows headers.
|
||||
if not kw.get("windows_h_version"):
|
||||
@@ -520,9 +602,6 @@
|
||||
@@ -520,9 +605,6 @@
|
||||
# The pywintypes library is created in the build_temp
|
||||
# directory, so we need to add this to library_dirs
|
||||
self.library_dirs.append(self.build_temp)
|
||||
@@ -172,7 +175,7 @@
|
||||
|
||||
self.excluded_extensions = [] # list of (ext, why)
|
||||
self.swig_cpp = True # hrm - deprecated - should use swig_opts=-c++??
|
||||
@@ -1119,6 +1198,418 @@
|
||||
@@ -1119,6 +1201,418 @@
|
||||
return new_sources
|
||||
|
||||
|
||||
@@ -591,7 +594,7 @@
|
||||
class my_install(install):
|
||||
def run(self):
|
||||
install.run(self)
|
||||
@@ -1137,7 +1628,10 @@
|
||||
@@ -1137,7 +1631,10 @@
|
||||
if not self.dry_run and not self.root:
|
||||
# We must run the script we just installed into Scripts, as it
|
||||
# may have had 2to3 run over it.
|
||||
@@ -603,7 +606,7 @@
|
||||
if not os.path.isfile(filename):
|
||||
raise RuntimeError("Can't find '%s'" % (filename,))
|
||||
print("Executing post install script...")
|
||||
@@ -1175,19 +1669,24 @@
|
||||
@@ -1175,19 +1672,24 @@
|
||||
|
||||
|
||||
def my_new_compiler(**kw):
|
||||
@@ -632,7 +635,7 @@
|
||||
|
||||
|
||||
class my_compiler(base_compiler):
|
||||
@@ -1195,7 +1694,8 @@
|
||||
@@ -1195,7 +1697,8 @@
|
||||
# should just rename the file, but a case-only rename is likely to be
|
||||
# worse! This can probably go away once we kill the VS project files
|
||||
# though, as we can just specify the lowercase name in the module def.
|
||||
@@ -642,7 +645,7 @@
|
||||
src_extensions = base_compiler.src_extensions + [".CPP"]
|
||||
|
||||
def link(
|
||||
@@ -1212,7 +1712,8 @@
|
||||
@@ -1212,7 +1715,8 @@
|
||||
*args,
|
||||
**kw,
|
||||
):
|
||||
@@ -652,7 +655,7 @@
|
||||
target_desc,
|
||||
objects,
|
||||
output_filename,
|
||||
@@ -1269,7 +1770,7 @@
|
||||
@@ -1269,7 +1773,7 @@
|
||||
return (e, b)
|
||||
|
||||
sources = sorted(sources, key=key_reverse_mc)
|
||||
@@ -661,7 +664,7 @@
|
||||
|
||||
def spawn(self, cmd):
|
||||
is_link = cmd[0].endswith("link.exe") or cmd[0].endswith('"link.exe"')
|
||||
@@ -1333,6 +1834,12 @@
|
||||
@@ -1333,6 +1837,12 @@
|
||||
|
||||
################################################################
|
||||
|
||||
@@ -674,7 +677,7 @@
|
||||
pywintypes = WinExt_system32(
|
||||
"pywintypes",
|
||||
sources=[
|
||||
@@ -1358,6 +1865,7 @@
|
||||
@@ -1358,6 +1868,7 @@
|
||||
],
|
||||
extra_compile_args=["-DBUILD_PYWINTYPES"],
|
||||
libraries="advapi32 user32 ole32 oleaut32",
|
||||
@@ -682,7 +685,7 @@
|
||||
pch_header="PyWinTypes.h",
|
||||
)
|
||||
|
||||
@@ -1399,7 +1907,7 @@
|
||||
@@ -1399,7 +1910,7 @@
|
||||
("win32cred", "AdvAPI32 credui", 0x0501, "win32/src/win32credmodule.cpp"),
|
||||
(
|
||||
"win32crypt",
|
||||
@@ -691,7 +694,7 @@
|
||||
0x0500,
|
||||
"""
|
||||
win32/src/win32crypt/win32cryptmodule.cpp
|
||||
@@ -1415,7 +1923,7 @@
|
||||
@@ -1415,7 +1926,7 @@
|
||||
),
|
||||
(
|
||||
"win32file",
|
||||
@@ -700,7 +703,7 @@
|
||||
0x0500,
|
||||
"""
|
||||
win32/src/win32file.i
|
||||
@@ -1519,7 +2027,7 @@
|
||||
@@ -1519,7 +2030,7 @@
|
||||
WinExt_win32(
|
||||
"win32evtlog",
|
||||
sources="""
|
||||
@@ -709,7 +712,7 @@
|
||||
""".split(),
|
||||
libraries="advapi32 oleaut32",
|
||||
delay_load_libraries="wevtapi",
|
||||
@@ -1601,6 +2109,13 @@
|
||||
@@ -1601,6 +2112,13 @@
|
||||
"win32com": "com/win32com/src",
|
||||
}
|
||||
|
||||
@@ -723,7 +726,7 @@
|
||||
# The COM modules.
|
||||
pythoncom = WinExt_system32(
|
||||
"pythoncom",
|
||||
@@ -1678,9 +2193,10 @@
|
||||
@@ -1678,9 +2196,10 @@
|
||||
"""
|
||||
% dirs
|
||||
).split(),
|
||||
@@ -735,7 +738,7 @@
|
||||
pch_header="stdafx.h",
|
||||
windows_h_version=0x500,
|
||||
base_address=dll_base_address,
|
||||
@@ -1690,7 +2206,7 @@
|
||||
@@ -1690,7 +2209,7 @@
|
||||
com_extensions += [
|
||||
WinExt_win32com(
|
||||
"adsi",
|
||||
@@ -744,7 +747,7 @@
|
||||
sources=(
|
||||
"""
|
||||
%(adsi)s/adsi.i %(adsi)s/adsi.cpp
|
||||
@@ -2192,6 +2708,7 @@
|
||||
@@ -2192,6 +2711,7 @@
|
||||
"Pythonwin/Win32uiHostGlue.h",
|
||||
"Pythonwin/win32win.h",
|
||||
],
|
||||
@@ -752,7 +755,7 @@
|
||||
optional_headers=["afxres.h"],
|
||||
),
|
||||
WinExt_pythonwin(
|
||||
@@ -2436,6 +2953,9 @@
|
||||
@@ -2436,6 +2956,9 @@
|
||||
win32_extensions + com_extensions + pythonwin_extensions + other_extensions
|
||||
)
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ url='https://github.com/mhammond/pywin32'
|
||||
pkgdesc='Python for Windows Extensions (mingw-w64)'
|
||||
license=('spdx:PSF-2.0')
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
||||
pkgver=304
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
||||
$([[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]] || echo "binutils")
|
||||
@@ -27,7 +27,7 @@ source=(https://github.com/mhammond/${_realname}/archive/b${pkgver}.zip
|
||||
006-mapi-headers-fix.patch
|
||||
010-workaround-broken-add-dll-dir.patch)
|
||||
sha256sums=('aab73a6a0a2723e7d28a78b001cee2a3be641b77268eb947266c49dc053bbe05'
|
||||
'bb44e55d6f8394c4d957f498f4735cb185fd24c3b6c9f50be423cedad47e9f61'
|
||||
'48c5aa6ba50eafa0641defdc25c704e8b228a3cb22ecbadd701763662d4deea5'
|
||||
'20e48668a8afe2a1215658093b3c8416f37b1939cbf73ca416d8fd3793b1b5db'
|
||||
'dceffc82ae87593973970ec7a8204df49e4500eabdfe1b0d9a70fa75d5b1aa54'
|
||||
'75aff3216e0b897c6f87aa7bddba88586ba3bef9d6fb6e18ac49e6b5a5fe3bc7'
|
||||
|
||||
Reference in New Issue
Block a user