Convert to pyproject-rpm-macros
This commit is contained in:
parent
233cbd0186
commit
604580b1c0
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 0.6.0
|
Version: 0.6.0
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Test utilities for code working with files and commands
|
Summary: Test utilities for code working with files and commands
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -13,34 +13,28 @@ Source0: %pypi_source
|
|||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python3-pip
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
|
||||||
BuildRequires: python3-flit-core
|
|
||||||
|
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
BuildRequires: python3-sphinx_rtd_theme
|
BuildRequires: python3-sphinx_rtd_theme
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Tests:
|
%global _description %{expand:
|
||||||
BuildRequires: python3-pytest
|
Testpath is a collection of utilities for Python code working with files and
|
||||||
|
commands.
|
||||||
|
|
||||||
%global _description \
|
It contains functions to check things on the filesystem, and tools for
|
||||||
Testpath is a collection of utilities for Python code working with files and \
|
mocking system commands and recording calls to those.}
|
||||||
commands. \
|
|
||||||
\
|
|
||||||
It contains functions to check things on the filesystem, and tools for \
|
|
||||||
mocking system commands and recording calls to those.
|
|
||||||
|
|
||||||
%description %_description
|
%description %_description
|
||||||
|
|
||||||
|
|
||||||
%package -n python3-%{pypi_name}
|
%package -n python3-%{pypi_name}
|
||||||
Summary: %summary
|
Summary: %summary
|
||||||
|
|
||||||
%description -n python3-%{pypi_name}
|
%description -n python3-%{pypi_name} %_description
|
||||||
|
|
||||||
%_description
|
|
||||||
|
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
%package doc
|
%package doc
|
||||||
@ -56,12 +50,13 @@ Documentation for %{name}.
|
|||||||
# The exe files are only needed on Microsoft Windows
|
# The exe files are only needed on Microsoft Windows
|
||||||
rm -f %{pypi_name}/*.exe
|
rm -f %{pypi_name}/*.exe
|
||||||
|
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
%pyproject_buildrequires -x test
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# this package has no setup.py
|
%pyproject_wheel
|
||||||
# and upstream does not want one
|
|
||||||
# https://github.com/takluyver/flit/issues/74
|
|
||||||
# we use flit to create a wheel from sources
|
|
||||||
%{python3} -m flit_core.wheel
|
|
||||||
|
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
# generate html docs
|
# generate html docs
|
||||||
@ -72,27 +67,29 @@ rm -rf html/.{doctrees,buildinfo}
|
|||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# We install the wheel created at %%build
|
%pyproject_install
|
||||||
%py3_install_wheel %{pypi_name}-%{version}-py3-none-any.whl
|
%pyproject_save_files %{pypi_name}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%pytest
|
%pytest
|
||||||
|
|
||||||
|
|
||||||
%files -n python3-%{pypi_name}
|
%files -n python3-%{pypi_name} -f %{pyproject_files}
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/
|
|
||||||
%{python3_sitelib}/%{pypi_name}/
|
|
||||||
|
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
%files doc
|
%files doc
|
||||||
%doc html
|
%doc html
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 13 2023 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-5
|
||||||
|
- Convert to pyproject-rpm-macros
|
||||||
|
- The INSTALLER file now says "rpm" instead of "pip"
|
||||||
|
|
||||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-4
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user