diff options
author | Marcell Meszaros | 2022-07-07 03:07:59 +0200 |
---|---|---|
committer | Marcell Meszaros | 2022-07-07 03:15:53 +0200 |
commit | 7c4716e83a03ecddc7492badb5ae4f232462e8e1 (patch) | |
tree | 46d6824dbd162b0013f87ff4b14e99ebad6984e3 | |
parent | 99cfd655036f21d66583e95ea9029c76022f75cf (diff) | |
download | aur-python2-pyopenssl.tar.gz |
21.0.0-6: simplify depends; cleanup before pytest + set verbose output
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 55 |
2 files changed, 33 insertions, 33 deletions
@@ -1,20 +1,17 @@ pkgbase = python2-pyopenssl - pkgdesc = Wrapper module for OpenSSL, legacy Python 2 version + pkgdesc = Wrapper module for OpenSSL (legacy Python 2 version) pkgver = 21.0.0 - pkgrel = 5 + pkgrel = 6 url = https://pypi.org/project/pyopenssl/21.0.0/ arch = any license = Apache + checkdepends = python2-cryptography>=3.3 checkdepends = python2-flaky checkdepends = python2-pretend - checkdepends = python2-pytest>=3.0.1 checkdepends = python2-pytest-runner makedepends = python2-setuptools - depends = openssl - depends = python2>=2.7 - depends = python2-six>=1.5.2 - depends = python2-cryptography>=3.3 source = pyopenssl-21.0.0.tar.gz::https://github.com/pyca/pyopenssl/archive/21.0.0.tar.gz sha512sums = bad555b8b8faa60992aad779e9c9af27b132a894d4d3e59fb65f423770b31f278f5966127ca7cdcf42184cefe0c7d6fa94b84482d0e97089031e4e508d77c424 pkgname = python2-pyopenssl + depends = python2-cryptography>=3.3 @@ -1,4 +1,4 @@ -# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu > +# Maintainer: Marcell Meszaros < marcell.meszaros AT runbox.eu > # Contributor: Felix Yan <felixonmars@archlinux.org> # Contributor: Ionut Biru <ibiru@archlinux.org> # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> @@ -6,36 +6,34 @@ pkgname='python2-pyopenssl' _name="${pkgname#python2-}" pkgver=21.0.0 -pkgrel=5 -pkgdesc='Wrapper module for OpenSSL, legacy Python 2 version' +pkgrel=6 +pkgdesc='Wrapper module for OpenSSL (legacy Python 2 version)' arch=('any') url="https://pypi.org/project/${_name}/${pkgver}/" +_repourl="https://github.com/pyca/${_name}" license=('Apache') -depends=( - 'openssl' - 'python2>=2.7' - 'python2-six>=1.5.2' - 'python2-cryptography>=3.3' -) -makedepends=( - 'python2-setuptools' -) +makedepends=('python2-setuptools') checkdepends=( + 'python2-cryptography>=3.3' 'python2-flaky' 'python2-pretend' - 'python2-pytest>=3.0.1' 'python2-pytest-runner' ) _tarname="${_name}-${pkgver}" -source=("${_tarname}.tar.gz::https://github.com/pyca/${_name}/archive/${pkgver}.tar.gz") +source=("${_tarname}.tar.gz::${_repourl}/archive/${pkgver}.tar.gz") sha512sums=('bad555b8b8faa60992aad779e9c9af27b132a894d4d3e59fb65f423770b31f278f5966127ca7cdcf42184cefe0c7d6fa94b84482d0e97089031e4e508d77c424') prepare() { cd "${_tarname}" + printf "Changing hashbangs in *.py files to refer to 'python2'... " + sed -e '1s|#![ ]*/[a-zA-Z0-9./_ ]*python.*|#!/usr/bin/env python2|' \ + -i $(find . -name '*.py') + echo 'done' + echo 'Disabling test_alpn_call_failure(self): fails because it calls the deprecated SSLv23_METHOD.' sed -e 's/\( def test_alpn_call_failure(self):\)/ @pytest.mark.skip\n\1/' \ - -i tests/test_ssl.py + -i 'tests/test_ssl.py' } build() { @@ -44,20 +42,25 @@ build() { } check() { - cd "${_tarname}" - echo 'Running tests...' - - ( - echo '-- Using LC_ALL=C.UTF-8 locale to ensure UTF-8 filesystem encoding is used in Python 2' - export LC_ALL=C.UTF-8 - export PYTHONDONTWRITEBYTECODE=1 + cd "${_tarname}" + ( + echo '-- Using LC_ALL=C.UTF-8 locale to ensure UTF-8 filesystem encoding is used in Python 2' + export LC_ALL=C.UTF-8 + export PYTHONDONTWRITEBYTECODE=1 + export PYTHONPATH="${PWD}/build/lib:${PYTHONPATH}" - python2 setup.py pytest --addopts \ - "--deselect tests/test_ssl.py::TestContext::test_fallback_default_verify_paths" - ) + python2 setup.py pytest --addopts "$(cat <<-EOM + --verbose \ + --cache-clear \ + --deselect tests/test_ssl.py::TestContext::test_fallback_default_verify_paths + EOM + )" + ) } package() { + depends=('python2-cryptography>=3.3') + cd "${_tarname}" - python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build + python2 setup.py install --root="${pkgdir}" --prefix='/usr' --optimize=1 --skip-build } |