diff --git a/mingw-w64-python-icu/001-icu-config.patch b/mingw-w64-python-icu/001-icu-config.patch index 0d3fc7e055..9172cef12c 100644 --- a/mingw-w64-python-icu/001-icu-config.patch +++ b/mingw-w64-python-icu/001-icu-config.patch @@ -1,11 +1,11 @@ ---- PyICU-2.5.orig/setup.py 2019-04-12 21:52:55.795377100 -0400 -+++ PyICU-2.5/setup.py 2019-04-14 22:13:41.983753300 -0400 -@@ -63,7 +63,7 @@ +--- a/setup.py ++++ b/setup.py +@@ -89,7 +89,7 @@ ICU_VERSION = os.environ['ICU_VERSION'] except: try: - ICU_VERSION = check_output(('icu-config', '--version')).strip() + ICU_VERSION = check_output(('sh', 'icu-config', '--version')).strip() + CONFIGURE_WITH_ICU_CONFIG[platform] = True except: try: - ICU_VERSION = check_output(('pkg-config', '--modversion', 'icu-i18n')).strip() diff --git a/mingw-w64-python-icu/002-fix-mingw-build.patch b/mingw-w64-python-icu/002-fix-mingw-build.patch index 32a18bdc3e..7191d24a34 100644 --- a/mingw-w64-python-icu/002-fix-mingw-build.patch +++ b/mingw-w64-python-icu/002-fix-mingw-build.patch @@ -1,7 +1,7 @@ ---- PyICU-2.5.orig/setup.py 2019-04-12 21:52:55.795377100 -0400 -+++ PyICU-2.5/setup.py 2019-04-14 22:08:46.314364100 -0400 -@@ -83,7 +83,7 @@ - 'darwin': True, +--- a/setup.py ++++ b/setup.py +@@ -70,7 +70,7 @@ + 'darwin': False, 'linux': True, 'freebsd': False, # not tested - 'win32': False, # no icu-config @@ -9,7 +9,7 @@ 'sunos5': False, # not tested 'cygwin': False, # not tested } -@@ -92,7 +92,7 @@ +@@ -79,7 +79,7 @@ 'darwin': False, # no pkg-config ? 'linux': True, 'freebsd': False, # not tested @@ -18,7 +18,7 @@ 'sunos5': False, # not tested 'cygwin': False, # not tested } -@@ -101,7 +101,7 @@ +@@ -111,7 +111,7 @@ 'darwin': [], 'linux': [], 'freebsd': ['/usr/local/include'], @@ -27,7 +27,7 @@ 'sunos5': [], 'cygwin': [], } -@@ -107,7 +107,7 @@ +@@ -117,7 +117,7 @@ } if sys.platform == 'win32' and sys.version_info < (3,9): @@ -36,16 +36,16 @@ else: ver_flag = '-D%s="%s"' -@@ -134,7 +134,7 @@ - 'darwin': [], - 'linux': [], +@@ -138,7 +138,7 @@ + 'darwin': ['-std=c++11'], + 'linux': ['-std=c++11'], 'freebsd': ['-std=c++11'], - 'win32': ['/Zc:wchar_t', '/EHsc'], -+ 'win32': [], ++ 'win32': ['-std=c++11'], 'sunos5': ['-std=c++11'], 'cygwin': ['-D_GNU_SOURCE=1', '-std=c++11'], } -@@ -144,7 +144,7 @@ +@@ -148,7 +148,7 @@ 'darwin': ['-O0', '-g', '-DDEBUG'], 'linux': ['-O0', '-g', '-DDEBUG'], 'freebsd': ['-O0', '-g', '-DDEBUG'], @@ -54,7 +54,7 @@ 'sunos5': ['-DDEBUG'], 'cygwin': ['-Og', '-g', '-DDEBUG'], } -@@ -153,7 +153,7 @@ +@@ -157,7 +157,7 @@ 'darwin': [], 'linux': [], 'freebsd': ['-L/usr/local/lib'], @@ -63,7 +63,7 @@ 'sunos5': [], 'cygwin': [], } -@@ -162,7 +162,7 @@ +@@ -166,7 +166,7 @@ 'darwin': [], 'linux': [], 'freebsd': ['icui18n', 'icuuc', 'icudata'], diff --git a/mingw-w64-python-icu/PKGBUILD b/mingw-w64-python-icu/PKGBUILD index b6a7612e16..5c459c8099 100644 --- a/mingw-w64-python-icu/PKGBUILD +++ b/mingw-w64-python-icu/PKGBUILD @@ -6,25 +6,27 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-icu") provides=("${MINGW_PACKAGE_PREFIX}-python3-icu") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-icu") replaces=("${MINGW_PACKAGE_PREFIX}-python3-icu") -pkgver=2.9 -pkgrel=3 +pkgver=2.10.2 +pkgrel=1 pkgdesc="Python extension wrapping the ICU C++ API (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') license=('BSD') -url="https://github.com/ovalhub/pyicu" +url="https://gitlab.pyicu.org/main/pyicu" depends=("${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-icu") -makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools" +makedepends=("${MINGW_PACKAGE_PREFIX}-python-build" + "${MINGW_PACKAGE_PREFIX}-python-installer" + "${MINGW_PACKAGE_PREFIX}-python-setuptools" + "${MINGW_PACKAGE_PREFIX}-python-wheel" "${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -options=('staticlibs' 'strip' '!debug') source=("https://pypi.io/packages/source/P/${_realname}/${_realname}-${pkgver}.tar.gz" 001-icu-config.patch 002-fix-mingw-build.patch) -sha256sums=('3c29d6ce65546157117a1a347a303ecdfcf1a7591ed679fc88cdef4108845878' - '5d2ac5d95096a78b4d853254a199286284df6032c63e716c158c8d049c2cd41e' - '8c24053a15cc8b942cde3418f0376e0ae5261ef7fa0b4986afd2e8236c123d14') +sha256sums=('0c3309eea7fab6857507ace62403515b60fe096cbfb4f90d14f55ff75c5441c1' + '3e0e8155c2301c53b6e78a86a5de14ee3a958533c819bac435719eeb554216a0' + 'cf9b37b4862116a2717639163adb4dc262beb611a0c588e05912ec5943cd1609') prepare() { cd "${srcdir}/${_realname}-${pkgver}" @@ -34,25 +36,21 @@ prepare() { } build() { - CFLAGS+=" -fpermissive" - #export PYICU_CFLAGS="-DPYICU_VER=\"${pkgver}\"" + cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}" + export PYICU_LFLAGS="-L${MINGW_PREFIX}/lib" export PYICU_INCLUDES="${MINGW_PREFIX}/include" export PYICU_LIBRARIES="icuin;icuuc;icudt" - # Build python module - cd "${srcdir}/${_realname}-${pkgver}" - ${MINGW_PREFIX}/bin/python setup.py build + ${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation } package() { - cd "${srcdir}/${_realname}-${pkgver}" + cd "${srcdir}/python-build-${MSYSTEM}" - ${MINGW_PREFIX}/bin/python setup.py install \ - --prefix=${MINGW_PREFIX#\/} \ - --root="${pkgdir}" \ - --optimize=1 \ - --skip-build + MSYS2_ARG_CONV_EXCL="--prefix=" \ + ${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \ + --destdir="${pkgdir}" dist/*.whl install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-icu/COPYING" }