Upgrade the installation method to pyproject

This commit is contained in:
li-miaomiao_zhr 2023-07-06 10:13:25 +08:00
parent 1289202086
commit 7222ca15c4

View File

@ -1,7 +1,7 @@
%global _empty_manifest_terminate_build 0
Name: python-pytest-mpl
Version: 0.16.1
Release: 1
Release: 2
Summary: pytest plugin to help with testing figures output from Matplotlib
License: BSD
URL: https://github.com/matplotlib/pytest-mpl
@ -22,6 +22,7 @@ Provides: python-pytest-mpl
# Base build requires
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
BuildRequires: python3-pbr
BuildRequires: python3-pip
BuildRequires: python3-wheel
@ -66,10 +67,10 @@ compatible with Python 3.6 and later, and requires pytest <>_ and matplotlib <.
%autosetup -n pytest-mpl-%{version}
%build
%py3_build
%pyproject_build
%install
%py3_install
%pyproject_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
@ -77,36 +78,27 @@ if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%check
%{__python3} setup.py test
%files -n python3-pytest-mpl -f filelist.lst
%dir %{python3_sitelib}/*
%files -n python3-pytest-mpl
%{python3_sitelib}/pytest_mpl/
%{python3_sitelib}/pytest_mpl-*.dist-info/
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu Jul 6 2023 li-miaomiao_zhr <mmlidc@isoftstone.com> - 0.16.1-2
- Upgrade the installation method to pyproject
* Mon Dec 12 2022 wubijie <wubijie@kylinos.cn> - 0.16.1-1
- Update package to version 0.16.1