blob: ccf8b96a87cebce891ba100436c18d7c2eb20349 (
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
|
# Maintainer: Magi3r <magier dot mit dot f3erball at gmail dot com>
# PKGBUILD generated by pipman
# Python package author: <Nicolas Patry <patry.nicolas@protonmail.com>>
pkgname=python-safetensors-bin
_name=safetensors
pkgver=0.5.3
pkgrel=2
pkgdesc="Simple, safe way to store and distribute tensors. Installed via pypi."
arch=('x86_64')
url="https://github.com/huggingface/safetensors"
license=()
depends=('python')
makedepends=('python-build' 'python-installer' 'python-wheel')
optdepends=('python-jax'
'python-flax'
'python-jaxlib'
'python-numpy'
'python-paddlepaddle'
'python-tensorflow'
'python-pytorch')
provides=("python-safetensors")
conflicts=("python-safetensors")
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('b6b0d6ecacec39a4fdd99cc19f4576f5219ce858e6fd8dbe7609df0b8dc56965')
build() {
cd $_name-$pkgver
python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd $_name-$pkgver
}
package() {
cd $_name-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
# Symlink license file
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
install -d "$pkgdir"/usr/share/licenses/$pkgname
ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
|