|
|
|
@ -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
|
|
|
|
|
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 <mikel@olasagasti.info> - 3.10.1-1
|
|
|
|
|
- Update to 3.10.1
|
|
|
|
|
- Switch to pyproject-rpm-macros
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|