summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 251a689cbbf7a769c36cbd750bd902965dafa24e (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
# Maintainer: Marco Rubin <marco.rubin@protonmail.com>

_name=matlab-engine-for-python
pkgname=python-matlabengine
pkgver=9.14.3
pkgrel=1
pkgdesc='A module to call MATLAB from Python'
arch=(x86_64)
url='https://github.com/mathworks/matlab-engine-for-python'
license=('MIT')
depends=('matlab>=9.14' 'python>=3.8' 'python<3.11')
makedepends=(python-build python-installer 'python-setuptools>=42' python-wheel)
source=("$url/archive/refs/tags/$pkgver.tar.gz")
b2sums=('491f56fad8007a943b33b9daebcba4a61ca007d93151eaa65394439d4ca9ef1745d4b28e5a41b6dea858da36ecbdaba07b1a6ac0005ebc6373abdc06f3f7fa7e')

build() {
    cd $_name-$pkgver
    _matlabroot=$(matlab -nodisplay -nojvm -batch "matlabroot" | grep -Eo "/.*[^']")
    export LD_LIBRARY_PATH=$_matlabroot/bin/glnxa64
    python -m build --wheel --no-isolation
}

package() {
    cd $_name-$pkgver
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}