File python-jieba.spec of Package python-jieba
#
# spec file for package python-jieba
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-jieba
Version: 0.38git20170406
Release: 0
Summary: A Chinese word segmentation module in Python
License: MIT
Group: Development/Languages/Python
Url: https://github.com/fxsjy/jieba
# Source: https://pypi.python.org/packages/source/j/jieba/jieba-0.31.zip
# Chinese word segmentation is an ambiguous accuracy affair, old tarballs
# just make situation even worse. So git please, but this one do have a pypi.
Source: %{name}-%{version}.tar.xz
BuildRequires: %{python_module devel }
BuildRequires: %{python_module setuptools }
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if !%{?sles_version}
BuildArch: noarch
%endif
%python_subpackages
%description
A Chinese word segmentation module in Python.
%prep
%setup -q
%build
%python_build
%install
%python_install
%fdupes %{buildroot}%{_prefix}
%files %{python_files}
%defattr(-,root,root)
%doc Changelog README.md LICENSE
%{python_sitelib}/jieba/
%{python_sitelib}/jieba-0.38-py%{py_ver}.egg-info
%changelog