1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
4 pkgbase=python-sshtunnel
5 pkgname=('sshtunnel' 'python-sshtunnel')
6 _gitcommit=58a46ef8b66be5eded29cd9bda4dccedb46ec586
9 pkgdesc='Pure python SSH tunnels'
10 url='https://github.com/pahaz/sshtunnel'
13 makedepends=('git' 'python-build' 'python-installer' 'python-paramiko' 'python-setuptools' 'python-sphinx' 'python-wheel')
14 checkdepends=('python-pytest' 'python-mock' 'openssh')
15 source=(${pkgbase}::"git+https://github.com/pahaz/sshtunnel#commit=${_gitcommit}")
20 git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed -E 's|\.r0\.\w+$||'
25 sed '/sphinxcontrib.napoleon/d' -i docs/conf.py
30 python -m build --wheel --no-isolation
32 export PYTHONPATH="$PWD:$PYTHONPATH"
33 sphinx-build -b text docs docs/_build/text
34 sphinx-build -b man docs docs/_build/man
43 depends=('python' 'python-sshtunnel')
47 python -m installer --destdir="$pkgdir" dist/*.whl
48 install -d "${pkgdir}/usr/share/"{licenses,doc,man/man1}
49 ln -s /usr/share/licenses/python-sshtunnel "${pkgdir}/usr/share/licenses/${pkgname}"
50 ln -s /usr/share/doc/python-sshtunnel "${pkgdir}/usr/share/doc/${pkgname}"
51 ln -s /usr/share/man/man1/python-sshtunnel.1.gz "${pkgdir}/usr/share/man/man1/${pkgname}.1.gz"
53 rm -r "${pkgdir}/usr/lib"
56 package_python-sshtunnel() {
57 depends=('python' 'python-paramiko')
60 python -m installer --destdir="$pkgdir" dist/*.whl
61 install -Dm 644 README.rst changelog.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
62 install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
63 install -Dm 644 docs/_build/text/*.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
64 install -Dm 644 docs/_build/man/sshtunnel.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
66 rm -r "${pkgdir}/usr/bin"