diff --git a/python-nltk.spec b/python-nltk.spec index 794f578..e964065 100644 --- a/python-nltk.spec +++ b/python-nltk.spec @@ -19,6 +19,7 @@ %{!?python_module:%define python_module() python-%{**} python3-%{**}} %define interps python python3 %define pyname nltk +%bcond_without python2 Name: python-nltk Version: 3.4.5 Release: 0 @@ -31,7 +32,6 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: python-singledispatch BuildRequires: unzip Requires: python-six Recommends: python-gensim @@ -44,11 +44,11 @@ Recommends: python-scikit-learn Recommends: python-scipy Recommends: python-twython BuildArch: noarch -%ifpython2 -Requires: python-singledispatch +%if %{with python2} +BuildRequires: python-singledispatch %endif %ifpython2 -Requires: python2-singledispatch +Requires: python-singledispatch %endif %python_subpackages