From 588150a580336cd23d26ce57ed95837f48648f9fb3b0d823f33a0e0142989354 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 12 Nov 2025 20:28:37 +0000 Subject: [PATCH] - update to 1.3.3: * v1.3.2: Broke Python 2.7 support (submitted by: silent-observer) - 1.3.2: * Recursive discovery and import in steps directory is now disabled by default. * RTFD: Enable PDF output format again (for download). * Improve command-line option descriptions (show: value). * Use "confval" directive for config-file parameters. * api: Add "Configuration" class description. * Include changes from pull #1258 * Fix more deadlinks in docs * behave4cmd0: Update version info to v1.3.1 * behave4cmd0.command_shell: Cleanup of BEHAVE_CMD value usage. * Update to python-version: "3.14.0-rc.2" (was: "3.14.0-rc.1") * Update actions/checkout to v5 (was: v4). * Use astral-sh/setup-uv@v6 (was: v3). - 1.3.1: * ImportError: cannot import name 'asynccontextmanager' not found in python 3.6 (submitted by: rzuckerm) * AmbiguousStep error on step import with "re" step-matcher (submitted by: VolodymyrDan00) * Add section with description of "Runners" extension point. * Add section with "Cucumber-Expressions". * docs: userdata (provided by: Therdel, fixes: #1234) * userdata_defines configuration file parameter is not up to date (submitted by: vvavrychuk) - 1.3.0: * Gherkin v6 support * Native support for cucumber-expressions as step matcher * Native support for async-steps * Support for tag-expressions v2 * Distinguish in outcome between failures (assert-failed) and errors (unexpected exceptions at runtime) * Improved captured-output support * Improved logging support and log-to-file support OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-behave?expand=0&rev=17 --- .gitattributes | 23 ++++ .gitignore | 1 + behave-1.2.6.tar.gz | 3 + behave-1.3.3.tar.gz | 3 + no2to3.patch | 13 ++ python-behave-fix-tests.patch | 98 +++++++++++++++ python-behave-no-mock.patch | 220 ++++++++++++++++++++++++++++++++++ python-behave.changes | 100 ++++++++++++++++ python-behave.spec | 109 +++++++++++++++++ 9 files changed, 570 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 behave-1.2.6.tar.gz create mode 100644 behave-1.3.3.tar.gz create mode 100644 no2to3.patch create mode 100644 python-behave-fix-tests.patch create mode 100644 python-behave-no-mock.patch create mode 100644 python-behave.changes create mode 100644 python-behave.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/behave-1.2.6.tar.gz b/behave-1.2.6.tar.gz new file mode 100644 index 0000000..8d1f9ca --- /dev/null +++ b/behave-1.2.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86 +size 701696 diff --git a/behave-1.3.3.tar.gz b/behave-1.3.3.tar.gz new file mode 100644 index 0000000..378aa96 --- /dev/null +++ b/behave-1.3.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b8f4b64ed2ea756a5a2a73e23defc1c4631e9e724c499e46661778453ebaf51 +size 892639 diff --git a/no2to3.patch b/no2to3.patch new file mode 100644 index 0000000..5593e95 --- /dev/null +++ b/no2to3.patch @@ -0,0 +1,13 @@ +Index: behave-1.2.6/setup.py +=================================================================== +--- behave-1.2.6.orig/setup.py ++++ behave-1.2.6/setup.py +@@ -100,8 +100,6 @@ setup( + "pylint", + ], + }, +- # MAYBE-DISABLE: use_2to3 +- use_2to3= bool(python_version >= 3.0), + license="BSD", + classifiers=[ + "Development Status :: 4 - Beta", diff --git a/python-behave-fix-tests.patch b/python-behave-fix-tests.patch new file mode 100644 index 0000000..bfd457b --- /dev/null +++ b/python-behave-fix-tests.patch @@ -0,0 +1,98 @@ +Index: behave-1.2.6/tests/unit/test_capture.py +=================================================================== +--- behave-1.2.6.orig/tests/unit/test_capture.py ++++ behave-1.2.6/tests/unit/test_capture.py +@@ -20,6 +20,8 @@ def create_capture_controller(config=Non + config.log_capture = True + config.logging_filter = None + config.logging_level = "INFO" ++ config.logging_format = "%(levelname)s:%(name)s:%(message)s" ++ config.logging_datefmt = None + return CaptureController(config) + + def setup_capture_controller(capture_controller, context=None): +Index: behave-1.2.6/tests/issues/test_issue0458.py +=================================================================== +--- behave-1.2.6.orig/tests/issues/test_issue0458.py ++++ behave-1.2.6/tests/issues/test_issue0458.py +@@ -48,7 +48,7 @@ def test_issue(exception_class, message) + raise_exception(exception_class, message) + + # -- SHOULD NOT RAISE EXCEPTION HERE: +- text = _text(e) ++ text = _text(e.value) + # -- DIAGNOSTICS: + print(u"text"+ text) + print(u"exception: %s" % e) +Index: behave-1.2.6/tests/unit/test_context_cleanups.py +=================================================================== +--- behave-1.2.6.orig/tests/unit/test_context_cleanups.py ++++ behave-1.2.6/tests/unit/test_context_cleanups.py +@@ -153,7 +153,7 @@ class TestContextCleanup(object): + with pytest.raises(AssertionError) as e: + with scoped_context_layer(context): + context.add_cleanup(non_callable) +- assert "REQUIRES: callable(cleanup_func)" in str(e) ++ assert "REQUIRES: callable(cleanup_func)" in str(e.value) + + def test_on_cleanup_error__prints_error_by_default(self, capsys): + def bad_cleanup_func(): +Index: behave-1.2.6/tests/unit/test_textutil.py +=================================================================== +--- behave-1.2.6.orig/tests/unit/test_textutil.py ++++ behave-1.2.6/tests/unit/test_textutil.py +@@ -212,9 +212,11 @@ class TestObjectToTextConversion(object) + with pytest.raises(AssertionError) as e: + assert False, message + +- text2 = text(e) +- expected = u"AssertionError: %s" % message +- assert text2.endswith(expected) ++ # -- FOR: pytest < 5.0 ++ # expected = u"AssertionError: %s" % message ++ text2 = text(e.value) ++ assert u"AssertionError" in text(e) ++ assert message in text2, "OOPS: text=%r" % text2 + + @requires_python2 + @pytest.mark.parametrize("message", [ +@@ -226,9 +228,11 @@ class TestObjectToTextConversion(object) + with pytest.raises(AssertionError) as e: + assert False, bytes_message + +- text2 = text(e) +- expected = u"AssertionError: %s" % message +- assert text2.endswith(expected) ++ # -- FOR: pytest < 5.0 ++ # expected = u"AssertionError: %s" % message ++ text2 = text(e.value) ++ assert message in text2, "OOPS: text=%r" % text2 ++ + + @pytest.mark.parametrize("exception_class, message", [ + (AssertionError, u"Ärgernis"), +@@ -240,10 +244,13 @@ class TestObjectToTextConversion(object) + with pytest.raises(exception_class) as e: + raise exception_class(message) + +- text2 = text(e) ++ # -- FOR: pytest < 5.0 ++ # expected = u"AssertionError: %s" % message ++ text2 = text(e.value) + expected = u"%s: %s" % (exception_class.__name__, message) + assert isinstance(text2, six.text_type) +- assert text2.endswith(expected) ++ assert exception_class.__name__ in str(e) ++ assert message in text2, "OOPS: text=%r" % text2 + + @requires_python2 + @pytest.mark.parametrize("exception_class, message", [ +@@ -257,7 +264,7 @@ class TestObjectToTextConversion(object) + with pytest.raises(exception_class) as e: + raise exception_class(bytes_message) + +- text2 = text(e) ++ text2 = text(e.value) + unicode_message = bytes_message.decode(self.ENCODING) + expected = u"%s: %s" % (exception_class.__name__, unicode_message) + assert isinstance(text2, six.text_type) diff --git a/python-behave-no-mock.patch b/python-behave-no-mock.patch new file mode 100644 index 0000000..f6990b0 --- /dev/null +++ b/python-behave-no-mock.patch @@ -0,0 +1,220 @@ +Index: behave-1.3.3/tests/api/_test_async_step35.py +=================================================================== +--- behave-1.3.3.orig/tests/api/_test_async_step35.py ++++ behave-1.3.3/tests/api/_test_async_step35.py +@@ -24,7 +24,7 @@ from platform import python_implementati + import sys + + from hamcrest import assert_that, close_to +-from mock import Mock ++from unittest.mock import Mock + import pytest + + from behave._stepimport import use_step_import_modules, SimpleStepContainer +Index: behave-1.3.3/tests/unit/test_context_cleanups.py +=================================================================== +--- behave-1.3.3.orig/tests/unit/test_context_cleanups.py ++++ behave-1.3.3/tests/unit/test_context_cleanups.py +@@ -13,7 +13,7 @@ OPEN ISSUES: + from __future__ import print_function + from behave.configuration import Configuration + from behave.runner import Context, Runner, scoped_context_layer +-from mock import Mock ++from unittest.mock import Mock + import pytest + + +Index: behave-1.3.3/tests/unit/test_formatter.py +=================================================================== +--- behave-1.3.3.orig/tests/unit/test_formatter.py ++++ behave-1.3.3/tests/unit/test_formatter.py +@@ -6,7 +6,7 @@ import sys + import tempfile + import unittest + import six +-from mock import Mock, patch ++from unittest.mock import Mock, patch + from behave.formatter._registry import make_formatters + from behave.formatter import pretty + from behave.formatter.base import StreamOpener +Index: behave-1.3.3/tests/unit/test_log_capture.py +=================================================================== +--- behave-1.3.3.orig/tests/unit/test_log_capture.py ++++ behave-1.3.3/tests/unit/test_log_capture.py +@@ -1,6 +1,6 @@ + # -*- coding: UTF-8 -*- + from __future__ import absolute_import, with_statement +-from mock import patch ++from unittest.mock import patch + from behave.log_capture import LoggingCapture + from six.moves import range + +Index: behave-1.3.3/tests/unit/test_matchers.py +=================================================================== +--- behave-1.3.3.orig/tests/unit/test_matchers.py ++++ behave-1.3.3/tests/unit/test_matchers.py +@@ -2,7 +2,7 @@ + # ruff: noqa: E731 + from __future__ import absolute_import, with_statement + import pytest +-from mock import Mock, patch ++from unittest.mock import Mock, patch + import parse + from behave.exception import NotSupportedWarning + from behave.matchers import ( +Index: behave-1.3.3/tests/unit/test_model.py +=================================================================== +--- behave-1.3.3.orig/tests/unit/test_model.py ++++ behave-1.3.3/tests/unit/test_model.py +@@ -4,7 +4,7 @@ + from __future__ import absolute_import, print_function, with_statement + import unittest + import pytest +-from mock import Mock, patch ++from unittest.mock import Mock, patch + import six + from six.moves import range # pylint: disable=redefined-builtin + from six.moves import zip # pylint: disable=redefined-builtin +Index: behave-1.3.3/tests/unit/test_runner.py +=================================================================== +--- behave-1.3.3.orig/tests/unit/test_runner.py ++++ behave-1.3.3/tests/unit/test_runner.py +@@ -8,7 +8,7 @@ import sys + import unittest + from six import StringIO + import pytest +-from mock import Mock, patch ++from unittest.mock import Mock, patch + from behave import runner_util + from behave.runner import Context, Runner + from behave.exception import ConfigError +Index: behave-1.3.3/tests/unit/test_step_registry.py +=================================================================== +--- behave-1.3.3.orig/tests/unit/test_step_registry.py ++++ behave-1.3.3/tests/unit/test_step_registry.py +@@ -3,7 +3,7 @@ + # ruff: noqa: E731 + + from __future__ import absolute_import, with_statement +-from mock import Mock, patch ++from unittest.mock import Mock, patch + from six.moves import range # pylint: disable=redefined-builtin + from behave import step_registry + +Index: behave-1.3.3/tests/functional/test_capture_on_failed.py +=================================================================== +--- behave-1.3.3.orig/tests/functional/test_capture_on_failed.py ++++ behave-1.3.3/tests/functional/test_capture_on_failed.py +@@ -5,7 +5,7 @@ if the TEST ASSUMPTION, that is used her + * TEST ASSUMPTION: STORE_CAPTURED_ON_SUCCESS is False (only failures are captured) + """ + +-from mock import Mock ++from unittest.mock import Mock + import pytest + + from behave.configuration import Configuration +Index: behave-1.3.3/tests/functional/test_capture_on_success.py +=================================================================== +--- behave-1.3.3.orig/tests/functional/test_capture_on_success.py ++++ behave-1.3.3/tests/functional/test_capture_on_success.py +@@ -5,7 +5,7 @@ if the TEST ASSUMPTION, that is used her + * TEST ASSUMPTION: STORE_CAPTURED_ON_SUCCESS is True (everything is captured) + """ + +-from mock import Mock ++from unittest.mock import Mock + import pytest + + from behave.configuration import Configuration +Index: behave-1.3.3/tests/issues/test_issue0619.py +=================================================================== +--- behave-1.3.3.orig/tests/issues/test_issue0619.py ++++ behave-1.3.3/tests/issues/test_issue0619.py +@@ -20,7 +20,7 @@ so the default behaviour of getattr is n + from __future__ import absolute_import + from behave.configuration import Configuration + from behave.runner import Context, scoped_context_layer +-from mock import Mock ++from unittest.mock import Mock + + + def test_issue__getattr_with_protected_unknown_context_attribute_raises_no_error(): +Index: behave-1.3.3/tests/issues/test_issue0767.py +=================================================================== +--- behave-1.3.3.orig/tests/issues/test_issue0767.py ++++ behave-1.3.3/tests/issues/test_issue0767.py +@@ -14,7 +14,7 @@ Behave returns nothing. :: + This seems to be an oversight. + """ + +-from mock import Mock ++from unittest.mock import Mock + from behave.fixture import fixture, use_fixture_by_tag + from behave.runner import Context + +Index: behave-1.3.3/tests/unit/reporter/test_summary.py +=================================================================== +--- behave-1.3.3.orig/tests/unit/reporter/test_summary.py ++++ behave-1.3.3/tests/unit/reporter/test_summary.py +@@ -1,7 +1,7 @@ + # -*- coding: UTF-8 -*- + + from __future__ import absolute_import, print_function, division +-from mock import Mock, patch ++from unittest.mock import Mock, patch + from behave.model import ScenarioOutline + from behave.model_type import Status + from behave.reporter.summary import ( +Index: behave-1.3.3/tests/unit/test_deprecated.py +=================================================================== +--- behave-1.3.3.orig/tests/unit/test_deprecated.py ++++ behave-1.3.3/tests/unit/test_deprecated.py +@@ -11,7 +11,7 @@ from behave.configuration import Configu + from behave.python_feature import PythonFeature + from behave.runner import Context, ModelRunner + from behave.tag_matcher import ActiveTagMatcher +-from mock import Mock ++from unittest.mock import Mock + import pytest + + +Index: behave-1.3.3/tests/unit/test_runner_context.py +=================================================================== +--- behave-1.3.3.orig/tests/unit/test_runner_context.py ++++ behave-1.3.3/tests/unit/test_runner_context.py +@@ -7,7 +7,7 @@ import unittest + import warnings + from platform import python_implementation + +-from mock import Mock, patch ++from unittest.mock import Mock, patch + import pytest + import six + +Index: behave-1.3.3/tests/unit/test_runner_hook.py +=================================================================== +--- behave-1.3.3.orig/tests/unit/test_runner_hook.py ++++ behave-1.3.3/tests/unit/test_runner_hook.py +@@ -3,7 +3,7 @@ Tests for :mod:`behave.runner` related t + """ + + from __future__ import absolute_import, print_function +-from mock import Mock ++from unittest.mock import Mock + from behave.capture import CaptureSinkAsCollector + from behave.configuration import Configuration + from behave.runner import Context, ModelRunner +Index: behave-1.3.3/tests/unit/test_tag_matcher.py +=================================================================== +--- behave-1.3.3.orig/tests/unit/test_tag_matcher.py ++++ behave-1.3.3/tests/unit/test_tag_matcher.py +@@ -9,7 +9,7 @@ Unit tests for active tag-matcher (mod:` + """ + + from __future__ import absolute_import +-from mock import Mock ++from unittest.mock import Mock + from unittest import TestCase + import operator + import pytest diff --git a/python-behave.changes b/python-behave.changes new file mode 100644 index 0000000..19bb302 --- /dev/null +++ b/python-behave.changes @@ -0,0 +1,100 @@ +------------------------------------------------------------------- +Wed Nov 12 14:13:28 UTC 2025 - Marius Grossu + +- update to 1.3.3: + * v1.3.2: Broke Python 2.7 support (submitted by: silent-observer) +- 1.3.2: + * Recursive discovery and import in steps directory is now disabled by default. + * RTFD: Enable PDF output format again (for download). + * Improve command-line option descriptions (show: value). + * Use "confval" directive for config-file parameters. + * api: Add "Configuration" class description. + * Include changes from pull #1258 + * Fix more deadlinks in docs + * behave4cmd0: Update version info to v1.3.1 + * behave4cmd0.command_shell: Cleanup of BEHAVE_CMD value usage. + * Update to python-version: "3.14.0-rc.2" (was: "3.14.0-rc.1") + * Update actions/checkout to v5 (was: v4). + * Use astral-sh/setup-uv@v6 (was: v3). +- 1.3.1: + * ImportError: cannot import name 'asynccontextmanager' not found in python 3.6 (submitted by: rzuckerm) + * AmbiguousStep error on step import with "re" step-matcher (submitted by: VolodymyrDan00) + * Add section with description of "Runners" extension point. + * Add section with "Cucumber-Expressions". + * docs: userdata (provided by: Therdel, fixes: #1234) + * userdata_defines configuration file parameter is not up to date (submitted by: vvavrychuk) +- 1.3.0: + * Gherkin v6 support + * Native support for cucumber-expressions as step matcher + * Native support for async-steps + * Support for tag-expressions v2 + * Distinguish in outcome between failures (assert-failed) and errors (unexpected exceptions at runtime) + * Improved captured-output support + * Improved logging support and log-to-file support + * And many things more ... +- added new BuildRequires in spec file: + * %{python_module cucumber-tag-expressions} + * %{python_module assertpy >= 1.1} + * %{python_module chardet} +- removed the setuptools related files +- removed the patches not in use anymore and fixed upstream: + * no2to3.patch + * python-behave-fix-tests.patch + +------------------------------------------------------------------- +Wed Jun 4 15:05:03 UTC 2025 - Nico Krapp + +- fix usage of libalternatives + +------------------------------------------------------------------- +Wed May 14 09:11:38 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Thu Sep 26 17:53:18 UTC 2024 - Guang Yee + +- Enable sle15_python_module_pythons. + +------------------------------------------------------------------- +Tue May 17 14:54:59 UTC 2022 - pgajdos@suse.com + +- test the package +- do not require python-mock for build +- added patches + https://github.com/behave/behave/commit/83906ba779956af9437defcb8975debb18440e0d + https://github.com/behave/behave/commit/66fcadb23bea79e60f370e66bf7588de2f1934e3 + + python-behave-fix-tests.patch + fix https://github.com/behave/behave/issues/1028 + + python-behave-no-mock.patch + +------------------------------------------------------------------- +Tue Mar 1 09:46:46 UTC 2022 - Dirk Müller + +- add no2to3.patch for compatibility with newer setuptools + +------------------------------------------------------------------- +Wed Sep 8 06:52:58 UTC 2021 - Steve Kowalik + +- Drop unnecessary BuildRequires on nose. + +------------------------------------------------------------------- +Wed May 27 09:36:27 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Sun Mar 24 11:04:29 UTC 2019 - Jan Engelhardt + +- Avoid name repetition in summary. (Something rpmlint would + warn about.) + +------------------------------------------------------------------- +Sat Mar 23 16:20:20 UTC 2019 - Tomáš Chvátal + +- Fix the license and friends + +------------------------------------------------------------------- +Wed Nov 28 20:44:17 UTC 2018 - Mathias Homann + +- initial package using 1.2.6 and py2pack diff --git a/python-behave.spec b/python-behave.spec new file mode 100644 index 0000000..73d1266 --- /dev/null +++ b/python-behave.spec @@ -0,0 +1,109 @@ +# +# spec file for package python-behave +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# 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/ +# + + +%bcond_without libalternatives +%{?sle15_python_module_pythons} +Name: python-behave +Version: 1.3.3 +Release: 0 +Summary: Behaviour-driven development, Python style +License: BSD-2-Clause +Group: Development/Languages/Python +URL: https://github.com/behave/behave +Source: https://files.pythonhosted.org/packages/source/b/behave/behave-%{version}.tar.gz +# https://github.com/behave/behave/issues/1028 +Patch1: python-behave-no-mock.patch +BuildRequires: %{python_module cucumber-tag-expressions} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: alts +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: alts +Requires: python-parse >= 1.8.2 +Requires: python-parse_type >= 0.4.2 +Requires: python-six >= 1.11 +Suggests: python-argparse +Suggests: python-coverage +Suggests: python-enum34 +Suggests: python-importlib +Suggests: python-invoke >= 0.21.0 +Suggests: python-modernize >= 0.5 +Suggests: python-ordereddict +Suggests: python-path.py >= 8.1.2 +Suggests: python-pathlib +Suggests: python-pycmd +Suggests: python-pylint +Suggests: python-pytest >= 3.0 +Suggests: python-pytest-cov +Suggests: python-sphinx >= 1.6 +Suggests: python-sphinx_bootstrap_theme >= 0.6 +Suggests: python-tox +Suggests: python-traceback2 +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module PyHamcrest >= 1.8} +BuildRequires: %{python_module assertpy >= 1.1} +BuildRequires: %{python_module chardet} +BuildRequires: %{python_module parse >= 1.8.2} +BuildRequires: %{python_module parse_type >= 0.4.2} +BuildRequires: %{python_module path.py >= 10.1} +BuildRequires: %{python_module pytest >= 3.0} +BuildRequires: %{python_module pytest-html >= 2.0} +BuildRequires: %{python_module six >= 1.11} +# /SECTION +%python_subpackages + +%description +Behavior-driven development (or BDD) is an agile software development +technique that encourages collaboration between developers, QA and +non-technical or business participants in a software project. + +*behave* uses tests written in a natural language style, backed up by Python +code. + +%prep +%autosetup -p1 -n behave-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/behave +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest tests + +%pre +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative behave + +# post and postun macro call is not needed with only libalternatives + +%files %{python_files} +%license LICENSE +%doc CHANGES.rst README.rst +%python_alternative %{_bindir}/behave +%{python_sitelib}/behave +%{python_sitelib}/behave-%{version}*-info + +%changelog