diff options
author | Sander Vocke | 2023-07-04 22:15:44 +0200 |
---|---|---|
committer | Sander Vocke | 2023-07-04 22:15:44 +0200 |
commit | cb7a3f48f4f9b941474c8955c71303d4c8c7bf0b (patch) | |
tree | 4d24e6e72b99d35c8ace106f2b9ac8e0a3624888 | |
download | aur-cb7a3f48f4f9b941474c8955c71303d4c8c7bf0b.tar.gz |
Initial commit.
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 41 |
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c1eb40ee0485 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = python-py-build-cmake + pkgdesc = Modern, PEP 517 compliant build backend for creating Python packages with extensions built using CMake. + pkgver = 0.1.8 + pkgrel = 1 + url = https://github.com/tttapa/py-build-cmake + arch = any + license = MIT + checkdepends = python-pytest + makedepends = git + makedepends = python-build + makedepends = python-flit-core + makedepends = python-installer + depends = python-distlib + depends = python-flit-core + depends = python-tomli + depends = python-click + optdepends = python-virtualenv: Use virtualenv for build isolation + source = git+https://github.com/tttapa/py-build-cmake#tag=0.1.8 + sha512sums = SKIP + +pkgname = python-py-build-cmake diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c32fb944ba19 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Sander Vocke <sandervocke@gmail.com> + +_pkgname=py-build-cmake +pkgname=python-$_pkgname +pkgver=0.1.8 +pkgrel=1 +pkgdesc='Modern, PEP 517 compliant build backend for creating Python packages with extensions built using CMake.' +arch=('any') +url='https://github.com/tttapa/py-build-cmake' +license=('MIT') +depends=('python-distlib' 'python-flit-core' 'python-tomli' 'python-click') +optdepends=('python-virtualenv: Use virtualenv for build isolation') +makedepends=('git' 'python-build' 'python-flit-core' 'python-installer') +checkdepends=('python-pytest') +source=("git+$url#tag=$pkgver") +# validpgpkeys=() +sha512sums=('SKIP') + +build() { + cd $_pkgname + + python -m build --wheel --skip-dependency-check --no-isolation +} + +check() { + cd $_pkgname + + pytest +} + +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-$pkgver.dist-info/LICENSE \ + "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} |