python-argon2_cffi: update to 21.1.0
This commit is contained in:
@@ -6,10 +6,10 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=19.2.0
|
||||
_argom2_relname=argon2
|
||||
pkgver=21.1.0
|
||||
_argon2_relname=argon2
|
||||
_argon2_pkgver=20190702
|
||||
pkgrel=3
|
||||
pkgrel=1
|
||||
pkgdesc="CFFI-based Argon2 Bindings for Python (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
@@ -19,14 +19,14 @@ depends=("${MINGW_PACKAGE_PREFIX}-python"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-cffi"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-six")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm")
|
||||
options=('staticlibs' 'strip' '!debug')
|
||||
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/hynek/argon2_cffi/archive/${pkgver}.tar.gz"
|
||||
"${_argom2_relname}-${_argon2_pkgver}.tar.gz"::"https://github.com/P-H-C/phc-winner-argon2/archive/${_argon2_pkgver}.tar.gz"
|
||||
mingw-fixes.patch
|
||||
"${_argon2_relname}-${_argon2_pkgver}.tar.gz"::"https://github.com/P-H-C/phc-winner-argon2/archive/${_argon2_pkgver}.tar.gz"
|
||||
002-mingw-fix-src.patch)
|
||||
sha256sums=('b7ad06a32aba8e795830c0248f8e6c464b7f3037442322937552a5e8b6013b7a'
|
||||
sha256sums=('ba22c9a5531177a7c0d601e0b3aebd62c868da2caff3dc537916835ce29ac88c'
|
||||
'daf972a89577f8772602bf2eb38b6a3dd3d922bf5724d45e7f9589b5e830442c'
|
||||
'5e06a2af6e3da607419b1e1897847f154794d6319683ce190d34d7af7f1be480'
|
||||
'5f0566bb2a1d9a039f667cc35bc0afa803e65863c01765a37c574165f1d8eac1')
|
||||
|
||||
# Helper macros to help make tasks easier #
|
||||
@@ -49,37 +49,33 @@ del_file_exists() {
|
||||
# =========================================== #
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
# include a patch from mingw-w64-argon2 for good measure.
|
||||
pushd "$srcdir/phc-winner-${_argom2_relname}-${_argon2_pkgver}"
|
||||
pushd "$srcdir/phc-winner-${_argon2_relname}-${_argon2_pkgver}"
|
||||
apply_patch_with_msg 002-mingw-fix-src.patch
|
||||
popd
|
||||
pushd "${srcdir}/argon2-cffi-${pkgver}"
|
||||
cp -r ${srcdir}/phc-winner-${_argom2_relname}-${_argon2_pkgver}/* extras/libargon2/
|
||||
apply_patch_with_msg mingw-fixes.patch
|
||||
popd
|
||||
|
||||
rm -rf python-build-${CARCH} | true
|
||||
cp -r "argon2-cffi-${pkgver}" "python-build-${CARCH}"
|
||||
rm -rf python-build-${MSYSTEM} | true
|
||||
cp -r "argon2-cffi-${pkgver}" "python-build-${MSYSTEM}"
|
||||
cp -r phc-winner-${_argon2_relname}-${_argon2_pkgver}/* python-build-${MSYSTEM}/extras/libargon2
|
||||
|
||||
# Set version for setuptools_scm
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
|
||||
}
|
||||
|
||||
build() {
|
||||
msg "Python build for ${CARCH}"
|
||||
cd "${srcdir}/python-build-${CARCH}"
|
||||
msg "Python build for ${MSYSTEM}"
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
${MINGW_PREFIX}/bin/python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
msg "Python test for ${CARCH}"
|
||||
cd "${srcdir}/python-build-${CARCH}"
|
||||
msg "Python test for ${MSYSTEM}"
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
${MINGW_PREFIX}/bin/python setup.py pytest
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/python-build-${CARCH}"
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
|
||||
--root="${pkgdir}" --optimize=1 --skip-build
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
--- argon2_cffi-18.3.0/setup.py.orig 2018-08-19 07:46:22.000000000 -0400
|
||||
+++ argon2_cffi-18.3.0/setup.py 2019-01-02 06:45:23.449755000 -0500
|
||||
@@ -43,7 +43,8 @@ sources = [
|
||||
|
||||
# Add vendored integer types headers if necessary.
|
||||
windows = "win32" in str(sys.platform).lower()
|
||||
-if windows:
|
||||
+is_mingw = ('GCC' in sys.version)
|
||||
+if windows and (not is_mingw):
|
||||
int_base = "extras/msinttypes/"
|
||||
inttypes = int_base + "inttypes"
|
||||
stdint = int_base + "stdint"
|
||||
@@ -318,14 +319,24 @@ class BuildCLibWithCompilerFlags(build_c
|
||||
# files in a temporary build directory.)
|
||||
macros = build_info.get("macros")
|
||||
include_dirs = build_info.get("include_dirs")
|
||||
- objects = self.compiler.compile(
|
||||
- sources,
|
||||
- extra_preargs=["-msse2"] if optimized and not windows else [],
|
||||
- output_dir=self.build_temp,
|
||||
- macros=macros,
|
||||
- include_dirs=include_dirs,
|
||||
- debug=self.debug,
|
||||
- )
|
||||
+ if is_mingw:
|
||||
+ objects = self.compiler.compile(
|
||||
+ sources,
|
||||
+ extra_preargs=["-msse2"] if optimized else [],
|
||||
+ output_dir=self.build_temp,
|
||||
+ macros=macros,
|
||||
+ include_dirs=include_dirs,
|
||||
+ debug=self.debug,
|
||||
+ )
|
||||
+ else:
|
||||
+ objects = self.compiler.compile(
|
||||
+ sources,
|
||||
+ extra_preargs=["-msse2"] if optimized and not windows else [],
|
||||
+ output_dir=self.build_temp,
|
||||
+ macros=macros,
|
||||
+ include_dirs=include_dirs,
|
||||
+ debug=self.debug,
|
||||
+ )
|
||||
|
||||
# Now "link" the object files together into a static library.
|
||||
# (On Unix at least, this isn't really linking -- it just
|
||||
--- argon2_cffi-18.3.0/src/argon2/_ffi_build.py.orig 2018-12-30 08:01:56.914788500 -0500
|
||||
+++ argon2_cffi-18.3.0/src/argon2/_ffi_build.py 2018-12-30 08:04:48.966634200 -0500
|
||||
@@ -12,7 +12,7 @@ if use_system_argon2:
|
||||
include_dirs = []
|
||||
|
||||
# Add vendored integer types headers.
|
||||
-if "win32" in str(sys.platform).lower():
|
||||
+if ("win32" in str(sys.platform).lower()) and (not 'GCC' in sys.version):
|
||||
int_base = os.path.join("extras", "msinttypes")
|
||||
inttypes = os.path.join(int_base, "inttypes")
|
||||
stdint = os.path.join(int_base, "stdint")
|
||||
Reference in New Issue
Block a user