[arch-commits] Commit in python-dephell/trunk (PKGBUILD)
Caleb Maclennan
alerque at gemini.archlinux.org
Mon Jan 24 19:19:01 UTC 2022
Date: Monday, January 24, 2022 @ 19:19:00
Author: alerque
Revision: 1114871
adopt, restyle
Modified:
python-dephell/trunk/PKGBUILD
----------+
PKGBUILD | 121 +++++++++++++++++++++++++++++++++++++------------------------
1 file changed, 74 insertions(+), 47 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-01-24 19:01:53 UTC (rev 1114870)
+++ PKGBUILD 2022-01-24 19:19:00 UTC (rev 1114871)
@@ -1,21 +1,46 @@
-# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+# Maintainer: Caleb Maclennana <caleb at alerque.com>
+# Contributor: Eli Schwartz <eschwartz at archlinux.org>
-_pkgname=dephell
+_pyname=dephell
pkgname=python-dephell
pkgver=0.8.3
-pkgrel=6
-pkgdesc="universal Python project management: convert between formats, build, manage venvs"
-arch=('any')
-url="https://github.com/dephell/${_pkgname}"
+pkgrel=7
+pkgdesc='universal Python project management: convert between formats, build, manage venvs'
+arch=(any)
+url="https://github.com/dephell/$_pyname"
license=('ISC')
-_d_deps=('archive' 'argparse' 'changelogs' 'discover' 'licenses' 'links' 'markers'
- 'pythons' 'setuptools' 'shells' 'specifier' 'venvs' 'versioning')
-_deps=('aiohttp' 'appdirs' 'attrs' 'bowler' 'cerberus' 'colorama' "${_d_deps[@]/#/dephell-}"
- 'html5lib' 'jinja' 'packaging'
- 'pip' 'pygments' 'requests' 'ruamel-yaml' 'tabulate' 'tomlkit' 'yaspin')
-depends=("${_deps[@]/#/python-}" 'm2r')
-checkdepends=('git' 'python-pytest' 'python-aioresponses' 'python-requests-mock'
- 'python-moreorless')
+_dhdeps=(archive
+ argparse
+ changelogs
+ discover
+ licenses
+ links markers
+ pythons
+ setuptools
+ shells
+ specifier
+ venvs
+ versioning)
+_pydeps=(aiohttp
+ appdirs
+ attrs
+ bowler
+ cerberus
+ colorama
+ "${_dhdeps[@]/#/dephell-}"
+ html5lib
+ jinja
+ packaging
+ pip
+ pygments
+ requests
+ ruamel-yaml
+ tabulate
+ tomlkit
+ yaspin)
+depends=("${_pydeps[@]/#/python-}" m2r)
+checkdepends=(git python-pytest python-aioresponses python-requests-mock
+ python-moreorless)
optdepends=('python-aiofiles: speed up file writes for files downloaded from warehouse'
'python-docker: for the docker subcommand'
'python-dockerpty: for the docker subcommand'
@@ -23,9 +48,10 @@
'python-graphviz: print deps tree as a graph'
'autopep8: make setup.py converter produce formatted pep8 output'
'yapf: make setup.py converter produce google yapf-formatted output')
-source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"
- "new-pip-parser-api.patch"
- "0001-Do-not-override-the-system-SSL-certificates-with-the.patch")
+_archive="$_pyname-$pkgver"
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/$_archive.tar.gz"
+ 'new-pip-parser-api.patch'
+ '0001-Do-not-override-the-system-SSL-certificates-with-the.patch')
sha256sums=('a9fcc528a0c6f9f5d721292bdf846e5338e4dca7cd6fef1551fbe71564dfe61e'
'85ac9db84375d9063fae8cbc91ad7cbcec5b0da8cfe800ed400bcc92f0412934'
'acbe38854daef23a6cb752bfa98323ae5c7f85cca8562cb070d59e11e05991b0')
@@ -34,50 +60,51 @@
'b69a0f264700c93144adddf86ee133ca15a5e373dc077bc9d24010cce6238a779435e48cab41bf47b72482c357e790ac9bafeafb89b85a36c29769601300a2cf')
prepare() {
- cd "${srcdir}"/${_pkgname}-${pkgver}
+ cd "$_archive"
- # https://github.com/dephell/dephell/pull/473
- patch -Np1 -i ../new-pip-parser-api.patch
+ # https://github.com/dephell/dephell/pull/473
+ patch -Np1 -i ../new-pip-parser-api.patch
- # bad certifi
- patch -p1 -i ../0001-Do-not-override-the-system-SSL-certificates-with-the.patch
+ # bad certifi
+ patch -p1 -i ../0001-Do-not-override-the-system-SSL-certificates-with-the.patch
- # don't lock pip version to below pip 20:
- # https://github.com/dephell/dephell/pull/363#issuecomment-606150965
- # because https://github.com/pypa/pip/issues/7629 seems insufficient
- # to hold up non-PyPY platforms :/
- sed -i 's/pip<=19.3.1,>=18.0/pip/' setup.py
+ # don't lock pip version to below pip 20:
+ # https://github.com/dephell/dephell/pull/363#issuecomment-606150965
+ # because https://github.com/pypa/pip/issues/7629 seems insufficient
+ # to hold up non-PyPY platforms :/
+ sed -i 's/pip<=19.3.1,>=18.0/pip/' setup.py
}
build(){
- cd "${srcdir}"/${_pkgname}-${pkgver}
-
- python setup.py build
+ cd "$_archive"
+ python setup.py build
}
check() {
- cd "${srcdir}"/${_pkgname}-${pkgver}
+ cd "$_archive"
- # skip git tests, which rely on being run from dephell's own git repo
- # skip doc test, which tests whether html docs not in the tarball, cover all commands
- python -m pytest -k 'not test_git_git and not test_docs' --no-network \
- --deselect tests/test_actions/test_entrypoints.py::test_smoke_get_entrypoints \
- --deselect tests/test_commands/test_vendor_import.py::test_patch_imports
+ # skip git tests, which rely on being run from dephell's own git repo
+ # skip doc test, which tests whether html docs not in the tarball, cover all commands
+ python -m pytest \
+ -k 'not test_git_git and not test_docs' \
+ --no-network \
+ --deselect tests/test_actions/test_entrypoints.py::test_smoke_get_entrypoints \
+ --deselect tests/test_commands/test_vendor_import.py::test_patch_imports
}
package() {
- cd "${srcdir}"/${_pkgname}-${pkgver}
+ cd "$_archive"
- python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
- install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ install -Dm0644 -t "$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
+ # make shell completions
+ python -c 'from dephell.actions._autocomplete import make_bash_autocomplete as comp; print(comp())' |
+ install -Dm0644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/$_pyname"
- # 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
+ # 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 -Dm0644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_$_pyname"
}
More information about the arch-commits
mailing list