python-behave/python-behave.spec
wk333 00abb70705 remove attribute use_2to3 and buildrequires python3-nose
(cherry picked from commit ea717df68fd72b9504b1faa1a509337211b05ffc)
2022-03-31 10:10:38 +08:00

89 lines
3.0 KiB
RPMSpec

%?python_enable_dependency_generator
Name: python-behave
Version: 1.2.6
Release: 5
Summary: A tool for behavior-driven development, Python style
License: BSD
URL: http://pypi.python.org/pypi/behave
Source0: https://github.com/behave/behave/archive/v%{version}/behave-%{version}.tar.gz
# Upstream issue: https://github.com/behave/behave/issues/755
Patch0000: 0001-Backport-for-py38-fixes.patch
Patch0001: change-required-pytest.patch
Patch0002: remove-attribute-use_2to3.patch
BuildArch: noarch
%description
Behave is behaviour-driven development, Python style.
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.
%package -n python3-behave
Summary: Python-behave with python 3 support.
%{?python_provide:%python_provide python3-behave}
BuildRequires: python3-devel python3-setuptools python3-hamcrest python3-mock python3-parse
BuildRequires: python3-parse_type >= 0.4.2 python3-pytest python3-six
Conflicts: python2-behave < 1.2.6
%description -n python3-behave
Behave is behaviour-driven development, Python style.
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.
%package help
Summary: This package contains help documents
BuildRequires: help2man python3-sphinx python3-sphinx-bootstrap-theme
Requires: python3-behave = %{version}-%{release}
Provides: python-behave-doc = %{version}-%{release}
Obsoletes: python-behave-doc < %{version}-%{release}
%description help
Files for help with plexus-component-api.
%prep
%autosetup -n behave-%{version} -p1
%build
%py3_build
make SPHINXBUILD=sphinx-build-3 html -C docs
rm -rf build/docs/html/.buildinfo
%install
install -d %{buildroot}%{_mandir}/man1
%py3_install
PYTHONPATH=%{buildroot}%{python3_sitelib} help2man --no-info \
--name="Run a number of feature tests with behave." \
--output=behave.1 %{buildroot}%{_bindir}/behave
install -Dpm0644 behave.1 %{buildroot}%{_mandir}/man1/
%check
%files -n python3-behave
%doc LICENSE
%{_bindir}/behave
%{python3_sitelib}/behave-*.egg-info/
%{python3_sitelib}/behave/
%{python3_sitelib}/setuptools_behave.py
%{python3_sitelib}/__pycache__/setuptools_behave.*
%files help
%doc README.rst build/docs/html
%doc %{_mandir}/man1/behave.1*
%changelog
* Sat Jan 08 2022 wangkai<wangkai385@huawei.com> - 1.2.6-5
- remove attribute use_2to3 and buildrequires python3-nose
* Fri Jan 8 2021 wutao<wutao61@huawei.com> - 1.2.6-4
- fix test failure because of pytest upgrade
* Fri Sep 11 2020 wangxiao<wangxiao65@huawei.com> - 1.2.6-3
- fix test error
* Thu Dec 05 2019 gulining<gulining1@huawei.com> - 1.2.6-2
- Pakcage init