diff options
author | Daniel M. Capella | 2021-06-19 22:13:44 -0400 |
---|---|---|
committer | Daniel M. Capella | 2021-06-19 22:13:44 -0400 |
commit | d685ee605881984de7c327d143ed9f05c3512437 (patch) | |
tree | 7df6cfaa6a96029317448388447139be194d6227 | |
parent | a377c49c23834443003f2cad51a313f5bad80007 (diff) | |
download | aur-d685ee605881984de7c327d143ed9f05c3512437.tar.gz |
Use python-build/install and touch up
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 38 |
2 files changed, 23 insertions, 22 deletions
@@ -1,13 +1,15 @@ pkgbase = rofimoji-git pkgdesc = Character picker for rofi - pkgver = 5.1.0.r8.g7641ab2 + pkgver = 5.2.0.r0.g540ae53 pkgrel = 1 url = https://github.com/fdw/rofimoji install = rofimoji-git.install arch = any license = MIT makedepends = git - makedepends = python-pip + makedepends = python-build + makedepends = python-install + makedepends = python-setuptools makedepends = python-wheel depends = python-configargparse optdepends = emoji-font: for the emojis character file @@ -25,4 +27,3 @@ pkgbase = rofimoji-git b2sums = SKIP pkgname = rofimoji-git - @@ -1,14 +1,15 @@ # Maintainer: Daniel M. Capella <polyzen@archlinux.org> pkgname=rofimoji-git -pkgver=5.1.0.r8.g7641ab2 +pkgver=5.2.0.r0.g540ae53 pkgrel=1 pkgdesc='Character picker for rofi' arch=('any') url=https://github.com/fdw/rofimoji license=('MIT') depends=('python-configargparse') -makedepends=('git' 'python-pip' 'python-wheel') +makedepends=('git' 'python-build' 'python-install' 'python-setuptools' + 'python-wheel') optdepends=('emoji-font: for the emojis character file' 'nerd-fonts: for the nerd_font character file' 'rofi: for the X.Org selector' @@ -18,43 +19,42 @@ optdepends=('emoji-font: for the emojis character file' 'wofi: for the Wayland selector' 'wl-clipboard: for the Wayland clipboarder' 'wtype: for the Wayland typer') -provides=('rofimoji') -conflicts=('rofimoji') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") install=$pkgname.install source=("git+$url.git") b2sums=('SKIP') pkgver() { - cd rofimoji + cd ${pkgname%-git} git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { - cd rofimoji - # Avoid installing files directly under site-packages/ + cd ${pkgname%-git} + # Remove data_files section https://github.com/pypa/wheel/issues/92 sed -i '/\[options.data_files\]/,/^$/d' setup.cfg } build() { - cd rofimoji - export PIP_CONFIG_FILE=/dev/null - pip wheel --isolated --no-deps . + cd ${pkgname%-git} + python -m build --wheel --skip-dependency-check --no-isolation } package() { - cd rofimoji + cd ${pkgname%-git} export PYTHONHASHSEED=0 - export PIP_CONFIG_FILE=/dev/null - pip install --isolated \ - --no-deps \ - --root="$pkgdir" \ - --ignore-installed \ - --no-warn-script-location *.whl - install -Dm644 -t "$pkgdir"/usr/share/man/man1 src/picker/docs/rofimoji.1 + python -m install --optimize=1 --destdir="$pkgdir" dist/*.whl + install -Dm644 -t "$pkgdir"/usr/share/man/man1 \ + src/picker/docs/${pkgname%-git}.1 + # https://github.com/FFY00/python-install/pull/6 + chmod +x "$pkgdir"/usr/bin/${pkgname%-git} + + # 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/rofimoji-${pkgver%%.r*}.dist-info/LICENSE \ + ln -s $site_packages/${pkgname%-git}-${pkgver%%.r*}.dist-info/LICENSE \ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE } |