diff options
author | Aseem Athale | 2023-10-10 14:25:21 +0530 |
---|---|---|
committer | Aseem Athale | 2023-10-10 14:25:21 +0530 |
commit | 4733c8354b65dc60487ba3ab0f3d3cfd0ee93396 (patch) | |
tree | 51a932c0d3cebff95901f155e3db00831ccb3a50 /PKGBUILD | |
download | aur-4733c8354b65dc60487ba3ab0f3d3cfd0ee93396.tar.gz |
python-poetry-plugin-export-git: Initial commit
Signed-off-by: Aseem Athale <athaleaseem@gmail.com>
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..356650a5e9ab --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Aseem Athale <athaleaseem@gmail.com> + +_pkgname=poetry-plugin-export +pkgname=python-poetry-plugin-export-git +pkgver=1.5.0.r4.g33a406f +pkgrel=1 +pkgdesc="Poetry plugin to export the dependencies to various formats -- git version" +url="https://github.com/python-poetry/poetry-plugin-export" +license=('MIT') +arch=('any') +depends=('python-poetry') +makedepends=('python-build' 'python-installer') +checkdepends=('python-pytest-mock' 'python-pytest-xdist') +provides=('python-poetry-plugin-export') +conflicts=('python-poetry-plugin-export') +source=("git+https://github.com/python-poetry/poetry-plugin-export.git") +sha512sums=('SKIP') + +pkgver() { + cd "${_pkgname}" + git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} +build() { + cd "${_pkgname}" + python -m build -wn +} + +check() { + cd "${_pkgname}" + python -m installer -d tmp_install dist/*.whl + local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + PYTHONPATH="$PWD/tmp_install/$site_packages" pytest +} + +package() { + cd "${_pkgname}" + python -m installer -d "$pkgdir" dist/*.whl + install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE +} |