blob: 5ab02bef8b1aef0b373f3da91e43f58650a61e32 (
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
|
#!/usr/bin/env bash
# shellcheck disable=SC2034
# shellcheck disable=SC2154
# The PKGBUILD for Technical.
# Maintainer: Matheus <matheusgwdl@protonmail.com>
# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
readonly _pkgname="technical"
pkgname="python-technical"
pkgver="1.5.4"
pkgrel="1"
pkgdesc="Various indicators developed or collected for the Freqtrade."
arch=("any")
url="https://github.com/freqtrade/${_pkgname}"
license=("GPL-3.0-or-later")
depends=("python" "python-matplotlib" "python-numpy" "python-pandas" "python-scipy" "python-ta-lib")
makedepends=("python-build" "python-installer" "python-setuptools" "python-wheel")
checkdepends=("python-mock" "python-pip-audit" "python-pytest" "python-syrupy")
source=("${pkgname}-v${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz")
sha512sums=("6c1382210cbf6765b08f709570145ef77b7c89ec8a4d5d0d220f521fb2dfb71ffe03c0a021bf8fe7694db24b640cb72b69eda1b76ab454837409275c5addc456")
build()
{
cd "${srcdir}"/"${_pkgname}"-"${pkgver}"/ || exit 1
python -m build -nw
}
check()
{
cd "${srcdir}"/"${_pkgname}"-"${pkgver}"/ || exit 1
pytest -k "not test_pip_audit_no_vulnerabilities" # TODO
}
package()
{
# Assure that the directories exist.
mkdir -p "${pkgdir}"/usr/share/doc/"${pkgname}"/
# Install the software.
cd "${srcdir}"/"${_pkgname}"-"${pkgver}"/ || exit 1
python -m installer -d "${pkgdir}" "${srcdir}"/"${_pkgname}"-"${pkgver}"/dist/*.whl
# Install the documentation.
install -Dm644 "${srcdir}"/"${_pkgname}"-"${pkgver}"/README.md "${pkgdir}"/usr/share/doc/"${pkgname}"/
cp -r "${srcdir}"/"${_pkgname}"-"${pkgver}"/docs/* "${pkgdir}"/usr/share/doc/"${pkgname}"/
find "${pkgdir}"/usr/share/doc/"${pkgname}"/ -type d -exec chmod 755 {} +
find "${pkgdir}"/usr/share/doc/"${pkgname}"/ -type f -exec chmod 644 {} +
}
|