summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9a27c08ef11e9301e2b732c36570c765ca94b232 (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
# Maintainer: Achmad Fathoni<fathoni.id(at)gmail.com>
pkgname=python-pyportfolioopt
_pkgname=PyPortfolioOpt
pkgver=1.5.1
pkgrel=1
pkgdesc="Financial portfolio optimization in python"
arch=('any')
url="https://pypi.org/project/${_pkgname}"
license=('MIT')
makedepends=(python-build python-installer python-wheel python-poetry)
depends=(
    python
    python-cvxopt
    python-cvxpy
    python-matplotlib
    python-numpy
    python-pandas
    python-scikit-learn
    python-scipy
    python-yfinance
)
source=(https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz)
sha256sums=('49af6f4f3fcf850b4a9808251802d8f26299b32877694d97981da8b5bd344d98')

prepare() {
    # https://github.com/robertmartin8/PyPortfolioOpt/issues/425
    cd ${srcdir}/${_pkgname}-${pkgver}
    sed -ie '2s/PyPortfolioOpt/pyportfolioopt/' pyproject.toml
}

build() {
    cd ${srcdir}/${_pkgname}-${pkgver}
    python -m build --wheel --no-isolation
}

package() {
    cd ${srcdir}/${_pkgname}-${pkgver}
    python -m installer --destdir="$pkgdir" dist/*.whl
}