Date: Thursday, April 6, 2023 @ 02:08:47
Author: felixonmars
Revision: 1438048
archrelease: copy trunk to community-staging-any
Added:
python-hatch-vcs/repos/community-staging-any/
python-hatch-vcs/repos/community-staging-any/PKGBUILD
(from rev 1438047, python-hatch-vcs/trunk/PKGBUILD)
----------+
PKGBUILD | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
Copied: python-hatch-vcs/repos/community-staging-any/PKGBUILD (from rev
1438047, python-hatch-vcs/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-06 02:08:47 UTC (rev 1438048)
@@ -0,0 +1,39 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=python-hatch-vcs
+pkgver=0.3.0
+_commit=fbfc6b93c6cd195f8e0525a48637a349f765d131
+pkgrel=3
+pkgdesc="Hatch plugin for versioning with your preferred VCS"
+url="https://github.com/ofek/hatch-vcs"
+license=('MIT')
+arch=('any')
+depends=('python-hatchling' 'python-setuptools-scm')
+makedepends=('git' 'python-build' 'python-installer')
+checkdepends=('python-pytest')
+source=("git+https://github.com/ofek/hatch-vcs.git#commit=$_commit")
+sha512sums=('SKIP')
+
+prepare() {
+ cd hatch-vcs
+ # setuptools_scm 7.1.0: https://github.com/ofek/hatch-vcs/issues/25
+ git cherry-pick -n 2bf0d32f92f6609258f85131b94d0952fc0ec149
+}
+
+build() {
+ cd hatch-vcs
+ python -m build -nw
+}
+
+check() {
+ cd hatch-vcs
+ local site_packages=$(python -c "import site;
print(site.getsitepackages()[0])")
+ python -m installer --destdir=tmp_install dist/*.whl
+ SETUPTOOLS_SCM_PRETEND_VERSION= PYTHONPATH="$PWD/tmp_install$site_packages"
pytest
+}
+
+package() {
+ cd hatch-vcs
+ python -m installer --destdir="$pkgdir" dist/*.whl
+ install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
+}