Adapting to the pyproject.toml compilation mode

Signed-off-by: cherry530 <707078654@qq.com>
This commit is contained in:
cherry530 2023-04-26 15:09:47 +08:00
parent 349cd6bc99
commit 28d7379f73
2 changed files with 13 additions and 39 deletions

View File

@ -1,12 +0,0 @@
--- a/setup.py 1970-01-01 08:00:00.000000000 +0800
+++ b/setup.py 2022-10-19 09:38:57.746598491 +0800
@@ -0,0 +1,9 @@
+#!/usr/bin/env python
+
+from setuptools import setup
+
+if __name__ == "__main__":
+ setup(
+ name = "pytest-xdist",
+ version = "3.2.1"
+ )

View File

@ -1,14 +1,15 @@
%global _empty_manifest_terminate_build 0
Name: python-pytest-xdist
Version: 3.2.1
Release: 1
Release: 2
Summary: pytest xdist plugin for distributed testing and loop-on-failing modes
License: MIT
URL: https://github.com/pytest-dev/pytest-xdist
Source0: https://files.pythonhosted.org/packages/e3/f8/de2dcd2938c05270c9881cb1463dea388acd0b239ee76809160420157784/pytest-xdist-3.2.1.tar.gz
Patch0: 0001-add-setup.py.patch
BuildArch: noarch
BuildRequires: python3-pip python3-hatchling python3-hatch-vcs python3-wheel
%description
pytest xdist plugin for distributed testing and loop-on-failing modes.
@ -34,10 +35,11 @@ pytest xdist plugin for distributed testing and loop-on-failing modes.
%autosetup -n pytest-xdist-%{version}
%build
%py3_build
%pyproject_build
%install
%py3_install
%pyproject_install pytest-xdist==%{version}
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
@ -46,34 +48,18 @@ if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
if [ -f README.rst ]; then cp -af README.rst %{buildroot}/%{_pkgdocdir}; fi
if [ -f README.md ]; then cp -af README.md %{buildroot}/%{_pkgdocdir}; fi
if [ -f README.txt ]; then cp -af README.txt %{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 .
%files -n python3-pytest-xdist -f filelist.lst
%dir %{python3_sitelib}/*
%files -n python3-pytest-xdist
%{python3_sitelib}/xdist
%{python3_sitelib}/pytest_xdist*
%files help -f doclist.lst
%files help
%{_docdir}/*
%changelog
* Wed Apr 26 2023 xu_ping <707078654@qq.com> - 3.2.1-2
- Adapting to the pyproject.toml compilation mode
* Fri Mar 24 2023 wangjunqi <wangjunqi@kylinos.cn> - 3.2.1-1
- Update package to version 3.2.1