Update to 3.10.11. Fixes rhbz#2319918

- Both pyo3-ffi and pyo3-build-config are now vendored and forked
- Add license files for vendored PyO3 crates
This commit is contained in:
Benjamin A. Beasley 2024-10-19 14:15:01 -04:00
commit 7fd8624716
3 changed files with 29 additions and 4 deletions

2
.gitignore vendored
View file

@ -12,3 +12,5 @@
/orjson-3.10.3.tar.gz
/orjson-3.10.6.tar.gz
/orjson-3.10.7.tar.gz
/orjson-3.10.10.tar.gz
/orjson-3.10.11.tar.gz

View file

@ -8,7 +8,7 @@
%bcond tests 1
Name: python-orjson
Version: 3.10.7
Version: 3.10.11
Release: %autorelease
Summary: Fast, correct Python JSON library
@ -48,6 +48,8 @@ Summary: %{summary}
# MIT
# MIT OR Apache-2.0 (duplicate)
# Unlicense OR MIT
#
# Bundled PyO3 crates in include/pyo3/ are also (Apache-2.0 OR MIT).
License: %{shrink:
(Apache-2.0 OR MIT) AND
BSD-3-Clause AND
@ -57,6 +59,18 @@ License: %{shrink:
(Unlicense OR MIT)
}
# Path to using published versions of pyo3-ffi/pyo3-build-config again?
# https://github.com/ijl/orjson/issues/524
#
# “You are welcome to work to upstream the diff if you find the vendoring
# unsuitable for your organization's own preferences.”
#
# Note that the vendored crates are actually *forked* from a snapshot,
# https://github.com/PyO3/pyo3/commit/dc415fae9f5eaa8ac0f6d0ea769b9ab28860898f;
# see https://github.com/ijl/orjson/issues/524#issuecomment-2424170405 for
# details.
Provides: bundled(crate(pyo3-build-config)) = 0.23.0~dev^20241018gitdc415fa
Provides: bundled(crate(pyo3-ffi)) = 0.23.0~dev^20241018gitdc415fa
%description -n python3-orjson %{_description}
@ -82,14 +96,23 @@ rm -r include/cargo
# Remove bundled yyjson.
rm -rv include/yyjson/
# Collect licenses for remaining vendored crates
mkdir -p LICENSES.vendored/pyo3
cp -vp include/pyo3/LICENSE* LICENSES.vendored/pyo3/
# Remove unpackaged PyPI plugin
sed -i '/pytest-random-order/d' test/requirements.txt
%generate_buildrequires
%pyproject_buildrequires %{?with_tests:test/requirements.txt}
%cargo_generate_buildrequires
for dir in include/pyo3/*/
do
pushd "${dir}" >/dev/null
%cargo_generate_buildrequires
popd >/dev/null
done
%build
@ -114,7 +137,7 @@ export RUSTFLAGS='%{build_rustflags}'
%files -n python3-orjson -f %{pyproject_files}
%license LICENSE-MIT LICENSE-APACHE LICENSES.dependencies
%license LICENSE-MIT LICENSE-APACHE LICENSES.dependencies LICENSES.vendored/
%doc README.md

View file

@ -1 +1 @@
SHA512 (orjson-3.10.7.tar.gz) = 3940b76039d6494626e69f9a2a0373779827c6686ab1321411f3b3a5056e0df227b68c9555796ce45f3952fe597c50740934d764f30dcf8bc1c84b2baf4b6631
SHA512 (orjson-3.10.11.tar.gz) = b7a960cd06c0176a194c7c9e9dd412c47000258fb79e2407182156e07a48bc02823118ac708c23f482bcb8f3b77dcdcfd95f61f408b45cbaabca8ed317ef63e4