summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 17fd813f32e20b676aee5a254e6eedfc2f1e1b39 (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
# Maintainer: Jon Bergli Heier <snakebite@jvnv.net>

_basename=pymodes
pkgname=python-${_basename}
pkgver=2.17
pkgrel=2
pkgdesc="Python decoder for Mode S and ADS-B signals"
arch=('any')
url="https://github.com/junzis/pyModeS"
license=('GPL3')
depends=('python' 'python-numpy' 'python-pyzmq' 'python-pyrtlsdr')
makedepends=('python-installer' 'python-poetry' 'cython' 'python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_basename:0:1}/${_basename}/${_basename}-${pkgver}.tar.gz")
sha256sums=('fe73e9ae3bfdb58416f42a08e4e1b132680bac46ff572815caae6eb47dc40941')

prepare() {
	# Temporary fix until next release
	cd "$_basename-$pkgver"
	echo "Patching build files"
	sed \
		-e 's/^from distutils\.core/from setuptools/' \
		-e 's/^from distutils\./from setuptools./' \
		-e 's/get_outputs/get_output_mapping/' -i build.py
	sed -e '/^requires/s/]/, "setuptools>=69.1.1"]/' -i pyproject.toml
}

build() {
	cd "$_basename-$pkgver"
	poetry build
}

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