python-zope.testrunner/python-zope.testrunner.spec

90 lines
2.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-zope.testrunner
#
# Copyright (c) 2023 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-zope.testrunner
Version: 6.0
Release: 0
Summary: Zope testrunner script
License: ZPL-2.1
URL: https://github.com/zopefoundation/zope.testrunner
Source: https://files.pythonhosted.org/packages/source/z/zope.testrunner/zope.testrunner-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module zope.exceptions}
BuildRequires: %{python_module zope.interface}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-zope.exceptions
Requires: python-zope.interface
Accepting request 1004753 from home:yarunachalam:branches:devel:languages:python - updated spec to include Requires(post): update-alternatives Requires(postun):update-alternatives - version update to 5.5.0 * Use sys._current_frames (rather than threading.enumerate) as base for new thread detection, fixes #130. * New option --gc-after-test. It calls for a garbage collection after each test and can be used to track down ResourceWarning``s and cyclic garbage. With ``rv = gc.collect(), ! is output on verbosity level 1 when rv is non zero (i.e. when cyclic structures have been released), [``*rv*]`` on higher verbosity levels and a detailed cyclic garbage analysis on verbosity level 4+. For details, see #133. * Allow the filename for the logging configuration to be specified via the envvar ZOPE_TESTRUNNER_LOG_INI. If not defined, the configuration continues to be locked for in file log.ini of the current working directory. Remember the logging configuration file in envvar ZOPE_TESTRUNNER_LOG_INI to allow spawned child processes to recreate the logging configuration. For details, see #134. - version update to 5.4.0 * Improve --help documentation for --package-path option (#121). * Do not disable existing loggers during logsupport initialization (#120). * Fix tests with testtools >= 2.5.0 (#125). * Add support for Python 3.10. OBS-URL: https://build.opensuse.org/request/show/1004753 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zope.testrunner?expand=0&rev=28
2022-09-19 16:26:43 +00:00
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module zope.testing}
BuildRequires: %{python_module zope.testrunner = %{version}}
BuildRequires: %{pythons}
%endif
%python_subpackages
%description
This package provides a flexible test runner with layer support.
%prep
%autosetup -p1 -n zope.testrunner-%{version}
find -size 0 -delete
%build
%python_build
%install
%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/zope-testrunner
%endif
%if %{with test}
%check
%pyunittest src/zope/testrunner/tests/*.py
%endif
%if !%{with test}
%post
%python_install_alternative zope-testrunner
%postun
%python_uninstall_alternative zope-testrunner
%files %{python_files}
%license LICENSE.md
%doc README.rst
%python_alternative %{_bindir}/zope-testrunner
%{python_sitelib}/zope*
%endif
%changelog