diff --git a/mingw-w64-python-pywin32/001-compile-and-setup-fixes.patch b/mingw-w64-python-pywin32/001-compile-and-setup-fixes.patch index 881c4a0ffad2a..a79a215b6473d 100644 --- a/mingw-w64-python-pywin32/001-compile-and-setup-fixes.patch +++ b/mingw-w64-python-pywin32/001-compile-and-setup-fixes.patch @@ -1,21 +1,31 @@ diff -aur 000/setup.py 001/setup.py --- 000/setup.py 2015-04-09 21:00:48.725278100 -0300 +++ 001/setup.py 2015-04-09 21:02:02.350399800 -0300 -@@ -224,7 +224,7 @@ - # languishing and will probably never be fixed for Python 2.6... - if sys.version_info > (2,6): - from distutils.spawn import spawn -- from distutils.msvc9compiler import MSVCCompiler -+ from distutils.msvccompiler import MSVCCompiler - MSVCCompiler._orig_spawn = MSVCCompiler.spawn - MSVCCompiler._orig_link = MSVCCompiler.link - -@@ -293,7 +293,7 @@ - MSVCCompiler.link = monkeypatched_link - - --sdk_dir = find_platform_sdk_dir() -+sdk_dir = '' +@@ -173,8 +173,8 @@ + # to prevent the extension from loading. For more details, see + # http://bugs.python.org/issue7833 (which has landed for Python 2.7 and on 3.2 + # and later, which are all we care about currently) +-from distutils.msvc9compiler import MSVCCompiler ++from distutils.msvc9compiler import MSVCCompiler + MSVCCompiler._orig_spawn = MSVCCompiler.spawn + MSVCCompiler._orig_link = MSVCCompiler.link + + +@@ -300,16 +300,7 @@ + MSVCCompiler.link = monkeypatched_link + + +-sdk_info = find_platform_sdk_dir() +-if not sdk_info: +- print() +- print("It looks like you are trying to build pywin32 in an environment without") +- print("the necessary tools installed. It's much easier to grab binaries!") +- print() +- print("Please read the docstring at the top of this file, or read README.md") +- print("for more information.") +- print() +- raise RuntimeError("Can't find the Windows SDK") ++sdk_info = { 'include': '', 'lib': '' } class WinExt (Extension): # Base class for all win32 extensions, with some predefined @@ -64,9 +74,9 @@ diff -aur 000/setup.py 001/setup.py + if self.mingw32: + self.compiler.shared_lib_extension = '.dll' + - if sdk_dir: - self._fixup_sdk_dirs() - + self._fixup_sdk_dirs() + + # Here we hack a "pywin32" directory (one of 'win32', 'win32com', @@ -1226,7 +1233,7 @@ # XXX This has to be changed for mingw32 # Get the .lib files we need. This is limited to pywintypes, @@ -88,7 +98,7 @@ diff -aur 000/setup.py 001/setup.py @@ -1652,7 +1659,7 @@ sources = info[4].split() extra_compile_args = [] - ext = WinExt_win32(name, + ext = WinExt_win32(name, - libraries=lib_names, + libraries=(lib_names + ' pywintypes27'), extra_compile_args = extra_compile_args, diff --git a/mingw-w64-python-pywin32/PKGBUILD b/mingw-w64-python-pywin32/PKGBUILD index 9831b4870357a..5b9890cfa53c5 100644 --- a/mingw-w64-python-pywin32/PKGBUILD +++ b/mingw-w64-python-pywin32/PKGBUILD @@ -6,25 +6,27 @@ url='https://sourceforge.net/projects/pywin32' pkgdesc='Python for Windows Extensions (mingw-w64)' license=('PSF') arch=('any') -pkgver=219 +pkgver=224 pkgrel=1 -makedepends=(${MINGW_PACKAGE_PREFIX}-python2 ${MINGW_PACKAGE_PREFIX}-python3 rsync) +makedepends=(${MINGW_PACKAGE_PREFIX}-python2 ${MINGW_PACKAGE_PREFIX}-python2-setuptools + ${MINGW_PACKAGE_PREFIX}-python3 ${MINGW_PACKAGE_PREFIX}-python3-setuptools + rsync) pkgbase=mingw-w64-python-${_realname} pkgname=(${MINGW_PACKAGE_PREFIX}-python2-${_realname} ${MINGW_PACKAGE_PREFIX}-python3-${_realname}) -source=("https://prdownloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.zip" +source=("https://github.com/mhammond/${_realname}/archive/b${pkgver}.zip" 001-compile-and-setup-fixes.patch) -sha256sums=('30c3dbcd45d0c126ad9102d4bbcdeb6b9846869d0b1721faa4f8c9b563ccdb49' - '522e2bc33d439eb539252416162169f42f1703195edb53540a4bef2d24bbaca7') +sha256sums=('fa01a3b9f5e6afd0412013b216d40120b92bbc575dbb3d1a0afb45d8bc1c88d8' + '7a81918338f3cf419fee4a7363dd673c5825efad3e01d8fb11c84a982be84cc9') prepare() { - cd "${srcdir}/${_realname}-${pkgver}" + cd "${srcdir}/${_realname}-b${pkgver}" patch -p1 < "${startdir}"/001-compile-and-setup-fixes.patch } build() { for _python in python2 python3; do msg2 "Synchronizing ${_python} build directory" - rsync --recursive --times "${srcdir}/${_realname}-${pkgver}"/* "${srcdir}/build-${_python}-${CARCH}-${_realname}-${pkgver}" + rsync --recursive --times "${srcdir}/${_realname}-b${pkgver}"/* "${srcdir}/build-${_python}-${CARCH}-${_realname}-${pkgver}" cd "${srcdir}/build-${_python}-${CARCH}-${_realname}-${pkgver}" CFLAGS="-Wno-narrowing -fno-operator-names -fpermissive" \ LIB="${MINGW_PREFIX}/lib:${MINGW_PREFIX}/${CARCH}-w64-mingw32/lib" \