python2-backports.ssl_match_hostname-3.5.0.1 - new package required b… (#4721)
* python2-backports.ssl_match_hostname-3.5.0.1 - new package required by python-websocket-client for Python2. * Remove some unneeded code and unroll some loops that have no effect so the build will run only ONCE.
This commit is contained in:
40
mingw-w64-python2-backports.ssl_match_hostname/PKGBUILD
Normal file
40
mingw-w64-python2-backports.ssl_match_hostname/PKGBUILD
Normal file
@@ -0,0 +1,40 @@
|
||||
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
||||
|
||||
_realname=backports.ssl_match_hostname
|
||||
pkgbase=mingw-w64-python2-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}")
|
||||
pkgver=3.5.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="The ssl.match_hostname() function from Python 3.5 (mingw-w64)"
|
||||
arch=('any')
|
||||
url='https://pypi.python.org/pypi/backports.ssl_match_hostname'
|
||||
license=('PSF')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python2"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python2-backports")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-python2-ipaddress: for IPAddress ServerAltnames support")
|
||||
options=('staticlibs' 'strip' '!debug')
|
||||
source=("https://pypi.python.org/packages/source/b/backports.ssl_match_hostname/backports.ssl_match_hostname-$pkgver.tar.gz")
|
||||
sha256sums=('502ad98707319f4a51fa2ca1c677bd659008d27ded9f6380c79e8932e38dcdf2')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
rm backports.ssl_match_hostname-$pkgver/backports/__init__.py
|
||||
rm -rf python2-build-${CARCH} | true
|
||||
cp -r "${_realname}-${pkgver}" "python2-build-${CARCH}"
|
||||
# Set version for setuptools_scm
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
|
||||
}
|
||||
|
||||
build() {
|
||||
msg "Python 2 build for ${CARCH}"
|
||||
cd "${srcdir}/python2-build-${CARCH}"
|
||||
${MINGW_PREFIX}/bin/python2 setup.py build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/python2-build-${CARCH}"
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \
|
||||
--root="${pkgdir}" --optimize=1 --skip-build
|
||||
}
|
||||
Reference in New Issue
Block a user