summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9da7dde7cee7c51c6ab609efe01a878e882ee2f5 (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
pkgname=python-ezdxf
_commit=063bb398c5c4ed036611c8699668bd0b9a0e3a86
pkgver=1.3.5
pkgrel=1
pkgdesc="Python interface to DXF"
arch=('x86_64')
url=https://ezdxf.mozman.at/
license=('MIT')
depends=(
python-typing_extensions
python-pyparsing
python-numpy
python-fonttools
)
makedepends=(
python-setuptools
python-build
python-installer
python-wheel
cython
git
)
checkdepends=(
python-pytest
python-pillow
)
source=("git+https://github.com/mozman/ezdxf.git#commit=${_commit}")
sha256sums=('SKIP')

pkgver() {
  cd ezdxf
  git describe --tags | sed 's/^v//'
}

prepare() {
  cd ezdxf
}

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

check() {
  cd ezdxf
  cd src
  python -m pytest ../tests ../integration_tests -k 'not test_version and not test_audit_existing_file and not test_audit_file_not_found'
}

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

  # install examples
  mkdir -p "${pkgdir}/usr/share/${pkgname}"
  cp -a examples "${pkgdir}/usr/share/${pkgname}"
  cp -a examples_dxf "${pkgdir}/usr/share/${pkgname}"
}

# vim:ts=2:sw=2:et: