## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 9; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # # We can generate PDF documentation as a substitute. %bcond doc_pdf 1 Name: python-helpdev Version: 0.7.1 Release: %autorelease Summary: HelpDev – Extracts information about the Python environment easily # The GitLab archive contains tests and documentation; the PyPI sdist doesn’t. %global forgeurl https://gitlab.com/dpizetta/helpdev %global tag v%{version} %forgemeta # The entire source is (SPDX) MIT, except for “Images,” which are CC-BY-4.0 (an # allowed license for content). The images in question seem to be only the # contents of docs/images/, which are not incorporated in the helpdev.pdf file # in the -doc subpackage (but are not present in any other subpackages). License: MIT URL: %{forgeurl} Source: %{forgesource} # Remove useless shebang lines from package modules # https://gitlab.com/dpizetta/helpdev/-/merge_requests/4 Patch: %{forgeurl}/-/merge_requests/4.patch BuildArch: noarch BuildRequires: python3-devel # Selected test dependencies from req-test.txt; most entries in that file are # for linters, code coverage, etc. Note that we use pytest directly because tox # doesn’t add anything useful for us in this package. BuildRequires: %{py3_dist pytest} # The generated man page is pretty good in this case; it’s probably not worth # hand-writing one. BuildRequires: help2man %if %{with doc_pdf} # We don’t generate documentation dependencies from req-doc.txt because: # - There is extra cruft in there (setuptools, wheel, etc.): no big deal # - We don’t need sphinx_rtd_theme because we aren’t building HTML # - We need to specify the extra BR’s for building LaTeX/PDF manually anyway BuildRequires: make BuildRequires: python3dist(sphinx) BuildRequires: python3-sphinx-latex BuildRequires: latexmk %endif %global common_description %{expand: Helping users and developers to get information about the environment to report bugs or even test your system without spending a day on it. It can get information about hardware, OS, paths, Python distribution and packages, including Qt-things.} %description %{common_description} %package -n python3-helpdev Summary: %{summary} Recommends: python3-helpdev+memory_info = %{version}-%{release} %description -n python3-helpdev %{common_description} %pyproject_extras_subpkg -n python3-helpdev memory_info %package doc Summary: Documentation and examples for HelpDev # The entire source is (SPDX) MIT, except for images incorporated in # helpdev.pdf, which are CC-BY-4.0; see also the more verbose comment above the # base package License field. License: MIT AND CC-BY-4.0 %description doc This package includes documentation and examples for HelpDev. %prep %autosetup -p1 %{forgesetupargs} %generate_buildrequires %pyproject_buildrequires -x memory_info %build %pyproject_wheel %if %{with doc_pdf} PYTHONPATH="${PWD}" %make_build -C docs latex \ SPHINXOPTS='-j%{?_smp_build_ncpus}' %make_build -C build/docs/latex LATEXMKOPTS='-quiet' %endif %install %pyproject_install %pyproject_save_files -l helpdev # Generating the man page in %%install allows us to use the installed entry # point; horrible hacks would be required to do this in %%build. install -d '%{buildroot}%{_mandir}/man1' PYTHONPATH='%{buildroot}%{python3_sitelib}' help2man \ --no-info --output='%{buildroot}%{_mandir}/man1/helpdev.1' \ '%{buildroot}%{_bindir}/helpdev' %check %pytest -v %files -n python3-helpdev -f %{pyproject_files} %{_bindir}/helpdev %{_mandir}/man1/helpdev.1* %files doc %license LICENSE.rst %doc CHANGES.rst %doc README.rst # Text files, mostly sample output %doc examples/ %if %{with doc_pdf} %doc build/docs/latex/helpdev.pdf %endif %changelog ## START: Generated by rpmautospec * Fri Jul 19 2024 Fedora Release Engineering - 0.7.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jun 07 2024 Python Maint - 0.7.1-8 - Rebuilt for Python 3.13 * Fri Jan 26 2024 Fedora Release Engineering - 0.7.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.7.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Dec 18 2023 Benjamin A. Beasley - 0.7.1-4 - Assert that %%pyproject_files contains a license file * Fri Nov 10 2023 Benjamin A. Beasley - 0.7.1-3 - Use forgesetupargs with autosetup instead of forgeautosetup * Tue Sep 19 2023 Benjamin A. Beasley - 0.7.1-2 - Remove obsolete sed-patch * Tue Sep 19 2023 Benjamin A. Beasley - 0.7.1-1 - Update to 0.7.1 (close RHBZ#2239611) - The hard dependency on python-psutil is dropped; there is a new memory_info extra and a corresponding metapackage, upon which we carry a weak (Recommends:) dependency. * Tue Sep 19 2023 Benjamin A. Beasley - 0.6.10-20 - Convert License to SPDX - Accurately account for image licensing in the -doc subpackage * Tue Sep 19 2023 Benjamin A. Beasley - 0.6.10-19 - Remove useless shebang lines from package modules * Tue Sep 19 2023 Benjamin A. Beasley - 0.6.10-18 - Add a (generated) man page * Tue Sep 19 2023 Benjamin A. Beasley - 0.6.10-17 - Add a -doc subpackage with examples and PDF documentation * Tue Sep 19 2023 Benjamin A. Beasley - 0.6.10-16 - Port to pyproject-rpm-macros - Switch to GitLab archive instead of PyPI sdist to get tests and docs - Run the tests - Clean up obsolete packaging macros and practices - Remove bogus manual runtime dependency on setuptools - Package the changelog * Fri Jul 21 2023 Fedora Release Engineering - 0.6.10-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jun 13 2023 Python Maint - 0.6.10-13 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 0.6.10-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.6.10-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 0.6.10-10 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 0.6.10-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 0.6.10-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.6.10-7 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.6.10-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 0.6.10-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 0.6.10-4 - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 0.6.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Mon Dec 23 2019 Mukundan Ragavan - 0.6.10-2 - Fix spec issues * Sat Dec 21 2019 Mukundan Ragavan - 0.6.10-1 - Initial package. ## END: Generated by rpmautospec