50 lines
1.7 KiB
Bash
50 lines
1.7 KiB
Bash
# Template file for 'maturin'
|
|
pkgname=maturin
|
|
version=0.12.20
|
|
revision=1
|
|
build_style=cargo
|
|
build_helper=qemu
|
|
# Disable the 'rustls' feature, which leads to bad platform compatibility
|
|
# The list of enabled features should be reconciled with each new release
|
|
configure_args="--no-default-features --features log,upload,human-panic"
|
|
hostmakedepends="python3-setuptools-rust python3-tomli"
|
|
makedepends="openssl-devel"
|
|
depends="python3-tomli"
|
|
short_desc="Build and publish crates as python packages"
|
|
maintainer="Andrew J. Hesford <ajh@sideband.org>"
|
|
license="Apache-2.0, MIT"
|
|
homepage="https://github.com/PyO3/maturin"
|
|
# bump target-lexicon version if it changes in Cargo.lock
|
|
distfiles="${homepage}/archive/v${version}.tar.gz
|
|
https://github.com/bytecodealliance/target-lexicon/archive/v0.12.4.tar.gz>target-lexicon-${version}.tar.gz"
|
|
checksum="5a1c9ed2acd8ea1edbe7e8b7ed78f2f6887eff77f696dbdd93f81b606960efbe
|
|
f801dbb02555852e90d56d5a71e73ee42678c1bc583bb62a2970d4158f6ab6de"
|
|
# Tests use unstable features and fail to build
|
|
make_check=no
|
|
|
|
post_extract() {
|
|
mv ../target-lexicon* target-lexicon
|
|
echo "[patch.crates-io]" >> Cargo.toml
|
|
echo "target-lexicon = { path = './target-lexicon' }" >> Cargo.toml
|
|
}
|
|
|
|
post_build() {
|
|
# python package is pure; the cross environment is not relevant
|
|
python3 setup.py build
|
|
|
|
# Generate some completions
|
|
_matbin="target/${RUST_TARGET}/release/maturin"
|
|
vtargetrun "${_matbin}" completions zsh > maturin.zsh
|
|
vtargetrun "${_matbin}" completions fish > maturin.fish
|
|
vtargetrun "${_matbin}" completions bash > maturin.bash
|
|
}
|
|
|
|
post_install() {
|
|
vlicense license-mit LICENSE-MIT
|
|
python3 setup.py install --prefix=/usr --root=${DESTDIR}
|
|
|
|
vcompletion maturin.zsh zsh
|
|
vcompletion maturin.fish fish
|
|
vcompletion maturin.bash bash
|
|
}
|