2012-03-05 18:01:42 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-pytest
|
|
|
|
#
|
2018-01-16 09:25:01 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-03-05 18:01:42 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2013-04-23 11:39:08 +02:00
|
|
|
|
2018-09-17 11:46:23 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-03-05 18:01:42 +01:00
|
|
|
#
|
|
|
|
|
2017-02-27 18:33:58 +01:00
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2012-03-05 18:01:42 +01:00
|
|
|
Name: python-pytest
|
2018-09-24 14:55:20 +02:00
|
|
|
Version: 3.8.1
|
2012-03-05 18:01:42 +01:00
|
|
|
Release: 0
|
2017-11-02 10:24:10 +01:00
|
|
|
Summary: Python testing tool with autodiscovery and detailed asserts
|
2013-04-23 11:39:08 +02:00
|
|
|
License: MIT
|
2012-03-05 18:01:42 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-06-25 11:35:39 +02:00
|
|
|
URL: https://github.com/pytest-dev/pytest
|
2017-11-02 10:24:10 +01:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module setuptools_scm}
|
|
|
|
BuildRequires: fdupes
|
2017-02-27 18:33:58 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2018-06-25 11:35:39 +02:00
|
|
|
Requires: python-atomicwrites
|
2018-04-02 22:48:47 +02:00
|
|
|
Requires: python-attrs >= 17.4.0
|
|
|
|
Requires: python-more-itertools >= 4.0.0
|
2018-08-02 15:12:16 +02:00
|
|
|
Requires: python-pluggy >= 0.7
|
2018-03-06 10:43:54 +01:00
|
|
|
Requires: python-py >= 1.5.0
|
2014-06-19 13:08:39 +02:00
|
|
|
Requires: python-setuptools
|
2018-05-06 14:55:08 +02:00
|
|
|
Requires: python-six >= 1.10.0
|
2017-11-02 10:24:10 +01:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2012-03-05 18:01:42 +01:00
|
|
|
BuildArch: noarch
|
2017-12-15 14:01:40 +01:00
|
|
|
%ifpython2
|
|
|
|
Requires: python-funcsigs
|
|
|
|
%endif
|
2018-09-11 15:42:31 +02:00
|
|
|
%if "%{python_flavor}" == "python2" || %{python3_version_nodots} < 36
|
2018-08-02 15:12:16 +02:00
|
|
|
Requires: python-pathlib2 >= 2.2.0
|
|
|
|
%endif
|
2017-02-27 18:33:58 +01:00
|
|
|
%python_subpackages
|
2012-03-05 18:01:42 +01:00
|
|
|
|
|
|
|
%description
|
2017-11-02 10:24:10 +01:00
|
|
|
pytest is a cross-project Python testing tool. It provides:
|
2013-04-23 11:39:08 +02:00
|
|
|
|
|
|
|
* auto-discovery of test modules and functions,
|
2017-11-02 10:24:10 +01:00
|
|
|
* detailed info on failing assert statements (no need to remember
|
2013-04-23 11:39:08 +02:00
|
|
|
self.assert* names),
|
|
|
|
* modular fixtures for managing small or parametrized long-lived test resources.
|
2017-11-02 10:24:10 +01:00
|
|
|
* multi-paradigm support: you can use py.test to run test suites based on
|
2013-04-23 11:39:08 +02:00
|
|
|
unittest (or trial), nose,
|
2017-11-02 10:24:10 +01:00
|
|
|
* single-source compatibility to Python2.4 all the way up to Python3.3,
|
2013-04-23 11:39:08 +02:00
|
|
|
PyPy-1.9 and Jython-2.5.1, and
|
|
|
|
* many external plugins.
|
|
|
|
|
2012-03-05 18:01:42 +01:00
|
|
|
%prep
|
|
|
|
%setup -q -n pytest-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-02-27 18:33:58 +01:00
|
|
|
%python_build
|
2012-03-05 18:01:42 +01:00
|
|
|
|
|
|
|
%install
|
2017-11-02 10:24:10 +01:00
|
|
|
%python_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/py.test
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pytest
|
2012-03-05 18:01:42 +01:00
|
|
|
|
2017-11-02 10:24:10 +01:00
|
|
|
if [ -x %{buildroot}%{_bindir}/py.test-%{python2_bin_suffix} ]; then
|
|
|
|
ln -s py.test-%{python2_bin_suffix} %{buildroot}%{_bindir}/py.test2
|
|
|
|
fi
|
|
|
|
if [ -x %{buildroot}%{_bindir}/py.test-%{python3_bin_suffix} ]; then
|
|
|
|
ln -s py.test-%{python3_bin_suffix} %{buildroot}%{_bindir}/py.test3
|
|
|
|
fi
|
2013-06-25 07:42:24 +02:00
|
|
|
|
2018-06-25 11:35:39 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2017-12-15 14:01:40 +01:00
|
|
|
|
2013-06-25 07:42:24 +02:00
|
|
|
%post
|
2017-02-27 18:33:58 +01:00
|
|
|
%{python_install_alternative py.test} \
|
|
|
|
--slave %{_bindir}/pytest pytest %{_bindir}/pytest-%{python_version}
|
2013-06-25 07:42:24 +02:00
|
|
|
|
2017-04-19 18:05:53 +02:00
|
|
|
%postun
|
2017-02-27 18:33:58 +01:00
|
|
|
%python_uninstall_alternative py.test
|
2013-06-25 07:42:24 +02:00
|
|
|
|
2017-02-27 18:33:58 +01:00
|
|
|
%files %{python_files}
|
2018-03-12 12:01:55 +01:00
|
|
|
%doc AUTHORS CHANGELOG.rst README.rst
|
|
|
|
%license LICENSE
|
2017-02-27 18:33:58 +01:00
|
|
|
%python_alternative %{_bindir}/py.test
|
|
|
|
%python_alternative %{_bindir}/pytest
|
|
|
|
%python2_only %{_bindir}/py.test2
|
|
|
|
%python3_only %{_bindir}/py.test3
|
2012-03-05 18:01:42 +01:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|