public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/reuse] epel10: Patch out python-magic dependency
@ 2026-08-19 12:50 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-08-19 12:50 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/reuse
            Branch : epel10
            Commit : c840f3e04738e8b43599917fd225c214a064d70f
            Author : Jan Staněk <jstanek@redhat.com>
            Date   : 2025-10-10T13:36:32+02:00
            Stats  : +38/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/reuse/c/c840f3e04738e8b43599917fd225c214a064d70f?branch=epel10

            Log:
            Patch out python-magic dependency

Resolves: rhbz#2402682

---
diff --git a/0001-remove-dependency-on-python-magic.patch b/0001-remove-dependency-on-python-magic.patch
new file mode 100644
index 0000000..99a2b22
--- /dev/null
+++ b/0001-remove-dependency-on-python-magic.patch
@@ -0,0 +1,31 @@
+From 5aed4a73cbaa70d6656b2931f9b139e44f20157b Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Fri, 10 Oct 2025 12:34:30 +0200
+Subject: [PATCH] remove dependency on python-magic
+
+python-magic conflicts with the python bindings shipped with the
+libmagic itself, and the reuse code does not currently allow us
+to use that.
+
+Related: https://bugzilla.redhat.com/show_bug.cgi?id=2402682
+Signed-off-by: rpm-build <rpm-build>
+---
+ pyproject.toml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index cee2c2b..682c6ce 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -66,7 +66,7 @@ click = ">=8.1"
+ # libmagic to be available. The other libraries are fallbacks, in that order. If
+ # you do not want a dependency on python-magic, you can patch out this
+ # requirement and instead hard-require one of the fallbacks.
+-python-magic = ">=0.4.12"
++#python-magic = ">=0.4.12"
+ charset-normalizer = { version = ">=2.0.5", optional = true }
+ chardet = { version = ">=3.0.2", optional = true }
+ 
+-- 
+2.51.0
+

diff --git a/reuse.spec b/reuse.spec
index d4b233c..c508cf1 100644
--- a/reuse.spec
+++ b/reuse.spec
@@ -8,6 +8,8 @@ License:        Apache-2.0 AND CC0-1.0 AND CC-BY-SA-4.0 AND GPL-3.0-or-later
 Url:            https://github.com/fsfe/reuse-tool
 Source0:        %pypi_source
 
+Patch:  0001-remove-dependency-on-python-magic.patch
+
 # Build
 BuildRequires:  python3-devel
 BuildRequires:  gettext
@@ -26,6 +28,10 @@ BuildRequires:  %{py3_dist sphinx_rtd_theme}
 BuildRequires:  %{py3_dist sphinxcontrib-apidoc}
 Recommends:     git
 Recommends:     mercurial
+# FIXME: This probably should be handled by the dependency generator
+# and better handling of extras, but needs to be hardcoded for now
+# See https://bugzilla.redhat.com/show_bug.cgi?id=2402682 for issue that triggered this.
+Requires:       %{py3_dist charset-normalizer}
 BuildArch:      noarch
 
 %description
@@ -37,7 +43,7 @@ generates a project's bill of materials.
 %autosetup -n %{name}-%{version} -S git_am
 
 %generate_buildrequires
-%pyproject_buildrequires
+%pyproject_buildrequires -x charset-normalizer
 
 %build
 %pyproject_wheel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-19 12:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-19 12:50 [rpms/reuse] epel10: Patch out python-magic dependency 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox