38 lines
1.3 KiB
Bash
38 lines
1.3 KiB
Bash
# Template file for 'python3-pydantic-core'
|
|
pkgname=python3-pydantic-core
|
|
version=2.21.0
|
|
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"
|
|
changelog="https://github.com/pydantic/pydantic-core/releases"
|
|
distfiles="${PYPI_SITE}/p/pydantic_core/pydantic_core-${version}.tar.gz"
|
|
checksum=79c747f9916e5b6cb588dfd994d9ac15a93e43eb07467d9e6f24d892c176bbf5
|
|
|
|
# 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
|
|
}
|