%define pypi_name pytest # When building pytest for the first time with new Python version # we also don't have sphinx yet and cannot build docs. %bcond_with docs %bcond_with tests Name: python-%{pypi_name} Version: 7.1.3 Release: %mkrel 1 Summary: Simple powerful testing with Python Group: Development/Python License: MIT URL: https://pypi.org/project/pytest Source0: %{pypi_source} BuildArch: noarch BuildRequires: pyproject-rpm-macros BuildRequires: python3-devel BuildRequires: python3dist(argcomplete) BuildRequires: python3dist(atomicwrites) BuildRequires: python3dist(decorator) BuildRequires: python3dist(hypothesis) BuildRequires: python3dist(iniconfig) BuildRequires: python3dist(jinja2) BuildRequires: python3dist(mock) BuildRequires: python3dist(more-itertools) BuildRequires: python3dist(nose) BuildRequires: python3dist(numpy) BuildRequires: python3dist(pluggy) BuildRequires: python3dist(py) BuildRequires: python3dist(setuptools) BuildRequires: python3dist(setuptools-scm) BuildRequires: python3dist(setuptools-scm[toml]) BuildRequires: python3dist(toml) BuildRequires: python3dist(twisted) %if %{with docs} BuildRequires: python3-sphinx BuildRequires: python3-sphinxcontrib-trio BuildRequires: python3dist(pygments-pytest) BuildRequires: python3dist(sphinx-removed-in) BuildRequires: rst2html %endif %if %{with tests} BuildRequires: python3dist(wcwidth) BuildRequires: python3dist(packaging) BuildRequires: python3dist(xmlschema) %endif %description py.test provides simple, yet powerful testing for Python. %package -n python3-%{pypi_name} Summary: Simple powerful testing with Python 3 Group: Development/Python Requires: python3dist(setuptools) Requires: python3dist(py) %{?python_provide:%python_provide python3-%{pypi_name}} Provides: python3-test = %{version}-%{release} # /usr/bin/pytest was earlier shipped by python2-pytest Conflicts: python2-pytest < 5.0.1 # Merged to pytest since pytest 3.3 Obsoletes: python3-pytest-catchlog < 1.2.2-4 %if %{without docs} Obsoletes: %{name}-doc < %{version}-%{release} %endif %description -n python3-%{pypi_name} py.test provides simple, yet powerful testing for Python 3. %package doc Summary: Documentation for pytest Group: Development/Python BuildArch: noarch %description doc This package contains documentation for pytest. %prep %autosetup -p1 -n %{pypi_name}-%{version} %build %pyproject_wheel %if %{with docs} for l in doc/* ; do make -C $l html PYTHONPATH=$(pwd)/src SPHINXBUILD=%{_bindir}/sphinx-build-%{python3_version} done for f in README CHANGELOG CONTRIBUTING ; do rst2html ${f}.rst > ${f}.html done %endif %install %pyproject_install %pyproject_save_files %{pypi_name} _%{pypi_name} ln -snf pytest %{buildroot}%{_bindir}/pytest-3 ln -snf pytest %{buildroot}%{_bindir}/pytest-%{python3_version} ln -snf py.test %{buildroot}%{_bindir}/py.test-3 ln -snf py.test %{buildroot}%{_bindir}/py.test-%{python3_version} %if %{with docs} mkdir -p _htmldocs/html for l in doc/* ; do # remove hidden file rm ${l}/_build/html/.buildinfo mv ${l}/_build/html _htmldocs/html/${l##doc/} done %endif # remove shebangs from all scripts find %{buildroot}%{python3_sitelib} \ -name '*.py' \ -exec sed -i -e '1{/^#!/d}' {} \; %if %{with tests} %check # Skip test_collect_pyargs_with_testpaths because it mangles PYTHONPATH PATH=%{buildroot}%{_bindir}:${PATH} \ PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pytest-%{python3_version} -r s testing -k 'not test_collect_pyargs_with_testpaths' %endif %files -n python3-%{pypi_name} -f %{pyproject_files} %if %{with docs} %doc CHANGELOG.html README.html CONTRIBUTING.html %endif %license LICENSE %{_bindir}/pytest %{_bindir}/pytest-3 %{_bindir}/pytest-%{python3_version} %{_bindir}/py.test %{_bindir}/py.test-3 %{_bindir}/py.test-%{python3_version} %if %{with docs} %files doc %doc _htmldocs/html %endif %changelog * Tue Sep 06 2022 wally <wally> 7.1.3-1.mga9 + Revision: 1884508 - new version 7.1.3 - switch build to use pyproject rpm macros * Sat Mar 26 2022 umeabot <umeabot> 6.2.4-4.mga9 + Revision: 1828074 - Mageia 9 Mass Rebuild * Sun Feb 06 2022 wally <wally> 6.2.4-3.mga9 + Revision: 1772359 - rebuild for python3.10 * Sun Aug 29 2021 wally <wally> 6.2.4-2.mga9 + Revision: 1743358 - support pluggy >= 1.0 * Sat Jun 26 2021 wally <wally> 6.2.4-1.mga9 + Revision: 1733868 - new version 6.2.4 * Sun Mar 14 2021 wally <wally> 6.2.2-2.mga9 + Revision: 1702568 - rebuild for python 3.9 * Tue Mar 09 2021 guillomovitch <guillomovitch> 6.2.2-1.mga9 + Revision: 1700916 - new version 6.2.2 * Wed Nov 11 2020 guillomovitch <guillomovitch> 6.1.2-1.mga8 + Revision: 1644563 - new version 6.1.2 * Fri Oct 02 2020 kekepower <kekepower> 6.1.0-1.mga8 + Revision: 1631880 - Update to version 6.0.1 * Wed Mar 18 2020 akien <akien> 5.4.1-1.mga8 + Revision: 1557680 - Version 5.4.1 - Version 5.4.0 + umeabot <umeabot> - Mageia 8 Mass Rebuild + tv <tv> - new release * Wed Sep 04 2019 wally <wally> 5.1.0-3.mga8 + Revision: 1437380 - rebuild for python3.8 - disable doc build and tests for rebuild * Fri Aug 30 2019 wally <wally> 5.1.0-2.mga8 + Revision: 1435490 - obsolete old python3-pytest-catchlog * Sun Aug 18 2019 wally <wally> 5.1.0-1.mga8 + Revision: 1429794 - new version 5.1.0 * Sat Aug 03 2019 wally <wally> 5.0.1-1.mga8 + Revision: 1427131 - new version 5.0.1 - drop python2 support * Fri Apr 19 2019 kekepower <kekepower> 4.4.1-1.mga7 + Revision: 1393440 - Disable tests for now - Update to version 4.4.1 * Sat Jan 05 2019 wally <wally> 4.0.2-2.mga7 + Revision: 1349657 - rebuild for python3.7 - BR numpy and unittests2 for tests * Tue Jan 01 2019 wally <wally> 4.0.2-1.mga7 + Revision: 1348103 - new version 4.0.2 * Tue Jan 01 2019 wally <wally> 3.9.3-2.mga7 + Revision: 1348006 - update requires * Tue Jan 01 2019 wally <wally> 3.9.3-1.mga7 + Revision: 1347988 - new version 3.9.3 - build without docs + luigiwalser <luigiwalser> - 3.7.4 - 3.6.2 * Thu Sep 20 2018 umeabot <umeabot> 3.4.1-3.mga7 + Revision: 1289816 - Mageia 7 Mass Rebuild * Sun May 06 2018 wally <wally> 3.4.1-2.mga7 + Revision: 1226683 - require funcsigs * Tue Feb 27 2018 kekepower <kekepower> 3.4.1-1.mga7 + Revision: 1205405 - Update to version 3.4.1 * Tue Jan 02 2018 guillomovitch <guillomovitch> 3.3.1-1.mga7 + Revision: 1189359 - new version 3.3.1 * Sun Nov 26 2017 daviddavid <daviddavid> 3.2.0-5.mga7 + Revision: 1179906 - fix python2-pytest subpackage * Sat Nov 25 2017 daviddavid <daviddavid> 3.2.0-4.mga7 + Revision: 1179235 - rename python-pytest to python2-pytest * Wed Oct 04 2017 tv <tv> 3.2.0-3.mga7 + Revision: 1168326 - BR pythonX-setuptools_scm thus fixing build * Thu Aug 03 2017 tv <tv> 3.2.0-2.mga7 + Revision: 1134368 - rebuild for new python + philippem <philippem> - update to 3.2.0 * Sun May 14 2017 ngompa <ngompa> 3.0.5-4.mga6 + Revision: 1101162 - Add Fedora-compatible Provides and fix legacy pythonX-test Provides * Mon Jan 09 2017 philippem <philippem> 3.0.5-3.mga6 + Revision: 1080744 - add provides for python{3}-test * Sun Jan 08 2017 philippem <philippem> 3.0.5-2.mga6 + Revision: 1080650 - update to 3.0.5, obsolete python-test and python3-test + bcornec <bcornec> - Fix binaries delivered using macro for python version * Wed Nov 30 2016 ngompa <ngompa> 2.9.2-2.mga6 + Revision: 1071092 - Add py.test-2 and py.test-3 symlinks * Fri Oct 28 2016 philippem <philippem> 2.9.2-1.mga6 + Revision: 1063821 - update to 2.9.2 * Fri Feb 19 2016 umeabot <umeabot> 2.8.2-2.mga6 + Revision: 970803 - Mageia 6 Mass Rebuild * Fri Oct 09 2015 philippem <philippem> 2.8.2-1.mga6 + Revision: 888493 - use new macros, disable test for Python2, make Python3 as default + tv <tv> - new release * Fri Oct 09 2015 tv <tv> 2.7.3-1.mga6 + Revision: 887981 - new release - rebuild for python 3.5 - BR python-sphinx_rtd_theme - rebuild for python 3.5 * Fri Aug 28 2015 philippem <philippem> 2.7.2-1.mga6 + Revision: 870483 - update to 2.7.2 * Wed Oct 15 2014 umeabot <umeabot> 2.6.1-4.mga5 + Revision: 748107 - Second Mageia 5 Mass Rebuild * Sat Sep 27 2014 tv <tv> 2.6.1-3.mga5 + Revision: 726919 - rebuild for missing pythoneggs deps * Tue Sep 16 2014 umeabot <umeabot> 2.6.1-2.mga5 + Revision: 688284 - Mageia 5 Mass Rebuild * Tue Sep 09 2014 juancho <juancho> 2.6.1-1.mga5 + Revision: 674085 - Updated to 2.6.1 - Updated to 2.6.1 * Sat May 31 2014 pterjan <pterjan> 2.5.2-2.mga5 + Revision: 628969 - Rebuild for new Python * Tue Mar 11 2014 philippem <philippem> 2.5.2-1.mga5 + Revision: 602545 - imported package python-pytest