aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-pydantic/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-pydantic/APKBUILD')
-rw-r--r--community/py3-pydantic/APKBUILD46
1 files changed, 33 insertions, 13 deletions
diff --git a/community/py3-pydantic/APKBUILD b/community/py3-pydantic/APKBUILD
index 3af5ceac36e..f3262da606a 100644
--- a/community/py3-pydantic/APKBUILD
+++ b/community/py3-pydantic/APKBUILD
@@ -1,33 +1,53 @@
# Contributor: Newbyte <newbyte@disroot.org>
-# Maintainer: Newbyte <newbyte@disroot.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-pydantic
-pkgver=1.9.0
+pkgver=2.6.4
pkgrel=1
pkgdesc="Data parsing and validation using Python type hints"
url="https://github.com/samuelcolvin/pydantic"
arch="noarch"
license="MIT"
-depends="python3 py3-typing-extensions"
-makedepends="py3-setuptools"
-checkdepends="py3-hypothesis py3-pytest py3-pytest-mock"
-source="$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz
- deprecation-warning.patch"
+depends="py3-typing-extensions py3-annotated-types py3-pydantic-core"
+makedepends="py3-gpep517 py3-hatchling py3-wheel py3-hatch-fancy-pypi-readme"
+checkdepends="py3-hypothesis py3-pytest py3-pytest-mock py3-pytest-benchmark py3-dirty-equals py3-cloudpickle py3-faker"
+subpackages="$pkgname-pyc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/samuelcolvin/pydantic/archive/refs/tags/v$pkgver.tar.gz
+ pytest8.patch"
builddir="$srcdir/pydantic-$pkgver"
build() {
- python3 setup.py build
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
}
check() {
- # Requires pydantic to be installed. See issue 2357 on its GitHub repo
- pytest -k "not test_can_construct_models_with_all_fields"
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/*.whl
+ # needs pydantic-email which is not packaged
+ local k="not test_fastapi_startup_perf"
+
+ # fails with pytest 8
+ # https://github.com/pydantic/pydantic/issues/9025
+ k="$k and not test_config_class_is_deprecated"
+ k="$k and not test_config_class_attributes_are_deprecated"
+ k="$k and not test_field_include_deprecation"
+ k="$k and not test_deprecated_module"
+ k="$k and not test_use_bare"
+ k="$k and not test_use_no_fields"
+ k="$k and not test_validator_bad_fields_throws_configerror"
+ k="$k and not test_assert_raises_validation_error"
+
+ .testenv/bin/python3 -m pytest --benchmark-disable -k "$k" \
+ --ignore=tests/test_docs.py
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
}
sha512sums="
-6a9674048933ed5c5f874c975754e264b5bb70499d05102c20641a627c52347d000d1e416be44b0331cb168334a879d25c7274e7ceef7cf044f5412813a53fed py3-pydantic-1.9.0.tar.gz
-7fd9f0a5b49232f271a0f12f727c326512934ba158372199af9ed7b25942cc3aecfd0a5092cbffe934c66b5d59e21a07e7517639d049dca06b61ed5886de6629 deprecation-warning.patch
+dd3cb35d6b062649f30ede0f32740d02e53383d231b3c92e9a6aec26d8fa07a141d22162b2e08efa49ea7321411891f9a34cb5bc2e05186c4069f57cec6e51d2 py3-pydantic-2.6.4.tar.gz
+6860357fc5a1c83c66e1ec697f695c7041593d71c607e03d3388f7225b5c3569b7ad51257dd174d2c34b5ccffded0adc0552b39b60d65808a5733363be429872 pytest8.patch
"