#2 Update to 1.2.6 (and drop python2)
Merged 2 years ago by churchyard. Opened 2 years ago by churchyard.
rpms/ churchyard/python-behave renew  into  master

file modified
+47 -124

@@ -1,184 +1,107 @@ 

- %if 0%{?rhel} && 0%{?rhel} < 8

- %bcond_with python3

- %else

- %bcond_without python3

- %endif

+ %global srcname behave

  

- %global modname behave

- 

- Name:           python-%{modname}

- Version:        1.2.5

- Release:        25%{?dist}

+ Name:           python-%{srcname}

+ Version:        1.2.6

+ Release:        1%{?dist}

  Summary:        Tools for the behavior-driven development, Python style

  

  License:        BSD

- URL:            http://pypi.python.org/pypi/%{modname}

- Source0:        https://github.com/behave/behave/archive/v%{version}/%{modname}-%{version}.tar.gz

- Patch0:         HTML-Formatter.patch

- Patch1:         html_formatter_no_set_codecs.patch

- Patch2:         0003-unicode_fixes.patch

- 

- # Cherry-picked patches

- Patch1001:      0001-support-ref-link-for-each-step.patch

- Patch1002:      0002-Add-step-label-to-be-used-in-step-refs-like.patch

- Patch1003:      0003-PREPARE-for-Python-3.6-re.LOCALE-was-removed.patch

+ URL:            http://pypi.python.org/pypi/%{srcname}

+ Source0:        https://github.com/behave/behave/archive/v%{version}/%{srcname}-%{version}.tar.gz

  

  BuildArch:      noarch

  

+ %?python_enable_dependency_generator

+ 

  %global _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.\

  \

- %{modname} uses tests written in a natural language style, backed up\

+ %{srcname} uses tests written in a natural language style, backed up\

  by Python code.

  

  %description %{_description}

  

- %package -n python2-%{modname}

+ %package -n python3-%{srcname}

  Summary:        %{summary}

- %{?python_provide:%python_provide python2-%{modname}}

- BuildRequires:  python2-devel

- %if 0%{?rhel} && 0%{?rhel} <= 7

- BuildRequires:  python-setuptools

- BuildRequires:  python-parse

- BuildRequires:  python-parse_type

- BuildRequires:  python-six

- BuildRequires:  python-nose

- Requires:       python-setuptools

- Requires:       python-parse

- Requires:       python-parse_type

- Requires:       python-six

- %else

- BuildRequires:  python2-setuptools

- BuildRequires:  python2-parse

- BuildRequires:  python2-parse_type

- BuildRequires:  python2-six

- BuildRequires:  python2-nose

- Requires:       python2-setuptools

- Requires:       python2-parse

- Requires:       python2-parse_type

- Requires:       python2-six

- %endif

- BuildRequires:  python2-mock

- 

- %description -n python2-%{modname} %{_description}

- 

- Python 2 version.

- 

- %if %{with python3}

- %package -n python3-%{modname}

- Summary:        %{summary}

- %{?python_provide:%python_provide python3-%{modname}}

+ %{?python_provide:%python_provide python3-%{srcname}}

  BuildRequires:  python3-devel

  BuildRequires:  python3-setuptools

- BuildRequires:  python3-parse

- BuildRequires:  python3-parse_type

- BuildRequires:  python3-six

+ BuildRequires:  python3-hamcrest

  BuildRequires:  python3-mock

  BuildRequires:  python3-nose

- Requires:       python3-setuptools

- Requires:       python3-parse

- Requires:       python3-parse_type

- Requires:       python3-six

- 

- %description -n python3-%{modname} %{_description}

+ BuildRequires:  python3-parse

+ BuildRequires:  python3-parse_type >= 0.4.2

+ BuildRequires:  python3-pytest

+ BuildRequires:  python3-six

+ Conflicts:      python2-behave < 1.2.6

  

- Python 3 version.

- %endif

+ %description -n python3-%{srcname} %{_description}

  

  %package doc

  Summary:        Documentation for %{name}

  BuildRequires:  help2man

- BuildRequires:  python2-sphinxcontrib-cheeseshop

- BuildRequires:  python2-sphinx

+ BuildRequires:  python3-sphinx

+ BuildRequires:  python3-sphinx-bootstrap-theme

  

  %description doc %{_description}

  

  This package contains documentation in reST and HTML formats and some

  brief feature-examples.

  

+ 

  %prep

- %autosetup -n %{modname}-%{version} -p1

- # Copy reST-files into a seperate dir

- mkdir -p reST

