[arch-commits] Commit in (4 files)

Eli Schwartz eschwartz at archlinux.org
Tue May 28 20:42:26 UTC 2019


    Date: Tuesday, May 28, 2019 @ 20:42:25
  Author: eschwartz
Revision: 473069

addpkg: python-dephell 0.7.3-1

Added:
  python-dephell/
  python-dephell/repos/
  python-dephell/trunk/
  python-dephell/trunk/PKGBUILD

----------+
 PKGBUILD |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

Added: python-dephell/trunk/PKGBUILD
===================================================================
--- python-dephell/trunk/PKGBUILD	                        (rev 0)
+++ python-dephell/trunk/PKGBUILD	2019-05-28 20:42:25 UTC (rev 473069)
@@ -0,0 +1,56 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+
+_pkgname=dephell
+pkgname=python-dephell
+pkgver=0.7.3
+pkgrel=1
+pkgdesc="universal Python project management: convert between formats, build, manage venvs"
+arch=('any')
+url="https://github.com/dephell/${_pkgname}"
+license=('ISC')
+_deps=('aiohttp' 'appdirs' 'attrs' 'cerberus' 'dephell-archive' 'dephell-discover'
+       'dephell-licenses' 'dephell-links' 'dephell-markers' 'dephell-pythons'
+       'dephell-shells' 'dephell-specifier' 'dephell-venvs' 'jinja' 'packaging'
+       'pip' 'requests' 'setuptools' 'tomlkit' 'yaml' 'yaspin')
+depends=("${_deps[@]/#/python-}" 'm2r')
+checkdepends=('python-pytest-runner')
+source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
+sha256sums=('39be9b301376b1710d11519cabe8c90bf879549b49e35d8e04baed22e4d97222')
+b2sums=('31c6c070fe797948398fea98ed14254b03fefb7133e3cbbc68f10c15456d58f7e02a541fd89b6fbf922da7a1f3b1a8c3591373db253ad96e1cda74cdc33ed36e')
+
+prepare() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    # pycache slipped into release tarballs
+    find . -name \*.pyc -delete
+}
+
+build(){
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python setup.py build
+}
+
+check() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    # skip git tests, which rely on being run from dephell's own git repo
+    python -m pytest -k 'not test_git_git'
+}
+
+package() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+    install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+
+    # make shell completions
+    python -c 'from dephell.actions._autocomplete import make_bash_autocomplete as comp; print(comp())' | \
+        install -Dm644 /dev/stdin "${pkgdir}"/usr/share/bash-completion/completions/dephell
+
+    # rewrite zsh completion to support autoloading
+    {   printf '#compdef dephell\n'
+        python -c 'from dephell.actions._autocomplete import make_zsh_autocomplete as comp; print(comp())' | \
+            sed 's/^compdef _dephell dephell$/_dephell/'
+    } | install -Dm644 /dev/stdin "${pkgdir}"/usr/share/zsh/site-functions/_dephell
+}



More information about the arch-commits mailing list