public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pyroaring] rawhide: Unbundle croaring
@ 2026-10-08 13:36 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-10-08 13:36 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-pyroaring
Branch : rawhide
Commit : 381b5064f9c99189225f9b32a9b65276ccd8bde4
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-10-08T14:06:34+01:00
Stats : +57/-4 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/python-pyroaring/c/381b5064f9c99189225f9b32a9b65276ccd8bde4?branch=rawhide
Log:
Unbundle croaring
---
diff --git a/0001-Respect-system-compiler-flags-no-O3.patch b/0001-Respect-system-compiler-flags-no-O3.patch
index 444ebff..8b19e54 100644
--- a/0001-Respect-system-compiler-flags-no-O3.patch
+++ b/0001-Respect-system-compiler-flags-no-O3.patch
@@ -1,7 +1,7 @@
From 28694e93817bbfff0b04e2a72ce71b51dcbcb104 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Thu, 8 Oct 2026 13:25:11 +0100
-Subject: [PATCH] Respect system compiler flags (no -O3)
+Subject: [PATCH 1/2] Respect system compiler flags (no -O3)
---
setup.py | 5 +++--
diff --git a/0002-Do-not-build-bundled-croaring-library-link-libroarin.patch b/0002-Do-not-build-bundled-croaring-library-link-libroarin.patch
new file mode 100644
index 0000000..4f1f6aa
--- /dev/null
+++ b/0002-Do-not-build-bundled-croaring-library-link-libroarin.patch
@@ -0,0 +1,37 @@
+From a0051e78b077dbc083f5743a6a9616bc9d1fc287 Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Thu, 8 Oct 2026 13:29:45 +0100
+Subject: [PATCH 2/2] Do not build bundled croaring library; link libroaring
+
+Removing the bundled copy and dealing with include paths are outside the
+scope of this patch.
+---
+ setup.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 9105dc3..93c49a4 100755
+--- a/setup.py
++++ b/setup.py
+@@ -66,6 +66,8 @@ else:
+ sources=[os.path.join(PKG_DIR, 'pyroaring.pyx')],
+ extra_compile_args=compile_args + ["-std=c++11"],
+ language='c++',
++ # https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling
++ libraries = ['roaring'],
+ )
+
+ # Because we compile croaring with a c compiler with sometimes incompatible arguments,
+@@ -78,7 +80,8 @@ else:
+ "extra_compile_args": compile_args + ["-std=c11"],
+ },
+ )
+- libraries = [croaring]
++ # https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling
++ libraries = None
+
+ setup(
+ name='pyroaring',
+--
+2.55.0
+
diff --git a/python-pyroaring.spec b/python-pyroaring.spec
index 2adddab..d862a1b 100644
--- a/python-pyroaring.spec
+++ b/python-pyroaring.spec
@@ -3,8 +3,11 @@ Version: 1.0.3
Release: %autorelease
Summary: Library for handling efficiently sorted integer sets
-# pyroaring/roaring.c and pyroaring/roaring.h are dual licensed
-License: MIT or Apache-2.0
+# The source contains a bundled, amalgamated copy of croaring in
+# pyroaring/roaring.{h,c}; these two files are (Apache-2.0 OR MIT). We remove
+# them in %%prep, so they do not contribute to the licenses of the binary RPMs.
+License: MIT
+SourceLicense: %{license} AND (Apache-2.0 OR MIT)
URL: https://github.com/Ezibenroc/PyRoaringBitMap
Source: %{url}/archive/%{version}/PyRoaringBitMap-%{version}.tar.gz
@@ -13,9 +16,18 @@ Source: %{url}/archive/%{version}/PyRoaringBitMap-%{version}.tar.gz
# Downstream-only because upstream validly wants to add -O3 (but we have not
# proven it is justified).
Patch: 0001-Respect-system-compiler-flags-no-O3.patch
+# Do not build bundled croaring library; link libroaring
+#
+# Removing the bundled copy and dealing with include paths are outside the
+# scope of this patch.
+#
+# Downstream-only for now; it would be nice to suggest an easy way to use a
+# system copy upstream, but it’s not immediately obvious how best to do this in
+# an upstreamable way.
+Patch: 0002-Do-not-build-bundled-croaring-library-link-libroarin.patch
-BuildRequires: gcc
BuildRequires: gcc-c++
+BuildRequires: pkgconfig(roaring)
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
@@ -35,6 +47,10 @@ Summary: %{summary}
%prep
%autosetup -n PyRoaringBitMap-%{version} -p1
+# Unbundle croaring
+rm pyroaring/roaring.c
+printf '#include <%s>\n' 'roaring/roaring.h' > pyroaring/roaring.h
+
%generate_buildrequires
%pyproject_buildrequires --tox --toxenv=cython3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-08 13:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 13:36 [rpms/python-pyroaring] rawhide: Unbundle croaring Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox