blob: 06a46121a363113bc599a492ba8c40d29f713f15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Dimitris Kiziridis <ragouel at outlook dot com>
# Contributor: Ronuk Raval <ronuk.raval at gmail dot com>
# Contributor: Narrat <autumn-wind at web dot de>
# Contributor: David Scholl <djscholl at gmail dot com>
pkgname=leo
pkgver=6.8.1
pkgrel=1
pkgdesc="Outliner, Editor, and Personal Information Manager"
arch=('any')
url='https://github.com/leo-editor/leo-editor'
license=('MIT' 'BSD')
depends=(
'jupyter-nbformat'
'python-asttokens'
'python-black'
'python-docutils'
'python-flexx'
'python-meta'
'python-pyflakes'
'python-pylint'
'python-pyqt6'
'python-pyqt6-webengine'
'python-pyshortcuts'
'python-sphinx'
'shared-mime-info')
makedepends=(
'dos2unix'
'python-build'
'python-installer'
'python-setuptools'
'python-wheel')
optdepends=('python-pyenchant: spellchecking support')
# checkdepends=('python-pytest')
provides=('leo-editor')
source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/l/leo/leo-${pkgver/_/-}.tar.gz"
'remove-tests.patch'
'leo.desktop'
'leo.xml')
sha256sums=('c6175497c3da65ad7eb20d63f2c94f1dc11096d053d2f5203221d96c16e22abf'
'cc351848ffa6ce740c8cbb74f60363b6f4b3f3fccd90a09512e76900006f37fa'
'4633876eb91eff206660359ee7da459211e8f87fd73ebbc680fd437c70b63467'
'630852279324b0d9acf656c4684f16777d64f49b4062bd101c5cddbfc33c82cb')
prepare() {
cd "$pkgname-$pkgver"
dos2unix setup.py
patch -p1 -l < "$srcdir/remove-tests.patch"
}
build() {
cd "$pkgname-$pkgver"
python -m build --wheel --no-isolation
}
## FIXME: tests cause a Python abort
# check() {
# cd "$pkgname-editor-$pkgver"
# pytest -x --disable-warnings
# }
package() {
cd "$pkgname-$pkgver"
python -m installer --destdir="$pkgdir/" dist/*.whl
install -Dvm644 "$srcdir/leo.desktop" -t "$pkgdir/usr/share/applications/"
install -Dvm644 "$srcdir/leo.xml" -t "$pkgdir/usr/share/mime/packages/"
install -Dvm644 "leo/Icons/application-x-leo-outline.png" "$pkgdir/usr/share/pixmaps/leo.png"
local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
install -dv "$pkgdir/usr/share/licenses/$pkgname/"
ln -sv "$_site/leo-${pkgver%_*}.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
}
|