summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 62420a1261e2037e1fc7706fd76dc2bfb7d7bdaf (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
pkgname=python-cadquery
local _build_hash=c44978d60cee2d61bdadf4cb4498286b7034b4c6
pkgver=2.4.0
pkgrel=6
pkgdesc="A parametric CAD scripting framework based on PythonOCC"
arch=(x86_64)
url="https://github.com/CadQuery/cadquery"
license=('Apache')
conflicts=(python-cadquery-git)
depends=(
'python-ocp>=7.7.2'
python-ezdxf
nlopt
python-typish
python-nptyping
python-multimethod
python-casadi-bin
)
checkdepends=(
python-pytest
python-typing_extensions
python-docutils
)
makedepends=(
git
python-setuptools-scm
python-build
python-installer
python-wheel
)

source=("git+https://github.com/CadQuery/cadquery#commit=${_build_hash}")
sha256sums=(SKIP)

pkgver() {
  cd cadquery
  git describe --tags | rev | cut -d- -f2- | rev | sed 's/-/.r/'
}

prepare() {
  cd cadquery
  curl --silent https://patch-diff.githubusercontent.com/raw/CadQuery/cadquery/pull/1589.patch | patch -p1
}

build() {
  cd cadquery
  python -m build --wheel --no-isolation
}

check() {
  cd cadquery

  _these_fail=(
  test_colors_assy0[chassis0_assy-expected0]
  test_colors_fused_assy[chassis0_assy-expected5]
  test_colors_assy1[chassis0_assy-expected10]
  testTextAlignment
  test_project
  testDXF  # https://github.com/CadQuery/cadquery/issues/1550
  test_dxf_approx
  test_dxf_text
  testExtrude # https://github.com/CadQuery/cadquery/issues/1550
  )
  printf -v _joined '%s and not ' "${_these_fail[@]}"
  python -m pytest tests -k "$(echo "not ${_joined% and not }")"  # skip the tests we know fail
}

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