From b58c937c55eef8cb26c81f1c768dcb90818e6039 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Mon, 15 Jun 2015 13:17:40 +0200 Subject: [PATCH] new package --- python-snowballstemmer.spec | 133 ++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 python-snowballstemmer.spec diff --git a/python-snowballstemmer.spec b/python-snowballstemmer.spec new file mode 100644 index 0000000..996b787 --- /dev/null +++ b/python-snowballstemmer.spec @@ -0,0 +1,133 @@ +# +# Conditional build: +%bcond_without python2 # CPython 2.x module +%bcond_without python3 # CPython 3.x module + +%define module snowballstemmer +Summary: Stemmer algorithms generated from Snowball algorithms +Name: python-%{module} +Version: 1.2.0 +Release: 1 +License: BSD +Group: Libraries/Python +Source0: https://pypi.python.org/packages/source/s/snowballstemmer/%{module}-%{version}.tar.gz +# Source0-md5: 51f2ef829db8129dd0f2354f0b209970 +URL: https://github.com/shibukawa/snowball_py +BuildRequires: rpm-pythonprov +BuildRequires: rpmbuild(macros) >= 1.219 +%if %{with python2} +BuildRequires: python-setuptools +%endif +%if %{with python3} +BuildRequires: python3-setuptools +%endif +Requires: python-modules +BuildArch: noarch +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +This package provides 16 stemmer algorithms (15 + Poerter English +stemmer) generated from Snowball algorithms. + +It includes following language algorithms: + + - Danish + - Dutch + - English (Standard, Porter) + - Finnish + - French + - German + - Hungarian + - Italian + - Norwegian + - Portuguese + - Romanian + - Russian + - Spanish + - Swedish + - Turkish + +This is a pure Python stemming library. If PyStemmer is available, +this module uses it to accelerate. + +%package -n python3-%{module} +Summary: Stemmer algorithms generated from Snowball algorithms +Group: Libraries/Python +Requires: python3-modules + +%description -n python3-%{module} +This package provides 16 stemmer algorithms (15 + Poerter English +stemmer) generated from Snowball algorithms. + +It includes following language algorithms: + + - Danish + - Dutch + - English (Standard, Porter) + - Finnish + - French + - German + - Hungarian + - Italian + - Norwegian + - Portuguese + - Romanian + - Russian + - Spanish + - Swedish + - Turkish + +This is a pure Python stemming library. If PyStemmer is available, +this module uses it to accelerate. + +%prep +%setup -q -n %{module}-%{version} + +%build +%if %{with python2} +%{__python} setup.py build --build-base build-2 +%endif + +%if %{with python3} +%{__python3} setup.py build --build-base build-3 +%endif + +%install +rm -rf $RPM_BUILD_ROOT + +%if %{with python2} +%{__python} setup.py \ + build --build-base build-2 \ + install --skip-build \ + --optimize=2 \ + --root=$RPM_BUILD_ROOT + +%py_postclean +%endif + +%if %{with python3} +%{__python3} setup.py \ + build --build-base build-3 \ + install --skip-build \ + --optimize=2 \ + --root=$RPM_BUILD_ROOT +%endif + +%clean +rm -rf $RPM_BUILD_ROOT + +%if %{with python2} +%files +%defattr(644,root,root,755) +%doc README.rst +%{py_sitescriptdir}/%{module} +%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info +%endif + +%if %{with python3} +%files -n python3-%{module} +%defattr(644,root,root,755) +%doc README.rst +%{py3_sitescriptdir}/%{module} +%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info +%endif -- 2.44.0