summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f3e35a0a94b2c94ee37257d58759f0e9bd94c882 (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
_name=build123d
pkgname="python-${_name}-git"
pkgdesc="A python CAD programming library"
pkgver=v0.9.1.r167.08a9014
pkgrel=1
arch=('any')
url="https://github.com/gumyr/build123d"
license=('Apache')
depends=('python-ocp>=7.8' 'python-lib3mf>=2.3.1' 'python-typing_extensions' 'python-numpy' 'python-svgpathtools'
    'python-anytree' 'python-ezdxf' 'ipython' 'python-ocpsvg' 'python-trianglesolver' 'python-sympy')
makedepends=('git' 'python-setuptools-scm' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${_name}::git+https://github.com/gumyr/${_name}#branch=dev")
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${_name}"
    printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

#prepare() {
#    cd "${srcdir}/${_name}"
#    patch -Np1 -i ../upstream_lib3mf.patch
#}

build() {
    cd "${srcdir}/${_name}"
    python -m build --wheel --no-isolation
}

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

check() {
    cd "${srcdir}/${_name}"
    PYTHONPATH="$PWD/build/lib" pytest
}