From 2dba26b8988fceee948f8d993f40e88998a57abdf04d33d224bb66d2b99c835a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 14 Mar 2020 09:07:33 +0000 Subject: [PATCH 1/2] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=28 --- python-nltk.changes | 5 +++++ python-nltk.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/python-nltk.changes b/python-nltk.changes index 07318fa..e93807c 100644 --- a/python-nltk.changes +++ b/python-nltk.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 14 09:07:16 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Mon Oct 14 14:00:43 UTC 2019 - Matej Cepl diff --git a/python-nltk.spec b/python-nltk.spec index e90d505..794f578 100644 --- a/python-nltk.spec +++ b/python-nltk.spec @@ -1,7 +1,7 @@ # # spec file for package python-nltk # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -84,6 +84,6 @@ chmod -x %{buildroot}%{$python_sitelib}/nltk/test/dependency.doctest %doc README.md %license LICENSE.txt %{python_sitelib}/%{pyname}/ -%{python_sitelib}/%{pyname}-%{version}-py%{py_ver}.egg-info/ +%{python_sitelib}/%{pyname}-%{version}-py%{python_version}.egg-info/ %changelog From 633fd47a1c2e3afa3d2dd09d30b415a0bc28000afa890d41cb9d54f18f58c3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 14 Mar 2020 09:08:41 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=29 --- python-nltk.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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