public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-pypdf] rawhide: Avoid unwanted dependencies on RHEL
Date: Mon, 10 Aug 2026 12:15:14 GMT [thread overview]
Message-ID: <178636411486.1.1837986039066925998.rpms-python-pypdf-e4d7d982f74c@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-pypdf
Branch : rawhide
Commit : e4d7d982f74c09149837427007a1eeb0769306af
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date : 2026-08-09T21:44:05-04:00
Stats : +26/-1 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-pypdf/c/e4d7d982f74c09149837427007a1eeb0769306af?branch=rawhide
Log:
Avoid unwanted dependencies on RHEL
psutils version 3 was rewritten in Python and now requires pypdf. RHEL
does not include all the dependencies needed for the docs, extras, or
tests.
---
diff --git a/python-pypdf.spec b/python-pypdf.spec
index c7d38ca..90fb675 100644
--- a/python-pypdf.spec
+++ b/python-pypdf.spec
@@ -1,3 +1,11 @@
+# docs require myst_parser and python3-docs, not in RHEL
+%bcond docs %[%{undefined rhel} || %{defined epel}]
+# fonts support requires fonttools, buildroot only in RHEL
+# image support requires Pillow, not in RHEL
+%bcond extras %[%{undefined rhel} || %{defined epel}]
+# tests require Pillow, pytest-socket, and pytest-timeout, not in RHEL
+%bcond tests %[%{undefined rhel} || %{defined epel}]
+
%global srcname pypdf
%global forgeurl https://github.com/py-pdf/pypdf
@@ -13,13 +21,17 @@ Source: %{forgeurl}/archive/%{version}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
+%if %{with docs}
BuildRequires: python3-docs
BuildRequires: sed
+%endif
+%if %{with tests}
# Test dependencies added manually since pyproject.toml doesn't specify them
# separately from dev dependencies.
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pytest-socket)
BuildRequires: python3dist(pytest-timeout)
+%endif
%global _description %{expand:
pypdf is a free and open-source pure-python PDF library capable of splitting,
@@ -34,50 +46,63 @@ Summary: %{summary}
%description -n python3-pypdf %_description
+%if %{with extras}
%pyproject_extras_subpkg -n python3-pypdf crypto,fonts,image,full
+%endif
+%if %{with docs}
%package doc
Summary: Documentation for %{name}
Requires: python3-docs
%description doc
This package provides additional documentation for %{name}.
+%endif
%prep
%autosetup -p1 -n %{srcname}-%{version}
+%if %{with docs}
# Use local intersphinx inventory
sed -r \
-e 's|https://docs.python.org/\{python_version\}|%{_docdir}/python3-docs/html|' \
-i docs/conf.py
+%endif
%generate_buildrequires
-%pyproject_buildrequires -x crypto,fonts,image,full,docs
+%pyproject_buildrequires %{?with_tests:-x crypto,fonts,image,full} %{?with_docs:-x docs}
%build
%pyproject_wheel
+%if %{with docs}
# Build docs
sphinx-build-3 docs html
rm -rf html/{.buildinfo,.doctrees}
+%endif
%install
%pyproject_install
%pyproject_save_files %{srcname}
%check
+%pyproject_check_import
+%if %{with tests}
# Deselect tests downloading files from external hosts and tests requiring
# sample files which are not included in the source tarball.
%pytest -m "not enable_socket and not samples"
+%endif
%files -n python3-%{srcname} -f %{pyproject_files}
# https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/4Y2VRLVAR3DJXBSFVDYJMU3G4ZNPGEU6/
%license LICENSE
%doc README.md CHANGELOG.md CONTRIBUTORS.md
+%if %{with docs}
%files doc
%license LICENSE
%doc html
+%endif
%changelog
%autochangelog
reply other threads:[~2026-08-10 12:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178636411486.1.1837986039066925998.rpms-python-pypdf-e4d7d982f74c@fedoraproject.org \
--to=yselkowi@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox