#1 Add bcond_without tests
Merged 5 years ago by eclipseo. Opened 5 years ago by kanarip.
rpms/ kanarip/python-Automat epel8  into  master

Add bcond_without tests
Jeroen van Meeuwen (Kolab Systems) • 5 years ago  
file modified
+14 -7
@@ -2,9 +2,11 @@ 

  %global pypi_name Automat

  

  %global common_description %{expand:

- Automat is a library for concise, idiomatic Python expression of finite-state 

+ Automat is a library for concise, idiomatic Python expression of finite-state

  automata (particularly deterministic finite-state transducers).}

  

+ %bcond_without tests

+ 

  Name:           python-%{pypi_name}

  Version:        0.6.0

  Release:        4%{?dist}
@@ -14,18 +16,17 @@ 

  URL:            https://github.com/glyph/Automat

  Source0:        https://files.pythonhosted.org/packages/source/A/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

  BuildArch:      noarch

-  

+ 

  %{?python_enable_dependency_generator}

-  

+ 

  %description

- Automat is a library for concise, idiomatic Python expression of finite-state 

- automata (particularly deterministic finite-state transducers).

+ %{common_description}

  

  

  %package -n     python2-%{pypi_name}

  Summary:        %{summary}

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

-  

+ 

  BuildRequires:  python2-devel

  BuildRequires:  python2dist(attrs)

  BuildRequires:  python2dist(graphviz) > 0.5.1
@@ -33,7 +34,9 @@ 

  BuildRequires:  python2dist(setuptools)

  BuildRequires:  python2dist(setuptools-scm)

  BuildRequires:  python2dist(six)

+ %if %{with tests}

  BuildRequires:  python2dist(twisted) >= 16.1.1

+ %endif

  

  %description -n python2-%{pypi_name}

  %{common_description}
@@ -42,7 +45,7 @@ 

  %package -n     python3-%{pypi_name}

  Summary:        %{summary}

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

-  

+ 

  BuildRequires:  python3-devel

  BuildRequires:  python3dist(attrs)

  BuildRequires:  python3dist(graphviz) > 0.5.1
@@ -50,7 +53,9 @@ 

  BuildRequires:  python3dist(setuptools)

  BuildRequires:  python3dist(setuptools-scm)

  BuildRequires:  python3dist(six)

+ %if %{with tests}

  BuildRequires:  python3dist(twisted) >= 16.1.1

+ %endif

  

  %description -n python3-%{pypi_name}

  %{common_description}
@@ -76,8 +81,10 @@ 

  

  

  %check

+ %if %{with tests}

  %{__python2} setup.py test

  %{__python3} setup.py test

+ %endif

  

  

  %files -n python2-%{pypi_name}

Avoid the dependency loop on twisted, which in turn requires -Automat somewhere down the chain.

Ohw, and trailing whitespace. Sorry about that. It flashes in red in my editor.

Pull-Request has been merged by eclipseo

5 years ago