1{ lib, python, fetchPypi, buildPythonPackage, cython }:
2
3buildPythonPackage rec {
4 pname = "PyStemmer";
5 version = "2.0.1";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "9b81c35302f1d2a5ad9465b85986db246990db93d97d3e8f129269ed7102788e";
10 };
11
12 nativeBuildInputs = [ cython ];
13
14 preBuild = ''
15 cython src/Stemmer.pyx
16 '';
17
18 checkPhase = ''
19 ${python.interpreter} runtests.py
20 '';
21
22 meta = with lib; {
23 description = "Snowball stemming algorithms, for information retrieval";
24 homepage = "http://snowball.tartarus.org/";
25 license = licenses.mit;
26 platforms = platforms.unix;
27 };
28}