diff --git a/pytest-forked-1.0.2.tar.gz b/pytest-forked-1.0.2.tar.gz deleted file mode 100644 index df676ae3ac6ab2d14f77e7dd7ba319a95ad5a408..0000000000000000000000000000000000000000 Binary files a/pytest-forked-1.0.2.tar.gz and /dev/null differ diff --git a/pytest-forked-1.3.0.tar.gz b/pytest-forked-1.3.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..13bb2e800e4bea1bd236c12ad8dcf9a07a9ba0f8 Binary files /dev/null and b/pytest-forked-1.3.0.tar.gz differ diff --git a/python-pytest-forked.spec b/python-pytest-forked.spec index 1c523528b0413cc256c232af1ca17c2475645784..d343e380aa062dfe7bee0707a4aa82b8c9e35691 100644 --- a/python-pytest-forked.spec +++ b/python-pytest-forked.spec @@ -1,38 +1,51 @@ -%global pypi_name pytest-forked -%global desc The pytest-forked plugin extends py.test by adding an option to run tests in\ -isolated forked subprocesses. This is useful if you have tests involving C or\ -C++ libraries that might crash the process. To use the plugin, simply use the\ ---forked argument when invoking py.test. - -Name: python-%{pypi_name} -Version: 1.0.2 -Release: 2 -Summary: py.test plugin for running tests in isolated forked subprocesses +%global _empty_manifest_terminate_build 0 +%global common_description \ +pytest-forked: run each test in a forked subprocess .. warning:: this is a \ +extraction of the xdist --forked module, future maintenance beyond the bare \ +minimum is not planned until a new maintainer is found. This plugin **does not \ +work on Windows*because there's no fork support. --forked: run each test in a \ +forked subprocess to survive SEGFAULTS or otherwise dying processes. \ +Installation --Install the plugin with:: pip install pytest-forkedor use the \ +package in develope/in-place mode with a checkout of the pytest-forked \ +repository :: pip install -e . +Name: python-pytest-forked +Version: 1.3.0 +Release: 1 +Summary: run tests in isolated forked subprocesses License: MIT URL: https://github.com/pytest-dev/pytest-forked -Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/62/92/2d418d7b0c9d68a2e885b66d7f6805f9678ce56ad2b3a77669437b2d139a/pytest-forked-1.3.0.tar.gz BuildArch: noarch -Patch1: 0001-fix-testcase-fail-with-Pytest6-and-Pytest5.patch - -BuildRequires: python3-devel -BuildRequires: python3-py python3-pytest python3-setuptools_scm - %description -%{desc} +%{common_description} -%package -n python3-%{pypi_name} -Summary: %{summary} -%{?python_provide:%python_provide python3-%{pypi_name}} +%package -n python3-pytest-forked +Summary: run tests in isolated forked subprocesses +Provides: python-pytest-forked +# Base build requires +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +BuildRequires: python3-pip +BuildRequires: python3-wheel +# General build requires +BuildRequires: python3-py +BuildRequires: python3-pytest +# General requires +Requires: python3-py +Requires: python3-pytest +%description -n python3-pytest-forked +%{common_description} -Requires: python3-py python3-pytest -%description -n python3-%{pypi_name} -%{desc} +%package help +Summary: run tests in isolated forked subprocesses +Provides: python3-pytest-forked-doc +%description help +%{common_description} %prep -%autosetup -p1 -n %{pypi_name}-%{version} -rm -f testing/conftest.pyc -rm -rf testing/__pycache__ +%autosetup -n pytest-forked-%{version} %build %py3_build @@ -40,15 +53,45 @@ rm -rf testing/__pycache__ %install %py3_install +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 +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 -PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} testing +%{__python3} setup.py test -%files -n python3-%{pypi_name} -%doc example/boxed.txt README.rst -%license LICENSE -%{python3_sitelib}/pytest_forked* +%files -n python3-pytest-forked -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* %changelog +* Tue Mar 12 2024 wangjing - 1.3.0-1 +- Upgrade package python3-pytest-forked to version 1.3.0 for Openstack_W + * Wed Aug 25 2021 liyanan - 1.0.2-2 - fix test case fail with Pytest6 and Pytest5