summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b4d7fbe285b5c472db73b9570aa5b20e4b0af01c (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
# Maintainer: Lucas H. Gabrielli <heitzmann@gmail.com>

pkgname=python-dolfin-git
pkgdesc="Python interface of FEniCS for ordinary and partial differential equations."
pkgver=20210202
pkgrel=1
arch=('i686' 'x86_64')
url="https://github.com/FEniCS/dolfinx"
license=('GPL3')
groups=('fenics-git')
depends=('dolfin-git' 'python-pkgconfig' 'python-ply')
optdepends=('python-matplotlib: plotting support' 'slepc4py')
makedepends=('python-setuptools' 'git')
options=(!emptydirs)
source=("dolfin::git+https://github.com/FEniCS/dolfinx.git")
md5sums=('SKIP')

pkgver() {
    cd dolfin
    git log --format="%cd" --date=short -1 | sed 's/-//g'
}

build() {
    [ -n "$PETSC_DIR" ] && source /etc/profile.d/petsc.sh
    [ -e /etc/profile.d/slepc.sh ] && [ -n "$SLEPC_DIR" ] && source /etc/profile.d/slepc.sh

    cd dolfin/python
    python setup.py build
}

package() {
    cd dolfin/python
    python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
}