45 lines
1.5 KiB
Bash
45 lines
1.5 KiB
Bash
# Template file for 'maturin'
|
|
pkgname=maturin
|
|
version=0.10.3
|
|
revision=1
|
|
build_style=cargo
|
|
# 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 python3-toml"
|
|
makedepends="openssl-devel"
|
|
depends="python3-toml"
|
|
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 platforms version if it changes in Cargo.lock
|
|
distfiles="${homepage}/archive/v${version}.tar.gz
|
|
https://github.com/RustSec/platforms-crate/archive/v1.1.0.tar.gz"
|
|
checksum="48e42dc7b9da5d4aa523d6e6fb607434be4a3ac08639b9c278edf716255ed91b
|
|
2524984c2ef547bb54515828e4afad0e781a439d74cf0197cf168ec6c818594c"
|
|
|
|
post_extract() {
|
|
mv ../platforms-crate* platforms
|
|
echo "[patch.crates-io]" >> Cargo.toml
|
|
echo "platforms = { path = './platforms' }" >> Cargo.toml
|
|
}
|
|
|
|
post_patch() {
|
|
# setup.py is broken, just use it for the pure python part
|
|
vsed -e 's/cmdclass.*/packages=["maturin"],/' -i setup.py
|
|
}
|
|
|
|
post_build() {
|
|
# python package is pure; the cross environment is not relevant
|
|
python3 setup.py build
|
|
}
|
|
|
|
do_check() {
|
|
echo "Tests use unstable features and fail to build; skipping"
|
|
}
|
|
|
|
post_install() {
|
|
vlicense license-mit LICENSE-MIT
|
|
python3 setup.py install --prefix=/usr --root=${DESTDIR}
|
|
}
|