blob: c735899d2b086b5f8d41e79c2471d176625f8dea (
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
|
# Maintainer: Karashi <Karashi123@users.noreply.github.com>
pkgname=python-fastlayer-git
_pkgname=fastlayer
pkgver=0.1.0.r1.g26ef074
pkgrel=2
pkgdesc="高速インメモリキャッシュ + NumPy/Numba最適化フレームワーク (VCS版)"
arch=('any')
url="https://github.com/Karashi123/fastlayer"
license=('Apache')
depends=('python' 'python-numpy' 'python-numba')
makedepends=('git' 'python-build' 'python-installer' 'python-wheel' 'python-setuptools')
optdepends=('cython: Cython実装を試す場合'
'pybind11: pybind11実装を試す場合')
provides=('python-fastlayer')
conflicts=('python-fastlayer')
source=("git+${url}.git")
sha256sums=('SKIP')
pkgver() {
cd "${srcdir}/${_pkgname}"
git describe --tags --long 2>/dev/null \
| sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
# もし git describe を使いたくない場合は、元の printf 版でも可
# printf "%s.r%s.g%s" "$(grep -Po '(?<=version=\")([^\\\"]+)' setup.py | head -n1)" \
# "$(git rev-list --count HEAD)" \
# "$(git rev-parse --short HEAD)"
}
build() {
cd "${srcdir}/${_pkgname}"
python -m build --wheel --no-isolation
}
package() {
cd "${srcdir}/${_pkgname}"
python -m installer --destdir="${pkgdir}" dist/*.whl
# Licenses
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
if [[ -f NOTICE ]]; then
install -Dm644 NOTICE "${pkgdir}/usr/share/licenses/${pkgname}/NOTICE"
fi
# Documentation
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
if [[ -f CHANGELOG.md ]]; then
install -Dm644 CHANGELOG.md "${pkgdir}/usr/share/doc/${pkgname}/CHANGELOG.md"
fi
}
|