Date: Tuesday, January 31, 2023 @ 20:25:43
  Author: felixonmars
Revision: 1391547

archrelease: copy trunk to community-any

Added:
  python-pytest-black/repos/community-any/PKGBUILD
    (from rev 1391546, python-pytest-black/trunk/PKGBUILD)
Deleted:
  python-pytest-black/repos/community-any/PKGBUILD

----------+
 PKGBUILD |   81 ++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 40 insertions(+), 41 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2023-01-31 20:25:31 UTC (rev 1391546)
+++ PKGBUILD    2023-01-31 20:25:43 UTC (rev 1391547)
@@ -1,41 +0,0 @@
-# Maintainer: Felix Yan <[email protected]>
-
-pkgname=python-pytest-black
-pkgver=0.3.12
-pkgrel=6
-pkgdesc="A pytest plugin to enable format checking with black"
-arch=('any')
-license=('MIT')
-url="https://github.com/shopkeep/pytest-black/";
-depends=('python-black' 'python-pytest' 'python-toml')
-makedepends=('python-setuptools-scm')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/shopkeep/pytest-black/archive/$pkgver.tar.gz";
-        
$pkgname-pytest6.patch::https://github.com/shopkeep/pytest-black/pull/53.patch)
-sha512sums=('1576761c9a93e6a05d5f1d40200e228791a67ac33f437330940ccbb898121df22814a794858b36de9223d4cc45d58fcbefaa08c87275f36e04901cb4cd217760'
-            
'362176d305114dc1f6389144ab8feed5a1e48827bef4d07b241accfa5a257ba8189dbbe4c320ae458a47cd067541d53d2ae0b66688b5fcdd698f31ac3df62d19')
-
-export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
-
-prepare() {
-  cd pytest-black-$pkgver
-  patch -Np1 -i ../$pkgname-pytest6.patch
-}
-
-build() {
-  cd pytest-black-$pkgver
-  python setup.py build
-}
-
-check() {
-  # Hack entry points by installing it
-
-  cd pytest-black-$pkgver
-  python setup.py install --root="$PWD/tmp_install" --optimize=1
-  
PYTHONPATH="$PWD/tmp_install/usr/lib/python3.10/site-packages:$PYTHONPATH:$PWD/tests"
 py.test
-}
-
-package() {
-  cd pytest-black-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1
-  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
-}

Copied: python-pytest-black/repos/community-any/PKGBUILD (from rev 1391546, 
python-pytest-black/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2023-01-31 20:25:43 UTC (rev 1391547)
@@ -0,0 +1,40 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=python-pytest-black
+pkgver=0.3.12
+_commit=1d0d34a44004252ce73368ac3bf34354c06a5131
+pkgrel=7
+pkgdesc="A pytest plugin to enable format checking with black"
+arch=('any')
+license=('MIT')
+url="https://github.com/shopkeep/pytest-black/";
+depends=('python-black' 'python-pytest' 'python-toml')
+makedepends=('git' 'python-setuptools-scm')
+source=("git+https://github.com/shopkeep/pytest-black.git#commit=$_commit";)
+sha512sums=('SKIP')
+
+prepare() {
+  cd pytest-black
+  # pytest 6
+  git cherry-pick -n edcbcae7d55a992e785c7fc001f9d3880b197ea2
+}
+
+build() {
+  cd pytest-black
+  python setup.py build
+}
+
+check() {
+  # Hack entry points by installing it
+
+  cd pytest-black
+  python setup.py install --root="$PWD/tmp_install" --optimize=1
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+  PYTHONPATH="$PWD/tmp_install/$site_packages:$PYTHONPATH:$PWD/tests" py.test
+}
+
+package() {
+  cd pytest-black
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+}

Reply via email to