Date: Friday, April 7, 2023 @ 04:30:40
  Author: felixonmars
Revision: 1440527

archrelease: copy trunk to community-staging-any

Added:
  python-flake8-black/repos/community-staging-any/
  python-flake8-black/repos/community-staging-any/PKGBUILD
    (from rev 1440524, python-flake8-black/trunk/PKGBUILD)
  python-flake8-black/repos/community-staging-any/pyproject-no-pip.patch
    (from rev 1440525, python-flake8-black/trunk/pyproject-no-pip.patch)

------------------------+
 PKGBUILD               |   74 +++++++++++++++++++++++++++++++++++++++++++++++
 pyproject-no-pip.patch |    9 +++++
 2 files changed, 83 insertions(+)

Copied: python-flake8-black/repos/community-staging-any/PKGBUILD (from rev 
1440524, python-flake8-black/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-07 04:30:40 UTC (rev 1440527)
@@ -0,0 +1,74 @@
+# Maintainer: George Rawlinson <[email protected]>
+# Contributor: Daniel M. Capella <[email protected]>
+
+pkgname=python-flake8-black
+pkgver=0.3.6
+pkgrel=2
+pkgdesc='Flake8 plugin to call black as a code style validator'
+arch=('any')
+url=https://github.com/peterjc/flake8-black
+license=('MIT')
+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 "$pkgname"
+
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  cd "$pkgname"
+
+  python -m venv --system-site-packages test-env
+  source test-env/bin/activate
+  python -m installer dist/*.whl
+  cd tests
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+  PYTHONPATH="../build:$site_packages" ./run_tests.sh
+  deactivate
+}
+
+package() {
+  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"
+}

Copied: python-flake8-black/repos/community-staging-any/pyproject-no-pip.patch 
(from rev 1440525, python-flake8-black/trunk/pyproject-no-pip.patch)
===================================================================
--- community-staging-any/pyproject-no-pip.patch                                
(rev 0)
+++ community-staging-any/pyproject-no-pip.patch        2023-04-07 04:30:40 UTC 
(rev 1440527)
@@ -0,0 +1,9 @@
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ['pip>=21.3', 'setuptools>=61', 'wheel']
++requires = ['setuptools>=61', 'wheel']
+ build-backend = 'setuptools.build_meta'
+ 
+ [project]

Reply via email to