Date: Monday, January 2, 2023 @ 03:09:28 Author: grawlinson Revision: 1372857
upgpkg: python-flake8-black 0.3.6-1; new upstream release Modified: python-flake8-black/trunk/PKGBUILD ----------+ PKGBUILD | 64 ++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 17 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-01-02 03:01:03 UTC (rev 1372856) +++ PKGBUILD 2023-01-02 03:09:28 UTC (rev 1372857) @@ -1,28 +1,57 @@ -# Maintainer: Daniel M. Capella <[email protected]> -# Contributor: George Rawlinson <[email protected]> +# Maintainer: George Rawlinson <[email protected]> +# Contributor: Daniel M. Capella <[email protected]> -_name=flake8-black pkgname=python-flake8-black -pkgver=0.3.5 +pkgver=0.3.6 pkgrel=1 pkgdesc='Flake8 plugin to call black as a code style validator' arch=('any') url=https://github.com/peterjc/flake8-black license=('MIT') -depends=('flake8' 'python-black' 'python-tomli') -makedepends=('python-build' 'python-installer' 'python-setuptools' - 'python-wheel') -source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz") -sha256sums=('9e93252b1314a8eb3c2f55dec54a07239e502b12f57567f2c105f2202714b15e') -b2sums=('bda2b0d022b36d1fccdf38df390b9d4660846817b887f28f489fa4c2975aba989a96e8c70f1fd00fd47cde9645f448cf23ec7478a62fc85aab16a9b74cd23df8') +depends=( + 'python' + 'flake8' + 'python-black' + 'python-tomli' +) +makedepends=( + 'git' + 'python-build' + 'python-installer' + 'python-wheel' + 'python-setuptools' +) +_commit='868b41554a6b57d74e916d33c37469e0d0b4b9cc' +source=( + "$pkgname::git+$url#commit=$_commit" + 'pyproject-no-pip.patch' +) +sha512sums=('SKIP' + '0dc458646781a621b571ac6a2ef892da242fa353b0be3e63a189ff0da8d0d10495521ff559072e50ada62e3565e43103cf605766b4cdf9f1b97a039a1ebd03fd') +b2sums=('SKIP' + 'abc8840cf1cbf6b2386c38e690dcb479671cf2df64c584787f7ebb06c31dc3cec1d1d407e3bf3173460f31f8a61023bd1609e20fcac9317f67a3c18c610b2b19') +pkgver() { + cd "$pkgname" + + git describe --tags | sed 's/^v//' +} + +prepare() { + cd "$pkgname" + + patch -p1 -i "$srcdir/pyproject-no-pip.patch" +} + build() { - cd $_name-$pkgver - python -m build --wheel --skip-dependency-check --no-isolation + cd "$pkgname" + + python -m build --wheel --no-isolation } check() { - cd $_name-$pkgver + cd "$pkgname" + python -m venv --system-site-packages test-env source test-env/bin/activate python -m installer dist/*.whl @@ -33,12 +62,13 @@ } package() { - cd $_name-$pkgver + cd "$pkgname" + python -m installer --destdir="$pkgdir" dist/*.whl # Symlink license file local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") - install -d "$pkgdir"/usr/share/licenses/$pkgname - ln -s "$site_packages"/flake8_black-$pkgver.dist-info/LICENSE.rst \ - "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.rst + install -d "$pkgdir/usr/share/licenses/$pkgname" + ln -s "$site_packages/flake8_black-$pkgver.dist-info/LICENSE.rst" \ + "$pkgdir/usr/share/licenses/$pkgname/LICENSE.rst" }
