Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 1 | SUMMARY = "Provides the core functionality for pydantic validation and serialization." |
| 2 | DESCRIPTION = "This package provides the core functionality for \ |
| 3 | pydantic validation and serialization.\ |
| 4 | \ |
| 5 | Pydantic-core is currently around 17x faster than pydantic V1." |
| 6 | HOMEPAGE = "https://github.com/pydantic/pydantic-core" |
| 7 | |
| 8 | LICENSE = "MIT" |
| 9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ab599c188b4a314d2856b3a55030c75c" |
| 10 | |
Patrick Williams | 705982a | 2024-01-12 09:51:57 -0600 | [diff] [blame^] | 11 | SRC_URI[sha256sum] = "1fd0c1d395372843fba13a51c28e3bb9d59bd7aebfeb17358ffaaa1e4dbbe948" |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 12 | |
| 13 | DEPENDS = "python3-maturin-native python3-typing-extensions" |
| 14 | |
| 15 | require ${BPN}-crates.inc |
| 16 | |
| 17 | inherit pypi cargo-update-recipe-crates python_maturin |
| 18 | |
| 19 | S = "${WORKDIR}/pydantic_core-${PV}" |
| 20 | |
| 21 | PYPI_ARCHIVE_NAME = "pydantic_core-${PV}.${PYPI_PACKAGE_EXT}" |
| 22 | |
| 23 | RDEPENDS:${PN} += "python3-typing-extensions" |
| 24 | |
| 25 | INSANE_SKIP:${PN} = "already-stripped" |
| 26 | |
| 27 | inherit ptest |
| 28 | SRC_URI += "file://run-ptest" |
| 29 | RDEPENDS:${PN}-ptest += "\ |
| 30 | python3-dirty-equals \ |
| 31 | python3-hypothesis \ |
| 32 | python3-pytest \ |
| 33 | python3-pytest-mock \ |
| 34 | python3-unittest-automake-output \ |
| 35 | " |
| 36 | |
Patrick Williams | 705982a | 2024-01-12 09:51:57 -0600 | [diff] [blame^] | 37 | do_install:append() { |
| 38 | for f in ${D}/${libdir}/${PYTHON_DIR}/site-packages/pydantic_core/_pydantic_core.*.so |
| 39 | do |
| 40 | fname=`basename $f` |
| 41 | lname=`echo $fname | sed 's/musl/gnu/'` |
| 42 | if [ "$fname" != "$lname" ]; then |
| 43 | mv $f ${D}/${libdir}/${PYTHON_DIR}/site-packages/pydantic_core/$lname |
| 44 | fi |
| 45 | done |
| 46 | } |
| 47 | |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 48 | do_install_ptest() { |
| 49 | cp -rf ${S}/tests/ ${D}${PTEST_PATH}/ |
| 50 | rm -rf ${D}${PTEST_PATH}/tests/benchmarks |
| 51 | } |