## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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 %global pypi_name mizani # Generate HTML documentation %bcond_without doc # Provide man pages %bcond_without man %global _description %{expand: Mizani is a scales package for graphics. It is written in Python and is based on Hadley Wickham’s Scales.} Name: python-%{pypi_name} Version: 0.9.3 Release: %{autorelease} Summary: Scales package for graphics BuildArch: noarch # MIT License applies to doc/theme/static/bootstrap-3.4.1 # Python-2.0.1 license applies to doc/_static/copybutton.js License: BSD-3-Clause AND MIT AND Python-2.0.1 URL: https://github.com/has2k1/%(pypi_name) Source0: %{pypi_source %{pypi_name}} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-pytest BuildRequires: git-core %if %{with doc} || %{with man} BuildRequires: make BuildRequires: coreutils %if %{with doc} BuildRequires: python3-sphinx %endif %if %{with man} BuildRequires: python3-numpydoc %endif %endif %description -n python3-%{pypi_name} %_description %if %{with doc} %package doc Summary: HTML documentation for %{name} Requires: python3-%{pypi_name} == %{version} %description doc %{summary} %endif %prep %autosetup -p1 -n %{pypi_name}-%{version} # Disable coverage sed -i -e 's/--cov=mizani --cov-report=xml//' pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %if %{with doc} || %{with man} pushd doc %if %{with doc} make html %endif %if %{with man} make man %endif popd %endif %install %pyproject_install %if %{with doc} mkdir -p %{buildroot}/%{_pkgdocdir} cp -a doc/_build/html %{buildroot}/%{_pkgdocdir} rm -rf %{buildroot}/%{_pkgdocdir}/html/.buildinfo %endif %if %{with man} mkdir -p %{buildroot}/%{_mandir}/man1 cp -a doc/_build/man/*.1 %{buildroot}/%{_mandir}/man1 %endif %pyproject_save_files %{pypi_name} %check %pytest %files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.md %if %{with man} %{_mandir}/man1/%{pypi_name}.1* %endif %license LICENSE %license licences/*LICENSE %if %{with doc} %files doc %dir %{_pkgdocdir} %doc %{_pkgdocdir}/html %endif %changelog * Tue Sep 12 2023 Sandro - 0.9.3-1 - Update to 0.9.3 (bugfix release) * Tue Sep 12 2023 Sandro - 0.9.2-1 - Revert "Update to 0.10.0 (RHBZ#2227226)" * Sat Sep 09 2023 Ankur Sinha (Ankur Sinha Gmail) - 0.10.0-2 - chore(packit): init * Sun Sep 03 2023 Sandro - 0.10.0-1 - Update to 0.10.0 (RHBZ#2227226) * Fri Jul 21 2023 Fedora Release Engineering - 0.9.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jun 28 2023 Python Maint - 0.9.2-3 - Rebuilt for Python 3.12 * Sun Jun 25 2023 Sandro - 0.9.2-2 - Fix packaging of man pages and docs - Use %%{buildroot} macro instead of $RPM_BUILD_ROOT * Sat Jun 03 2023 Sandro - 0.9.2-1 - Update tp 0.9.2 (RHBZ#2208636) * Wed Apr 19 2023 Sandro - 0.9.0-3 - Drop '-t' (not using tox) * Wed Apr 19 2023 Sandro - 0.9.0-2 - Drop setuptools-scm * Tue Apr 18 2023 Sandro - 0.9.0-1 - Update to 0.9.0 (RHBZ#2186992) - Drop patch - Use pyproject.toml - README.rst --> README.md * Tue Apr 11 2023 Sandro - 0.8.1-4 - Fix TypeError in Sphinx config (RHBZ#2180474) * Mon Mar 27 2023 Sandro - 0.8.1-3 - Use macro * Fri Jan 20 2023 Fedora Release Engineering - 0.8.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Oct 21 2022 Sandro - 0.8.1-1 - Initial release (RHBZ#2130026)