Compare commits

...
Sign in to create a new pull request.

19 commits

Author SHA1 Message Date
Benjamin A. Beasley
e3564f4545 No longer allow compact_str 0.8 2025-04-14 10:47:11 -04:00
Benjamin A. Beasley
c5771d270e Expect maturin to handle license files, except LICENSES.vendored/
See discussion in https://bugzilla.redhat.com/show_bug.cgi?id=2357473.
2025-04-14 10:47:09 -04:00
Benjamin A. Beasley
b897e39a32 Update to 3.10.6 (close RHBZ#2354600)
- Fixes compatibility with CPython 3.14 alpha 6 (close RHBZ#2349447)
2025-04-03 08:50:11 -04:00
Benjamin A. Beasley
557eb6f4f0 Remove spurious test dependency on arrow 2025-04-03 08:50:10 -04:00
Benjamin A. Beasley
a6ba1242a8 Omit Pendulum integration tests in EPEL10 2025-04-03 08:50:07 -04:00
Benjamin A. Beasley
1d5f8b2efe Replace rust-packaging BR with cargo-rpm-macros
https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/#_mandatory_buildrequires

[skip changelog]
2025-04-03 08:50:06 -04:00
Benjamin A. Beasley
de35b7307f Update to 3.10.14 (close RHBZ#2336424) 2025-01-09 15:53:02 -05:00
Miro Hrončok
95250cb6da Allow the bundled pyo3 to build this with unsupported Python versions
[skip changelog]
2025-01-09 15:53:00 -05:00
Benjamin A. Beasley
1b47f1a1fb Update to 3.10.13 (close RHBZ#2334886)
- Work around upstream’s maturin version pin to allow building with
  maturin 1.8.0
2025-01-09 15:52:59 -05:00
Benjamin A. Beasley
27c4c09348 Update to 3.10.12. Fixes rhbz#2328508 2025-01-09 15:52:58 -05:00
Benjamin A. Beasley
685e618ce9 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
2024-11-04 08:06:48 -05:00
Benjamin A. Beasley
4934db060e Update to 3.10.7. Fixes rhbz#2303811 2024-08-11 13:11:26 -04:00
Maxwell G
262e9dc821 Update to 3.10.6.
- Fixes rhbz#2291190, fixes rhbz#2278078, fixes rhbz#2264126.
2024-07-31 14:23:01 -04:00
Benjamin A. Beasley
0fa86799d6 Convert to %autorelease and %autochangelog
[skip changelog]
2024-07-31 14:20:40 -04:00
Benjamin A. Beasley
5052b5c625 Enable skipped pandas and psutil integration tests 2024-06-04 12:59:17 -04:00
Benjamin A. Beasley
4a83f9b813 Re-enable skipped numpy and pendulum integration tests 2024-06-04 12:59:11 -04:00
Benjamin A. Beasley
ea25c769b4 Print the reasons for skipped tests 2024-06-04 12:51:27 -04:00
Benjamin A. Beasley
d8820d2ebc Update to 3.9.15 2024-06-04 12:37:24 -04:00
Benjamin A. Beasley
44182464ba Rebuild with Rust 1.78 to fix incomplete debuginfo and backtraces 2024-05-24 12:53:57 -04:00
5 changed files with 129 additions and 82 deletions

9
.gitignore vendored
View file

@ -8,3 +8,12 @@
/orjson-3.9.10.tar.gz
/orjson-3.9.12.tar.gz
/orjson-3.9.13.tar.gz
/orjson-3.9.15.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
/orjson-3.10.12.tar.gz
/orjson-3.10.13.tar.gz
/orjson-3.10.14.tar.gz
/orjson-3.10.16.tar.gz

View file

@ -1,25 +0,0 @@
From db97d953cbe35e6a34372e4a9d4702d3fdd5ddb1 Mon Sep 17 00:00:00 2001
From: Maxwell G <maxwell@gtmx.me>
Date: Thu, 18 Jan 2024 21:07:59 +0000
Subject: [PATCH] Remove strict ahash version pin
---
Cargo.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Cargo.toml b/Cargo.toml
index c2cf457..475a1c0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -45,7 +45,7 @@ no-panic = [
yyjson = []
[dependencies]
-ahash = { version = "=0.8.6", default_features = false, features = ["compile-time-rng"] }
+ahash = { version = "0.8.6", default_features = false, features = ["compile-time-rng"] }
arrayvec = { version = "0.7", default_features = false, features = ["std", "serde"] }
associative-cache = { version = "2", default_features = false }
beef = { version = "0.5", default_features = false, features = ["impl_serde"] }
--
2.43.0

49
changelog Normal file
View file

@ -0,0 +1,49 @@
* Tue Jun 04 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 3.9.15-1
- Update to 3.9.15.
* Fri May 24 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 3.9.13-2
- Rebuild with Rust 1.78 to fix incomplete debuginfo and backtraces
* Tue Feb 6 2024 Maxwell G <maxwell@gtmx.me> - 3.9.13-1
- Update to 3.9.13. Fixes rhbz#2262570.
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 18 2024 Maxwell G <maxwell@gtmx.me> - 3.9.12-1
- Update to 3.9.12. Fixes rhbz#2259025.
* Wed Nov 22 2023 Maxwell G <maxwell@gtmx.me> - 3.9.10-1
- Update to 3.9.10. Fixes rhbz#2243767.
* Tue Oct 10 2023 Maxwell G <maxwell@gtmx.me> - 3.9.8-1
- Update to 3.9.8. Fixes rhbz#2229530.
* Tue Jul 25 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.9.2-2
- Backport patch to add PyType_GetDict for Python 3.12
- Fixes: rhbz#2220383
* Fri Jul 21 2023 Maxwell G <maxwell@gtmx.me> - 3.9.2-1
- Update to 3.9.2. Fixes rhbz#2211703.
* Fri Jul 21 2023 Maxwell G <maxwell@gtmx.me> - 3.8.14-1
- Update to 3.8.14.
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 27 2023 Python Maint <python-maint@redhat.com> - 3.8.12-2
- Rebuilt for Python 3.12
* Thu May 18 2023 Maxwell G <maxwell@gtmx.me> - 3.8.12-1
- Update to 3.8.12.
- Use maturin as a build system when available
* Fri May 5 2023 Maxwell G <maxwell@gtmx.me> - 3.8.11-1
- Update to 3.8.11. Fixes rhbz#2193468.
* Wed Apr 12 2023 Maxwell G <maxwell@gtmx.me> - 3.8.10-1
- Initial package (rhbz#2184237).

View file

@ -6,21 +6,34 @@
# Specfile compatability: EPEL >= 9 or Fedora >= 37 and RPM >= 4.16
%bcond tests 1
# Not yet in EPEL10: https://bugzilla.redhat.com/show_bug.cgi?id=2356387
%bcond pendulum %{undefined el10}
Name: python-orjson
Version: 3.9.13
Release: 1%{?dist}
Version: 3.10.16
Release: %autorelease
Summary: Fast, correct Python JSON library
License: Apache-2.0 OR MIT
URL: https://github.com/ijl/orjson
Source: %{pypi_source orjson}
Patch: Remove-strict-ahash-version-pin.patch
BuildRequires: tomcli
BuildRequires: python3-devel
BuildRequires: %{py3_dist pytest-forked}
BuildRequires: rust-packaging
# Upstream restricts these test dependencies to particular Python interpreter
# versions and architectures, but we would like to run the corresponding tests
# everywhere.
BuildRequires: %{py3_dist numpy}
%if %{with pendulum}
BuildRequires: %{py3_dist pendulum}
%endif
# These are not in tests/requirements.txt, but they enable additional tests
%ifnarch %{ix86}
BuildRequires: %{py3_dist pandas}
%endif
BuildRequires: %{py3_dist psutil}
BuildRequires: cargo-rpm-macros >= 24
%global _description %{expand:
@ -35,16 +48,31 @@ Summary: %{summary}
# (Apache-2.0 OR MIT) AND BSD-3-Clause
# Apache-2.0 OR BSL-1.0
# Apache-2.0 OR MIT
# BSD-2-Clause OR Apache-2.0 OR MIT
# BSL-1.0
# 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
(Apache-2.0 OR BSL-1.0) AND
(BSD-2-Clause OR Apache-2.0 OR MIT) AND
MIT
BSL-1.0 AND
MIT AND
(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 these crates are actually forked, not only bundled/vendored; see
# https://github.com/ijl/orjson/issues/524#issuecomment-2424170405 for details.
Provides: bundled(crate(pyo3-build-config)) = 0.23.3
Provides: bundled(crate(pyo3-ffi)) = 0.23.3
%description -n python3-orjson %{_description}
@ -53,88 +81,74 @@ License: %{shrink:
%autosetup -p1 -n orjson-%{version}
%cargo_prep
# Remove unstable feature that requires rust nightly
# Remove unstable features that require rust nightly; the avx512 feature also
# requires the x86_64 architecture
tomcli-set Cargo.toml del 'features.unstable-simd'
# Remove no-panic feature
tomcli-set Cargo.toml del 'features.no-panic'
tomcli-set Cargo.toml del 'features.avx512'
# Remove unwind feature, which is not useful here: the comment above it says
# “Avoid bundling libgcc on musl.”
tomcli-set Cargo.toml del 'features.unwind'
tomcli-set Cargo.toml del 'dependencies.unwinding'
# Remove bundled rust crates
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/
%if %{without pendulum}
sed -i '/^pendulum\b/d' test/requirements.txt
%endif
# Test dependency on arrow appears spurious
# https://github.com/ijl/orjson/issues/559
sed -i '/^arrow\b/d' test/requirements.txt
# 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
export RUSTFLAGS='%{build_rustflags}'
%cargo_license_summary
%{cargo_license} > LICENSES.dependencies
# Fedora's pyo3 is patched to not check Python version when building RPM packages.
# However, this uses a bundled version without the patch.
# Rather than patching it, we set the environment variable,
# which allows us to test this package with development Python versions.
export UNSAFE_PYO3_SKIP_VERSION_CHECK=1
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files orjson
%pyproject_save_files -l orjson
%check
%pyproject_check_import
%if %{with tests}
# --forked: protect the pytest process against test segfaults
%pytest --forked
# -rs: print the reasons for skipped tests
%pytest --forked -rs
%endif
%files -n python3-orjson -f %{pyproject_files}
%license LICENSE-MIT LICENSE-APACHE LICENSES.dependencies
%license LICENSES.vendored/
%doc README.md
%changelog
* Tue Feb 6 2024 Maxwell G <maxwell@gtmx.me> - 3.9.13-1
- Update to 3.9.13. Fixes rhbz#2262570.
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 18 2024 Maxwell G <maxwell@gtmx.me> - 3.9.12-1
- Update to 3.9.12. Fixes rhbz#2259025.
* Wed Nov 22 2023 Maxwell G <maxwell@gtmx.me> - 3.9.10-1
- Update to 3.9.10. Fixes rhbz#2243767.
* Tue Oct 10 2023 Maxwell G <maxwell@gtmx.me> - 3.9.8-1
- Update to 3.9.8. Fixes rhbz#2229530.
* Tue Jul 25 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.9.2-2
- Backport patch to add PyType_GetDict for Python 3.12
- Fixes: rhbz#2220383
* Fri Jul 21 2023 Maxwell G <maxwell@gtmx.me> - 3.9.2-1
- Update to 3.9.2. Fixes rhbz#2211703.
* Fri Jul 21 2023 Maxwell G <maxwell@gtmx.me> - 3.8.14-1
- Update to 3.8.14.
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 27 2023 Python Maint <python-maint@redhat.com> - 3.8.12-2
- Rebuilt for Python 3.12
* Thu May 18 2023 Maxwell G <maxwell@gtmx.me> - 3.8.12-1
- Update to 3.8.12.
- Use maturin as a build system when available
* Fri May 5 2023 Maxwell G <maxwell@gtmx.me> - 3.8.11-1
- Update to 3.8.11. Fixes rhbz#2193468.
* Wed Apr 12 2023 Maxwell G <maxwell@gtmx.me> - 3.8.10-1
- Initial package (rhbz#2184237).
%autochangelog

View file

@ -1 +1 @@
SHA512 (orjson-3.9.13.tar.gz) = c3fc7ad42a2ea40fa996cec11609c3d72ad3ad42a2ef24d36472bb89e5231ae6288c4ded57ba69074a04244e2e8ab7cf878c26b79bb01d5f6883be18395cd219
SHA512 (orjson-3.10.16.tar.gz) = ea71aa463206feae1a96bb604366af2f17ddb083a1a4b7cc87c1b8ad1f01b54bd5c4ef148e9472fed8d8308de37b2a4e4fe0b4a4290d19eaf4fc3ae5777791f9