blob: b817ddc8a2a0accf56c5a345854273922dc7b55b (
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
|
# Maintainer: taotieren <admin@taotieren.com>
pkgname=python-kicad
_name=${pkgname#python-}
pkgver=0.6.0
pkgrel=1
pkgdesc="KiCad API Python Bindings"
provides=(${pkgname} kicad-python)
conflicts=(${pkgname} kicad-python)
arch=('any')
url="https://gitlab.com/kicad/code/kicad-python"
_pydeps=(
jsonschema
protobuf
typing_extensions
# AUR
pynng
)
depends=('python'
"${_pydeps[@]/#/python-}")
makedepends=(
git
'python-poetry'
'python-poetry-core'
'python-poetry-plugin-export'
'python-build'
'python-installer'
'python-setuptools'
'python-wheel'
# AUR
'python-protoletariat'
'python-mypy-protobuf'
)
optdepends=('kicad')
license=('MIT')
source=(
"${pkgname}::git+${url}.git#tag=$pkgver"
"kicad::git+https://gitlab.com/kicad/code/kicad.git"
)
sha256sums=('4f7bb9d8d1d7a3fe046fe564a4933f8abd9ba4fe3dc121ee48a962ac36689abd'
'SKIP')
prepare() {
git -C "${srcdir}/${pkgname}" clean -dfx
cd "${srcdir}/${pkgname}"
git submodule init
git config submodule.kicad.url "$srcdir/kicad"
git -c protocol.file.allow=always submodule update
}
build() {
cd "${srcdir}/${pkgname}"
# python -m build --wheel --no-isolation
./dist.sh
}
package() {
cd "${srcdir}/${pkgname}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|