blob: d67a44bf5ff7217efda8b33b33e5db7cda79f099 (
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
|
# Maintainer: Sir-Photch <sir-photch@posteo.me>
pkgname=python-signalstickers-client
_pkgname=${pkgname#python-}
pkgver=3.3.0
pkgrel=3
pkgdesc='Python client for Signal stickers'
arch=(any)
url='https://pypi.org/project/signalstickers-client/'
license=(LGPL3)
depends=(
'python'
'python-anyio'
'python-cryptography'
'python-httpx'
'python-pip'
'python-protobuf'
'python-wheel'
)
makedepends=(
'python-build'
'python-installer'
'python-pytest-runner'
)
source=(
"https://files.pythonhosted.org/packages/source/s/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"
"https://raw.githubusercontent.com/signalstickers/${_pkgname}/master/tests/mock_httpx.py"
"https://github.com/signalstickers/${_pkgname}/raw/master/tests/test_data/8f827147a008bf8b24f4188be657aead/0.bin"
"https://github.com/signalstickers/${_pkgname}/raw/master/tests/test_data/8f827147a008bf8b24f4188be657aead/1.bin"
"https://github.com/signalstickers/${_pkgname}/raw/master/tests/test_data/8f827147a008bf8b24f4188be657aead/manifest.bin"
)
sha256sums=(
'e5b7bf49d561087f2517656adac269b7d47d86d18efb08fe43b0a9f12f0d657a'
'6f49b3109d8b86c983e4e61f02799471ee984d7b66773b569749f77af2af6704'
'fa642ce1a7bf458f9d7d92e1e0337b57991782037d86651d237755154cf6cc4d'
'904e84864ebc9055cf5e80e1d6e1d69f9475f759ef69f4838a952202fc978ac9'
'67926f3dbe79dab67fce4203c9e889a510f8b1cc22352a0c8084687ca7708d4d'
)
build() {
cd "${_pkgname}-${pkgver}"
python -m build --wheel --no-isolation
}
check() {
# these sourcefiles and test-files are missing from the pypi tarball and are required for tests to run
mv mock_httpx.py "${srcdir}/${_pkgname}-${pkgver}/tests"
testdata_dir="${srcdir}/${_pkgname}-${pkgver}/tests/test_data/8f827147a008bf8b24f4188be657aead"
mkdir -p "${testdata_dir}"
mv 0.bin "${testdata_dir}"
mv 1.bin "${testdata_dir}"
mv manifest.bin "${testdata_dir}"
cd "${srcdir}/${_pkgname}-${pkgver}"
python setup.py pytest
}
package() {
cd "${_pkgname}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
}
|