blob: 94e707bcd36d45de2f51ed966f55dfb0da3043f5 (
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
|
#!/usr/bin/env bash
# shellcheck disable=SC2034
# shellcheck disable=SC2154
# The PKGBUILD for DataSieve.
# Maintainer: Matheus <matheusgwdl@protonmail.com>
# Contributor: Matheus <matheusgwdl@protonmail.com>
readonly _pkgname="datasieve"
pkgname="python-datasieve"
pkgver="0.1.7"
pkgrel="1"
pkgdesc="Adding coherence to the SKLearn pipeline."
arch=("any")
url="https://github.com/emergentmethods/${_pkgname}"
license=("MIT")
depends=("python" "python-pandas" "python-scikit-learn")
makedepends=("python-build" "python-installer" "python-poetry-core")
checkdepends=("python-pytest")
source=("${pkgname}-v${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=("5c2a49b077d450e387c944e6d839a722075ab00c0fdb82e8d88e0f5b866adbac158bb47cdb824f382413e0cf9b7d0dd76bafeda42f5c52b094ba6af6c126a88f")
build()
{
cd "${srcdir}"/"${_pkgname}"-"${pkgver}"/ || exit 1
# -n cannot be used as Python files will be missing.
python -m build -w
}
check()
{
cd "${srcdir}"/"${_pkgname}"-"${pkgver}"/ || exit 1
# TODO
# pytest
}
package()
{
# Assure that the directories exist.
mkdir -p "${pkgdir}"/usr/share/doc/"${pkgname}"/
mkdir -p "${pkgdir}"/usr/share/licenses/"${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}"/
# Install the license.
install -Dm644 "${srcdir}"/"${_pkgname}"-"${pkgver}"/LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/
}
|