80 lines
1.5 KiB
Bash
80 lines
1.5 KiB
Bash
name='maturin'
|
|
version='1.7.4'
|
|
release='1'
|
|
desc='Build and publish crates with pyo3, rust-cpython and cffi bindings.'
|
|
homepage='https://github.com/PyO3/maturin'
|
|
maintainer_ru='Евгений Храмов <xpamych@yandex.ru>'
|
|
architectures=('amd64')
|
|
license=('Apache-2.0 OR MIT')
|
|
provides=('maturin')
|
|
conflicts=('maturin')
|
|
|
|
depends=(
|
|
'bzip2'
|
|
'libgcc'
|
|
'glibc'
|
|
'openssl'
|
|
'rust'
|
|
)
|
|
build_deps=(
|
|
'bzip2'
|
|
'libgcc'
|
|
'git'
|
|
'glibc'
|
|
'python3-build'
|
|
'python3-installer'
|
|
'python3-setuptools'
|
|
'python3-setuptools-rust'
|
|
'python3-wheel'
|
|
'rust'
|
|
'openssl-devel'
|
|
)
|
|
build_deps_almalinux=(
|
|
'bzip2'
|
|
'libgcc'
|
|
'git'
|
|
'glibc'
|
|
'python3-build'
|
|
'python3-installer'
|
|
'python3-setuptools'
|
|
'python3-setuptools-rust'
|
|
'python3-setuptools-wheel'
|
|
'rust'
|
|
'openssl-devel'
|
|
)
|
|
options=(!lto)
|
|
sources=("https://github.com/PyO3/maturin/archive/v$version/$name-v$version.tar.gz")
|
|
checksums=('SKIP')
|
|
|
|
_pick() {
|
|
local p="$1" f d; shift
|
|
for f; do
|
|
d="$srcdir/$p/${f#$pkgdir/}"
|
|
mkdir -p "$(dirname "$d")"
|
|
mv "$f" "$d"
|
|
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
|
|
done
|
|
}
|
|
|
|
prepare() {
|
|
cd $name-$version
|
|
cargo fetch --locked --target "x86_64-unknown-linux-gnu"
|
|
}
|
|
|
|
build() {
|
|
cd $name-$version
|
|
MATURIN_SETUP_ARGS="--all-features" python -m build --wheel --no-isolation
|
|
}
|
|
|
|
package() {
|
|
cd $name-$version
|
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
|
install -vDm 644 {Changelog,README}.md -t "$pkgdir/usr/share/doc/$pkgname/"
|
|
install-license license-mit ./maturin/LICENSE
|
|
|
|
(
|
|
cd "$pkgdir"
|
|
_pick python-name usr/lib
|
|
)
|
|
}
|