Hey Daniel, I updated the script to install without using setup.py. I replaced the lines with setup.py in the build and package scripts. In the build script, I replaced that line with python -m build --wheel. In the package script, I replaced the setup.py line with python -m installer --destdir="$pkgdir" dist/*.whl. For the package script, I took a hint from https://gitlab.archlinux.org/archlinux/packaging/packages/python-setuptools/-/blob/main/PKGBUILD
# Maintainer: Daniel Peukert <daniel@peukert.cc>
# Contributor: Michał Wojdyła < micwoj9292 at gmail dot com >
# Contributor: Gerard Ribugent <ribugent <at> gmail <dot> com>
_projectname='azure-identity'
pkgname="python-$_projectname"
pkgver='1.25.0'
pkgrel='1'
pkgdesc='Microsoft Azure Identity Client Library for Python'
arch=('any')
url='https://github.com/Azure/azure-sdk-for-python'
license=('MIT')
depends=('python>=3.9.0' 'python-azure-core>=1.31.0' 'python-cryptography>=2.5.0' 'python-msal>=1.30.0' 'python-msal-extensions>=1.2.0' 'python-typing_extensions>=4.0.0')
makedepends=('python-setuptools')
# $pkgrel added to make sure our cached source file doesn't get used, as the previous pkgrels were invalid
source=("$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/refs/tags/${_projectname}_$pkgver.tar.gz")
b2sums=('766982b4c15870767d4c1b583dff83e58a309a876262c097124d0b19e165eb089cb9631236d320db3098f57dcbe67cd2e9456c55a4eb6596e1a497d33fc357a5')
_sourcedirectory="azure-sdk-for-python-${_projectname}_$pkgver/sdk/identity/$_projectname"
build() {
cd "$srcdir/$_sourcedirectory/"
python -m build --wheel
}
# Tests ignored, as the devtools_testutils package is not supposed to be released/published (see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261305)
package() {
cd "$srcdir/$_sourcedirectory/"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 'LICENSE' "$pkgdir/usr/share/licenses/$pkgname/MIT"
}
Pinned Comments
dpeukert commented on 2025-01-05 20:26 (UTC)
The PKGBUILD for this package is hosted here (contributions are welcome!): https://gitlab.com/dpeukert/pkgbuilds/tree/main/python-azure-identity