summaryrefslogtreecommitdiff
path: root/python/PyStemmer
diff options
context:
space:
mode:
Diffstat (limited to 'python/PyStemmer')
-rw-r--r--python/PyStemmer/PyStemmer.SlackBuild12
-rw-r--r--python/PyStemmer/PyStemmer.info6
-rw-r--r--python/PyStemmer/python-3.7-compatibility.patch66
3 files changed, 6 insertions, 78 deletions
diff --git a/python/PyStemmer/PyStemmer.SlackBuild b/python/PyStemmer/PyStemmer.SlackBuild
index 58c11442d1..dc0c20a2d4 100644
--- a/python/PyStemmer/PyStemmer.SlackBuild
+++ b/python/PyStemmer/PyStemmer.SlackBuild
@@ -25,8 +25,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=PyStemmer
-VERSION=${VERSION:-1.3.0}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-2.0.1}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -73,10 +73,6 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
-# Patch for python 3.7 compatibility
-# https://github.com/snowballstem/pystemmer/pull/21/commits/b29ce2109f49c0b82517fa9d3e2bbacc1f8b34ec
-patch < $CWD/python-3.7-compatibility.patch
-
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -84,9 +80,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python setup.py install --root=$PKG
-
-#CFLAGS="$SLKCFLAGS" \
+python2 setup.py install --root=$PKG
python3 setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
diff --git a/python/PyStemmer/PyStemmer.info b/python/PyStemmer/PyStemmer.info
index 02970e0e9e..ee59ab63c0 100644
--- a/python/PyStemmer/PyStemmer.info
+++ b/python/PyStemmer/PyStemmer.info
@@ -1,8 +1,8 @@
PRGNAM="PyStemmer"
-VERSION="1.3.0"
+VERSION="2.0.1"
HOMEPAGE="https://snowballstem.org/"
-DOWNLOAD="https://pypi.python.org/packages/21/ee/19e0e4ec9398cc022617baa5f013fd415cce4887748245126aa6d4fac3c6/PyStemmer-1.3.0.tar.gz"
-MD5SUM="46ee623eeeba5a7cc0d95cbfa7e18abd"
+DOWNLOAD="https://files.pythonhosted.org/packages/55/b2/c3aeebfe4a60256ddb72257e750a94c26c3085f017b7e58c860d5aa91432/PyStemmer-2.0.1.tar.gz"
+MD5SUM="b9b2296b2eec30b06c62879484328e87"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/python/PyStemmer/python-3.7-compatibility.patch b/python/PyStemmer/python-3.7-compatibility.patch
deleted file mode 100644
index aeebafd725..0000000000
--- a/python/PyStemmer/python-3.7-compatibility.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From b29ce2109f49c0b82517fa9d3e2bbacc1f8b34ec Mon Sep 17 00:00:00 2001
-From: konstantin <kslavnov@gmail.com>
-Date: Sun, 30 Sep 2018 20:30:07 +0300
-Subject: [PATCH] Fix installation for python 3.7
-
-Changes list:
-- Use setuptools instead of distutils to handle `setup_requires` in `setup()`.
-- Require Cython package for setup and always build `.pyx` to `.c`. It also requires `python-dev` to be installed (see `.travis.yml`).
----
- setup.py | 27 +++++++++------------------
- 1 files changed, 9 insertions(+), 18 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 5fa89f5..fc53b69 100644
---- a/setup.py
-+++ b/setup.py
-@@ -1,13 +1,13 @@
- #!/usr/bin/env python
-
--from distutils.core import setup, Extension
-+from setuptools import setup, Extension
- import os.path
-
--try:
-+
-+def build_ext(*args, **kwargs):
- from Cython.Distutils import build_ext
-- have_pyrex = 1
--except:
-- have_pyrex = 0
-+ return build_ext(*args, **kwargs)
-+
-
- # Directory which libstemmer sources are unpacked in.
- library_dir = 'libstemmer_c'
-@@ -39,16 +39,8 @@
- # Set the include path to include libstemmer.
- include_dirs = ('src', os.path.join(library_dir, 'include'))
-
--if have_pyrex:
-- # Add the pyrex sources, and a special rule so distutils knows how to
-- # use them.
-- src_files.append('src/Stemmer.pyx')
-- cmdclass = {'build_ext': build_ext}
--else:
-- # Add just the C sources.
-- src_files.append('src/Stemmer.c')
-- cmdclass = {}
--
-+src_files.append('src/Stemmer.pyx')
-+
- long_description = r"""
-
- Stemming algorithms
-@@ -125,9 +117,8 @@
- "Topic :: Text Processing :: Indexing",
- "Topic :: Text Processing :: Linguistic",
- ],
--
-+ setup_requires=['Cython>=0.28.5,<1.0'],
- ext_modules = [Extension('Stemmer', src_files,
- include_dirs = include_dirs)],
-- cmdclass = cmdclass
-+ cmdclass = {'build_ext': build_ext}
- )
--