diff --git a/mingw-w64-wxPython/301-Revert-some-of-python-sip-changes.patch b/mingw-w64-wxPython/301-Revert-some-of-python-sip-changes.patch index ad2306cd3d..a3139d0f79 100644 --- a/mingw-w64-wxPython/301-Revert-some-of-python-sip-changes.patch +++ b/mingw-w64-wxPython/301-Revert-some-of-python-sip-changes.patch @@ -10,89 +10,6 @@ Subject: Revert some of sip via python changes wscript | 7 ++++++ 4 files changed, 38 insertions(+), 27 deletions(-) -diff --git a/build.py b/build.py -index b0c8f122..32891945 100755 ---- a/build.py -+++ b/build.py -@@ -46,7 +46,6 @@ from buildtools.config import Config, msg, opj, posixjoin, loadETG, etg2sip, fi - getVcsRev, runcmd, textfile_open, getSipFiles, \ - getVisCVersion, getToolsPlatformName, updateLicenseFiles, \ - TemporaryDirectory, getMSVCInfo --from buildtools.wxpysip import sip_runner - - import buildtools.version as version - -@@ -89,6 +88,14 @@ wxICON = 'packaging/docset/mondrian.png' - - # Some tools will be downloaded for the builds. These are the versions and - # MD5s of the tool binaries currently in use. -+sipCurrentVersion = '4.19.24' -+sipMD5 = { -+ 'darwin' : '2a22cb7a35eb14384b0829593a366c29', -+ 'win32' : '49e0aa36397d7629fea95418452961fb', -+ 'linux32' : 'ea773f6fd92d5f23530730428a86df2f', -+ 'linux64' : 'b44a45191f5f84db10e2ba1c4cecd8ff', -+} -+ - wafCurrentVersion = '2.0.22' - wafMD5 = 'f2e5880ba4ecd06f7991181bdba1138b' - -@@ -629,6 +636,15 @@ def getTool(cmdName, version, MD5, envVar, platformBinary, linuxBits=False): - - # The download and MD5 check only needs to happen once per run, cache the sip - # cmd value here the first time through. -+_sipCmd = None -+def getSipCmd(): -+ global _sipCmd -+ if _sipCmd is None: -+ _sipCmd = getTool('sip', sipCurrentVersion, sipMD5, 'SIP', True, True) -+ return _sipCmd -+ -+ -+# Same thing for WAF - _wafCmd = None - def getWafCmd(): - global _wafCmd -@@ -1265,30 +1281,15 @@ def cmd_sip(options, args): - if not newer_group(sipFiles, sbf) and os.path.exists(pycode): - continue - -- # Leave it turned off for now. TODO: Experiment with this... -- # pyi_extract = posixjoin(cfg.PKGDIR, base[1:]) + '.pyi' -- pyi_extract = None -- -- # SIP extracts are used to pull python snippets and put them into the -- # module's .py file -- pycode = 'pycode'+base+':'+pycode -- -- sip_runner(src_name, -- abi_version = cfg.SIP_ABI, # siplib abi version -- warnings = True, # enable warning messages -- docstrings = True, # enable the automatic generation of docstrings -- release_gil = True, # always release and reacquire the GIL -- sip_module = 'wx.siplib', # the fully qualified name of the sip module -- sbf_file=sbf, # File to write the generated file lists to -- exceptions = False, # enable support for exceptions -- tracing = cfg.SIP_TRACE, # generate code with tracing enabled -- sources_dir = tmpdir, # the name of the code directory -- extracts = [pycode], # add to the list of extracts to generate -- pyi_extract=pyi_extract, # the name of the .pyi stub file -- include_dirs = [ -- os.path.join(phoenixDir(), 'src'), -- os.path.join(phoenixDir(), 'sip', 'gen'), -- ]) -+ # leave this turned off for now... -+ # typehint = '-y {}'.format(posixjoin(cfg.PKGDIR, base[1:]) + '.pyi') -+ typehint = '' -+ -+ pycode = '-X pycode'+base+':'+pycode -+ sip = getSipCmd() -+ cmd = '%s %s -c %s -b %s %s %s %s' % \ -+ (sip, cfg.SIPOPTS, tmpdir, sbf, pycode, typehint, src_name) -+ runcmd(cmd) - - - classesNeedingClassInfo = { 'sip_corewxTreeCtrl.cpp' : 'wxTreeCtrl', } diff --git a/buildtools/config.py b/buildtools/config.py index 4482ba9d..bc46412a 100644 --- a/buildtools/config.py @@ -133,7 +50,16 @@ diff --git a/wscript b/wscript index 4f0d0bf5..9ec28673 100644 --- a/wscript +++ b/wscript -@@ -302,6 +302,13 @@ def configure(conf): +@@ -33,7 +33,7 @@ + + + def options(opt): +- if isWindows: ++ if False: + opt.load('msvc') + opt.load('compiler_c compiler_cxx') + opt.load('python') +@@ -308,6 +308,13 @@ conf.env.CFLAGS_WXPY.append('-UNDEBUG') conf.env.CXXFLAGS_WXPY.append('-UNDEBUG') @@ -147,4 +73,3 @@ index 4f0d0bf5..9ec28673 100644 # Add basic debug info for all builds conf.env.CFLAGS_WXPY.append('-g') conf.env.CXXFLAGS_WXPY.append('-g') --- diff --git a/mingw-w64-wxPython/PKGBUILD b/mingw-w64-wxPython/PKGBUILD index 7615a1ab50..130cd09bd0 100644 --- a/mingw-w64-wxPython/PKGBUILD +++ b/mingw-w64-wxPython/PKGBUILD @@ -2,11 +2,11 @@ # Contributor: Tim Stahlhut _realname=wxPython -_wx_basever=3.1 +_wx_basever=3.2 pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.1.2a1.dev5434+7d45ee6a -pkgrel=2 +pkgver=4.2.0 +pkgrel=1 pkgdesc="A wxWidgets GUI toolkit for Python (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -19,28 +19,23 @@ depends=("${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-python-six" "${MINGW_PACKAGE_PREFIX}-wxmsw${_wx_basever}") makedepends=("${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-python-build" "${MINGW_PACKAGE_PREFIX}-python-requests" - "${MINGW_PACKAGE_PREFIX}-sip4" + "${MINGW_PACKAGE_PREFIX}-sip" "${MINGW_PACKAGE_PREFIX}-waf" "${MINGW_PACKAGE_PREFIX}-cc" # for waf "python" "python-setuptools") options=('strip' 'staticlibs' 'buildflags') source=(#"https://files.pythonhosted.org/packages/b0/4d/80d65c37ee60a479d338d27a2895fb15bbba27a3e6bb5b6d72bb28246e99/${_realname}-${pkgver}.tar.gz" - "https://wxpython.org/Phoenix/snapshot-builds/${_realname}-${pkgver}.tar.gz" + "https://github.com/wxWidgets/Phoenix/releases/download/${_realname}-${pkgver}/${_realname}-${pkgver}.tar.gz" '201-Remove-obsolete-entries-from-Doxyfile.patch' '301-Revert-some-of-python-sip-changes.patch') -noextract=("${_realname}-${pkgver}.tar.gz") -sha256sums=('9ab0b6a42d6bb6eacd45ba70f0e9940af56e1711596374c72b4a9110761e36db' +sha256sums=('03452bf02f182fae78c030ac12aadedb0c5a5b63257b887dfe5689f028730984' '97b5c9dd353f2c570b7a940585868c1127d10a96a3442cd96706359410494aa8' - '84f836f22f4bbe3f0644040188997fe82ad8db2d4ece6ae081f99d405aff7aa5') + '50feb203bcbee757adb844c970ecadebe3dbbab2114cab88988b79464663347f') prepare() { - plain "Extracting ${_realname}-${pkgver}.tar.gz due to symlink(s) without pre-existing target(s)" - cd "${srcdir}" - [[ -d ${_realname}-${pkgver} ]] && rm -rf ${_realname}-${pkgver} - tar zxf "${srcdir}/${_realname}-${pkgver}.tar.gz" || true - cd "${srcdir}/${_realname}-${pkgver}" rm -f etg/{_,}webkit.py sip/gen/{_,}webkit.sip @@ -65,23 +60,27 @@ build() { SIP="${MINGW_PREFIX}/bin/sip" \ DOXYGEN="${MINGW_PREFIX}/bin/doxygen" \ WX_CONFIG="${MINGW_PREFIX}/bin/wx-config-${_wx_basever}" \ - "${MINGW_PREFIX}/bin/python" build.py \ - --prefix="${MINGW_PREFIX}" --python="${MINGW_PREFIX}/bin/python.exe" \ - --release --use_syswx --no_msedge --nodoc --cairo -vv \ - --no_allmo --no_magic --regenerate_sysconfig \ - dox touch etg sip + ${MINGW_PREFIX}/bin/python -m build \ + --prefix="${MINGW_PREFIX}" --python="${MINGW_PREFIX}/bin/python.exe" \ + --release --use_syswx --no_msedge --nodoc --cairo -vv \ + --no_allmo --no_magic --regenerate_sysconfig \ + dox touch etg sip local _jobs=${MAKEFLAGS:--j1} + # Use MSYS2 Python because, with mingw-w64 Python, waf has issues using + # the wx-config* shell script. MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - CC_NAME=${CC} CXX_NAME=${CXX} \ - LDFLAGS="${LDFLAGS} $(python-config --ldflags)" \ + CC_NAME=${CC} CC="${MINGW_PREFIX}/bin/${CC}.exe" \ + CXX_NAME=${CXX} CXX="${MINGW_PREFIX}/bin/${CXX}.exe" \ + LDFLAGS="${LDFLAGS} $("${MINGW_PREFIX}/bin/python-config" --ldflags)" \ PYTHON_CONFIG="${MINGW_PREFIX}/bin/python-config" \ - "${MINGW_PREFIX}/bin/waf" \ - --prefix="${MINGW_PREFIX}" --python="${MINGW_PREFIX}/bin/python.exe" \ - --check-cxx-compiler=${CXX} --check-c-compiler=${CC} --color=yes --jobs=${_jobs#-j} \ - --wx_config=wx-config-${_wx_basever} \ - --no_magic --nopyc --nopyo --nopycache \ - configure build + /usr/bin/python "${MINGW_PREFIX}/bin/waf" \ + --prefix="${MINGW_PREFIX}" --python="${MINGW_PREFIX}/bin/python.exe" \ + --no_msvc --check-c-compiler=${CC} --check-cxx-compiler=${CXX} \ + --color=yes --jobs=${_jobs#-j} \ + --wx_config="sh.exe ${MINGW_PREFIX}/bin/wx-config-${_wx_basever}" \ + --no_magic --nopyc --nopyo --nopycache \ + configure build } package() {