From 633e466c9d061a8590303df4ed6a6cb158a24c50 Mon Sep 17 00:00:00 2001 From: Mikel Olasagasti Uranga Date: Sat, 6 Nov 2021 23:46:56 +0100 Subject: [PATCH] Update to 3.10.1 --- .gitignore | 1 + python-pytest-randomly.spec | 62 ++++++++++++++++--------------------- sources | 1 + 3 files changed, 28 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index c9a2958..bb95b11 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /pytest-randomly-3.4.0.tar.gz /pytest-randomly-3.4.1.tar.gz /pytest-randomly-3.5.0.tar.gz +/pytest-randomly-3.10.1.tar.gz diff --git a/python-pytest-randomly.spec b/python-pytest-randomly.spec index d17d6cb..b121f78 100644 --- a/python-pytest-randomly.spec +++ b/python-pytest-randomly.spec @@ -1,66 +1,56 @@ %global upstream_name pytest-randomly -%global module_name pytest_randomly Name: python-%{upstream_name} -Version: 3.5.0 -Release: 4%{?dist} +Version: 3.10.1 +Release: 1%{?dist} Summary: Pytest plugin to randomly order tests and control random.seed License: MIT URL: https://github.com/pytest-dev/pytest-randomly -Source0: https://files.pythonhosted.org/packages/source/p/%{upstream_name}/%{upstream_name}-%{version}.tar.gz +Source0: %{url}/archive/%{version}/%{upstream_name}-%{version}.tar.gz BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros + +# Required for tests +BuildRequires: python3dist(factory-boy) +BuildRequires: python3dist(pytest-forked) +BuildRequires: python3dist(pytest-xdist) + %description %{summary}. -%package -n python3-%{upstream_name} -Summary: Pytest plugin to randomly order tests and control random.seed -%{?python_provide:%python_provide python3-%{upstream_name}} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -%if 0%{?fedora} < 32 && 0%{?rhel} < 9 -BuildRequires: python3-importlib-metadata -Requires: python3-importlib-metadata -%endif -# Only for running the tests: -BuildRequires: python3-pytest -BuildRequires: python3-pytest-xdist -BuildRequires: python3-factory-boy -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 -BuildRequires: python3-faker -%endif -BuildRequires: python3-numpy +%package -n python3-%{upstream_name} +Summary: %{summary} %description -n python3-%{upstream_name} %{summary}. %prep %autosetup -n %{upstream_name}-%{version} -p1 -rm -r src/*.egg-info + +%generate_buildrequires +%pyproject_buildrequires -r -x test %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files pytest_randomly %check -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 -PYTHONPATH=%{buildroot}%{python3_sitelib} PYTHONDONTWRITEBYTECODE=1 pytest-3 -p no:randomly -v tests/ -%else -# Faker pytest integration is only in Fedora 33+ -# so skip tests for it when it is not available -PYTHONPATH=%{buildroot}%{python3_sitelib} PYTHONDONTWRITEBYTECODE=1 pytest-3 -p no:randomly -v tests/ -k 'not faker' -%endif - -%files -n python3-%{upstream_name} +%pytest -p no:randomly -k 'not test_it_runs_before_stepwise' + +%files -n python3-%{upstream_name} -f %{pyproject_files} %doc README.rst HISTORY.rst %license LICENSE -%{python3_sitelib}/%{module_name}.py -%{python3_sitelib}/__pycache__/* -%{python3_sitelib}/%{module_name}*.egg-info %changelog +* Sat Nov 06 2021 Mikel Olasagasti Uranga - 3.10.1-1 +- Update to 3.10.1 +- Switch to pyproject-rpm-macros + * Fri Jul 23 2021 Fedora Release Engineering - 3.5.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index bd47b99..10a672c 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (pytest-randomly-3.5.0.tar.gz) = 1ab57c45ccb858f243faf054fdaa1972ccb15dcedf98f2bcd88e105e888200f2eac0dc1c06940b09f00cf570437ddb92d82aa0ad35e9f51e3308d3723cdf4c6c +SHA512 (pytest-randomly-3.10.1.tar.gz) = d93e017df706d7021ff3f4682b4ed65d474177a60e303455685266d47a0a214e4f30b2f7dd150768de711d602ca1d22e2cfeca2703a7139cfaab97e3424afa1c