Date: Saturday, May 13, 2023 @ 08:40:50
  Author: grawlinson
Revision: 1460169

addpkg: python-b2sdk 1.21.0-2

Added:
  python-b2sdk/
  python-b2sdk/repos/
  python-b2sdk/trunk/
  python-b2sdk/trunk/PKGBUILD
  python-b2sdk/trunk/remove-version-constraint.patch

---------------------------------+
 PKGBUILD                        |   76 ++++++++++++++++++++++++++++++++++++++
 remove-version-constraint.patch |   11 +++++
 2 files changed, 87 insertions(+)

Added: python-b2sdk/trunk/PKGBUILD
===================================================================
--- python-b2sdk/trunk/PKGBUILD                         (rev 0)
+++ python-b2sdk/trunk/PKGBUILD 2023-05-13 08:40:50 UTC (rev 1460169)
@@ -0,0 +1,76 @@
+# Maintainer: George Rawlinson <[email protected]>
+
+pkgname=python-b2sdk
+pkgver=1.21.0
+pkgrel=2
+pkgdesc='Python module to access B2 cloud storage'
+arch=('any')
+url='https://github.com/Backblaze/b2-sdk-python'
+license=('MIT')
+depends=(
+  'python'
+  'python-logfury'
+  'python-requests'
+  'python-tqdm'
+  'python-urllib3'
+  'python-setuptools'
+  'python-importlib-metadata'
+)
+makedepends=(
+  'git'
+  'python-build'
+  'python-installer'
+  'python-setuptools-scm'
+  'python-wheel'
+)
+checkdepends=(
+  'python-pytest'
+  'python-pytest-mock'
+  'python-pytest-lazy-fixture'
+  'python-pyfakefs'
+)
+_commit='f7668d619d3614dd01a814d8e5d42f8a8272eb8c'
+source=(
+  "$pkgname::git+$url#commit=$_commit"
+  'remove-version-constraint.patch'
+)
+b2sums=('SKIP'
+        
'9829d2efe2a93986c21dcce1ddcf74923a2a78c50e8ea1814714aa73eca3adb904664890326f4b3c8ad0a71a0548194bdd586a6afbe69689732b589ee8c72ae9')
+
+pkgver() {
+  cd "$pkgname"
+
+  git describe --tags | sed 's/^v//'
+}
+
+prepare() {
+  cd "$pkgname"
+
+  patch -p1 -i "$srcdir/remove-version-constraint.patch"
+}
+
+build() {
+  cd "$pkgname"
+
+  SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver" python -m build --wheel 
--no-isolation
+}
+
+check() {
+  cd "$pkgname"
+
+  pytest -v \
+    --ignore=test/integration \
+    --deselect test/static/test_licenses.py::test_files_headers
+}
+
+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/${pkgname#python-}-$pkgver.dist-info/LICENSE" \
+    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}

Added: python-b2sdk/trunk/remove-version-constraint.patch
===================================================================
--- python-b2sdk/trunk/remove-version-constraint.patch                          
(rev 0)
+++ python-b2sdk/trunk/remove-version-constraint.patch  2023-05-13 08:40:50 UTC 
(rev 1460169)
@@ -0,0 +1,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -109,7 +109,7 @@ setup(
+     # for example:
+     # $ pip install -e .[dev,test]
+     extras_require={'doc': read_requirements('doc')},
+-    setup_requires=['setuptools_scm<6.0'],
++    setup_requires=['setuptools_scm'],
+     use_scm_version=True,
+ 
+     # If there are data files included in your packages that need to be

Reply via email to