- cp -a docs/*.rst reST

+ %autosetup -n %{srcname}-%{version} -p1

+ 

  

  %build

- %py2_build

- %if %{with python3}

  %py3_build

- %endif

  

- # Build the autodocs

- make html -C docs

+ make SPHINXBUILD=sphinx-build-3 html -C docs

  rm -rf build/docs/html/.buildinfo

  

+ 

  %install

  mkdir -p %{buildroot}%{_mandir}/man1

  

- %py2_install

- mv %{buildroot}%{_bindir}/%{modname}{,-%{python2_version}}

- ln -s %{modname}-%{python2_version} %{buildroot}%{_bindir}/%{modname}-2

- PYTHONPATH=%{buildroot}%{python2_sitelib} help2man \

-   --no-info \

-   --name="Run a number of feature tests with behave." \

-   --output=%{modname}-%{python2_version}.1 \

-   %{buildroot}%{_bindir}/%{modname}-%{python2_version}

- install -Dpm0644 %{modname}-%{python2_version}.1 %{buildroot}%{_mandir}/man1/

- ln -s %{modname}-%{python2_version}.1 %{buildroot}%{_mandir}/man1/%{modname}.1

- 

- %if %{with python3}

  %py3_install

- mv %{buildroot}%{_bindir}/%{modname}{,-%{python3_version}}

- ln -s %{modname}-%{python3_version} %{buildroot}%{_bindir}/%{modname}-3

+ 

  PYTHONPATH=%{buildroot}%{python3_sitelib} help2man \

    --no-info \

    --name="Run a number of feature tests with behave." \

-   --output=%{modname}-%{python3_version}.1 \

-   %{buildroot}%{_bindir}/%{modname}-%{python3_version}

- install -Dpm0644 %{modname}-%{python3_version}.1 %{buildroot}%{_mandir}/man1/

- %endif

+   --output=%{srcname}.1 \

+   %{buildroot}%{_bindir}/%{srcname}

+ 

+ install -Dpm0644 %{srcname}.1 %{buildroot}%{_mandir}/man1/

  

- ln -sf %{modname}-2 %{buildroot}%{_bindir}/%{modname}

  

  %check

- nosetests-%{python2_version} -v

- %if %{with python3}

- nosetests-%{python3_version} -v

- %endif

+ %{__python3} -m pytest -v

  

- %files -n python2-%{modname}

- %license LICENSE

- %doc README.rst

- %{_bindir}/%{modname}-2

- %{_bindir}/%{modname}-%{python2_version}

- %{python2_sitelib}/%{modname}-*.egg-info/

- %{python2_sitelib}/%{modname}/

- %{python2_sitelib}/setuptools_%{modname}.py*

- %doc %{_mandir}/man1/%{modname}-%{python2_version}.1*

- %doc %{_mandir}/man1/%{modname}.1*

- 

- %{_bindir}/%{modname}

- 

- %if %{with python3}

- %files -n python3-%{modname}

+ 

+ %files -n python3-%{srcname}

  %license LICENSE

  %doc README.rst

- %doc %{_mandir}/man1/%{modname}-%{python3_version}.1*

- %{_bindir}/%{modname}-3

- %{_bindir}/%{modname}-%{python3_version}

- %{python3_sitelib}/%{modname}-*.egg-info/

- %{python3_sitelib}/%{modname}/

- %{python3_sitelib}/setuptools_%{modname}.py

- %{python3_sitelib}/__pycache__/setuptools_%{modname}.*

- %endif

+ %doc %{_mandir}/man1/%{srcname}.1*

+ %{_bindir}/%{srcname}

+ %{python3_sitelib}/%{srcname}-*.egg-info/

+ %{python3_sitelib}/%{srcname}/

+ %{python3_sitelib}/setuptools_%{srcname}.py

+ %{python3_sitelib}/__pycache__/setuptools_%{srcname}.*

+ 

  

  %files doc

  %license LICENSE

- %doc README.rst build/docs/html reST

+ %doc README.rst build/docs/html

+ 

  

  %changelog

+ * Wed Aug 22 2018 Miro Hrončok <mhroncok@redhat.com> - 1.2.6-1

+ - Update to 1.2.6

+ - Drop python2 subpackage

+ - Drop downstream only patches adding functionality

+ 

  * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5-25

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

  

file modified
+1 -1

@@ -1,1 +1,1 @@ 

- 3af4bc2886d2be982e41bfaba61da3bc  behave-1.2.5.tar.gz

+ SHA512 (behave-1.2.6.tar.gz) = bd5fbebb689694b17cb0a00cd7c7222af4e1fa88a82e5253936b93699848a067054aa888d2360867c55589b8cb24e2df638b98041fd27a487e7664d60eed06b4

  • Drop python2 subpackage
  • Drop downstream only patches adding functionality

Blocked by devel announcement.

I've also e-mailed the authors of the downstream only patches if dropping them is OK. I don't like such patches, but I don't want to break use cases here.

fyi, dnf ci uses both py2 and py3

anyway, they can adopt to it. Im +1 to this except for removing formatter

The authors of the patch are Ok with removing it though.

If we are to keep it, I'd rather see it rebased, squashed and without Python 2.6 code.

rebased onto c2ad248

2 years ago

rebased onto 1206209

2 years ago

rebased onto d2e51b1

2 years ago

Will merge tomorrow as is.

Pull-Request has been merged by churchyard

2 years ago