[packages/python-snowballstemmer] new package

jajcus jajcus at pld-linux.org
Mon Jun 15 13:18:00 CEST 2015


commit b58c937c55eef8cb26c81f1c768dcb90818e6039
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Mon Jun 15 13:17:40 2015 +0200

    new package

 python-snowballstemmer.spec | 133 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 133 insertions(+)
---
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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-snowballstemmer.git/commitdiff/b58c937c55eef8cb26c81f1c768dcb90818e6039



More information about the pld-cvs-commit mailing list