37 lines
1.2 KiB
Bash
37 lines
1.2 KiB
Bash
# Template file for 'python3-pydantic-core'
|
|
pkgname=python3-pydantic-core
|
|
version=2.16.3
|
|
revision=1
|
|
build_style=python3-pep517
|
|
build_helper=rust
|
|
hostmakedepends="maturin cargo"
|
|
makedepends="python3-typing_extensions"
|
|
depends="python3-typing_extensions"
|
|
checkdepends="${depends} python3-pytest python3-pytest-benchmark
|
|
python3-pytest-timeout python3-pytest-mock python3-hypothesis
|
|
python3-dirty-equals"
|
|
short_desc="Core functionality for pydantic-core validation and serialization"
|
|
maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
|
|
license="MIT"
|
|
homepage="https://github.com/pydantic/pydantic-core"
|
|
distfiles="${PYPI_SITE}/p/pydantic_core/pydantic_core-${version}.tar.gz"
|
|
checksum=1cac689f80a3abab2d3c0048b29eea5751114054f032a941a32de4c852c59cad
|
|
|
|
# taken from python3-adblock
|
|
if [ "$CROSS_BUILD" ]; then
|
|
makedepends+=" rust-std"
|
|
hostmakedepends+=" python3-typing_extensions"
|
|
export PYO3_CROSS_LIB_DIR="${XBPS_CROSS_BASE}/usr/lib"
|
|
export PYO3_CROSS_INCLUDE_DIR="${XBPS_CROSS_BASE}/usr/include"
|
|
fi
|
|
|
|
do_build() {
|
|
maturin build -o . --release --target "${RUST_TARGET}" --manylinux off
|
|
mkdir -p dist
|
|
mv pydantic_core-${version}-*.whl dist/pydantic_core-${version}-py3-none-any.whl
|
|
}
|
|
|
|
post_install() {
|
|
vlicense LICENSE
|
|
}
|