SHA256
1
0
forked from pool/python-nltk

Accepting request 784877 from devel:languages:python

- Fix build without python2

OBS-URL: https://build.opensuse.org/request/show/784877
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=8
This commit is contained in:
Dominique Leuenberger 2020-03-16 09:18:08 +00:00 committed by Git OBS Bridge
commit 9bc11634ca
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Mar 14 09:07:16 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Fix build without python2
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 14 14:00:43 UTC 2019 - Matej Cepl <mcepl@suse.com> Mon Oct 14 14:00:43 UTC 2019 - Matej Cepl <mcepl@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-nltk # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -19,6 +19,7 @@
%{!?python_module:%define python_module() python-%{**} python3-%{**}} %{!?python_module:%define python_module() python-%{**} python3-%{**}}
%define interps python python3 %define interps python python3
%define pyname nltk %define pyname nltk
%bcond_without python2
Name: python-nltk Name: python-nltk
Version: 3.4.5 Version: 3.4.5
Release: 0 Release: 0
@ -31,7 +32,6 @@ BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six} BuildRequires: %{python_module six}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: python-singledispatch
BuildRequires: unzip BuildRequires: unzip
Requires: python-six Requires: python-six
Recommends: python-gensim Recommends: python-gensim
@ -44,11 +44,11 @@ Recommends: python-scikit-learn
Recommends: python-scipy Recommends: python-scipy
Recommends: python-twython Recommends: python-twython
BuildArch: noarch BuildArch: noarch
%ifpython2 %if %{with python2}
Requires: python-singledispatch BuildRequires: python-singledispatch
%endif %endif
%ifpython2 %ifpython2
Requires: python2-singledispatch Requires: python-singledispatch
%endif %endif
%python_subpackages %python_subpackages
@ -84,6 +84,6 @@ chmod -x %{buildroot}%{$python_sitelib}/nltk/test/dependency.doctest
%doc README.md %doc README.md
%license LICENSE.txt %license LICENSE.txt
%{python_sitelib}/%{pyname}/ %{python_sitelib}/%{pyname}/
%{python_sitelib}/%{pyname}-%{version}-py%{py_ver}.egg-info/ %{python_sitelib}/%{pyname}-%{version}-py%{python_version}.egg-info/
%changelog %changelog