From 28d7379f73bf70b168070df6badd8150d115d6da Mon Sep 17 00:00:00 2001 From: cherry530 <707078654@qq.com> Date: Wed, 26 Apr 2023 15:09:47 +0800 Subject: [PATCH] Adapting to the pyproject.toml compilation mode Signed-off-by: cherry530 <707078654@qq.com> --- 0001-add-setup.py.patch | 12 ----------- python-pytest-xdist.spec | 44 ++++++++++++++-------------------------- 2 files changed, 15 insertions(+), 41 deletions(-) delete mode 100644 0001-add-setup.py.patch diff --git a/0001-add-setup.py.patch b/0001-add-setup.py.patch deleted file mode 100644 index 2f065e6..0000000 --- a/0001-add-setup.py.patch +++ /dev/null @@ -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" -+ ) diff --git a/python-pytest-xdist.spec b/python-pytest-xdist.spec index f531cd1..853f2f5 100644 --- a/python-pytest-xdist.spec +++ b/python-pytest-xdist.spec @@ -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 help -f doclist.lst + +%files -n python3-pytest-xdist +%{python3_sitelib}/xdist +%{python3_sitelib}/pytest_xdist* + +%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 - 3.2.1-1 - Update package to version 3.2.1 -- Gitee