Convert to pyproject-rpm-macros
This commit is contained in:
parent
2284bf6dca
commit
2926db9da5
@ -7,6 +7,11 @@ URL: https://pypi.org/project/MarkupSafe/
|
||||
Source: %pypi_source MarkupSafe
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: python3-devel
|
||||
|
||||
# This dependency is listed in requirements/tests.in but that file is not in the sdist
|
||||
# requirements/tests.txt pins exact versions of dependencies, so we rather list it manually:
|
||||
BuildRequires: python3-pytest
|
||||
|
||||
%description
|
||||
A library for safe markup escaping.
|
||||
@ -14,10 +19,6 @@ A library for safe markup escaping.
|
||||
|
||||
%package -n python3-markupsafe
|
||||
Summary: Implements a XML/HTML/XHTML Markup safe string for Python 3
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3dist(setuptools)
|
||||
# Test dependencies
|
||||
BuildRequires: python3dist(pytest)
|
||||
|
||||
%description -n python3-markupsafe
|
||||
A library for safe markup escaping. Python 3 version.
|
||||
@ -25,27 +26,29 @@ A library for safe markup escaping. Python 3 version.
|
||||
|
||||
%prep
|
||||
%autosetup -n MarkupSafe-%{version}
|
||||
# Exclude C source from the package:
|
||||
echo 'global-exclude *.c' >> MANIFEST.in
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires
|
||||
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%pyproject_wheel
|
||||
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
# C code errantly gets installed
|
||||
rm %{buildroot}%{python3_sitearch}/markupsafe/*.c
|
||||
%pyproject_install
|
||||
%pyproject_save_files markupsafe
|
||||
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
|
||||
%files -n python3-markupsafe
|
||||
%license LICENSE.rst
|
||||
%files -n python3-markupsafe -f %{pyproject_files}
|
||||
%doc CHANGES.rst README.rst
|
||||
%{python3_sitearch}/MarkupSafe-%{version}-py%{python3_version}.egg-info/
|
||||
%{python3_sitearch}/markupsafe/
|
||||
|
||||
|
||||
%changelog
|
||||
|
||||
Loading…
Reference in New Issue
Block a user