Date: Saturday, December 2, 2017 @ 20:44:35 Author: jelle Revision: 271926
archrelease: copy trunk to community-testing-any Added: python-pyenchant/repos/community-testing-any/ python-pyenchant/repos/community-testing-any/0001-Add-enchant-2-compatibility.patch (from rev 271925, python-pyenchant/trunk/0001-Add-enchant-2-compatibility.patch) python-pyenchant/repos/community-testing-any/PKGBUILD (from rev 271925, python-pyenchant/trunk/PKGBUILD) ----------------------------------------+ 0001-Add-enchant-2-compatibility.patch | 70 +++++++++++++++++++++++++++++++ PKGBUILD | 53 +++++++++++++++++++++++ 2 files changed, 123 insertions(+) Copied: python-pyenchant/repos/community-testing-any/0001-Add-enchant-2-compatibility.patch (from rev 271925, python-pyenchant/trunk/0001-Add-enchant-2-compatibility.patch) =================================================================== --- community-testing-any/0001-Add-enchant-2-compatibility.patch (rev 0) +++ community-testing-any/0001-Add-enchant-2-compatibility.patch 2017-12-02 20:44:35 UTC (rev 271926) @@ -0,0 +1,70 @@ +From 4ecabbdb345a4f84e97e05abb970e8ca83e6b52e Mon Sep 17 00:00:00 2001 +From: Jelle van der Waa <je...@vdwaa.nl> +Date: Sat, 2 Dec 2017 21:13:42 +0100 +Subject: [PATCH] Add enchant 2 compatibility + +Remove is_in_session of which the function is removed in Enchant 2.0 and +was already deprecated. +--- + enchant/__init__.py | 9 --------- + enchant/_enchant.py | 6 ------ + enchant/pypwl.py | 6 ------ + 3 files changed, 21 deletions(-) + +diff --git a/enchant/__init__.py b/enchant/__init__.py +index 016d32f..56ecbeb 100644 +--- a/enchant/__init__.py ++++ b/enchant/__init__.py +@@ -715,15 +715,6 @@ class Dict(_EnchantObject): + word = self._StringClass(word) + return _e.dict_is_removed(self._this,word.encode()) + +- def is_in_session(self,word): +- """Check whether a word is in the session list.""" +- warnings.warn("Dict.is_in_session is deprecated, "\ +- "please use Dict.is_added", +- category=DeprecationWarning,stacklevel=2) +- self._check_this() +- word = self._StringClass(word) +- return _e.dict_is_in_session(self._this,word.encode()) +- + def store_replacement(self,mis,cor): + """Store a replacement spelling for a miss-spelled word. + +diff --git a/enchant/_enchant.py b/enchant/_enchant.py +index a07058d..cf77908 100644 +--- a/enchant/_enchant.py ++++ b/enchant/_enchant.py +@@ -309,12 +309,6 @@ dict_is_removed1.restype = c_int + def dict_is_removed(dict,word): + return dict_is_removed1(dict,word,len(word)) + +-dict_is_in_session1 = e.enchant_dict_is_in_session +-dict_is_in_session1.argtypes = [t_dict,c_char_p,c_size_t] +-dict_is_in_session1.restype = c_int +-def dict_is_in_session(dict,word): +- return dict_is_in_session1(dict,word,len(word)) +- + dict_store_replacement1 = e.enchant_dict_store_replacement + dict_store_replacement1.argtypes = [t_dict,c_char_p,c_size_t,c_char_p,c_size_t] + dict_store_replacement1.restype = None +diff --git a/enchant/pypwl.py b/enchant/pypwl.py +index 3a2248f..282c015 100644 +--- a/enchant/pypwl.py ++++ b/enchant/pypwl.py +@@ -247,12 +247,6 @@ class PyPWL: + """Add a word to the session list.""" + self._words.insert(word) + +- def is_in_session(self,word): +- """Check whether a word is in the session list.""" +- warnings.warn("PyPWL.is_in_session is deprecated, please use PyPWL.is_added",category=DeprecationWarning) +- # Consider all words to be in the session list +- return self.check(word) +- + def store_replacement(self,mis,cor): + """Store a replacement spelling for a miss-spelled word. + +-- +2.15.1 + Copied: python-pyenchant/repos/community-testing-any/PKGBUILD (from rev 271925, python-pyenchant/trunk/PKGBUILD) =================================================================== --- community-testing-any/PKGBUILD (rev 0) +++ community-testing-any/PKGBUILD 2017-12-02 20:44:35 UTC (rev 271926) @@ -0,0 +1,53 @@ +# $Id$ +# Contributor: Pierre Buard <pierre.bu...@gmail.com> +# Contributor: Allan McRae <al...@archlinux.org> +# Contributor: Sebastien Piccand <sebcactus gmail com> +# Contributor: Daniel J Griffiths <ghost1...@archlinux.us> +# Maintainer: Jelle van der Waa <je...@archlinux.org> + +pkgname=('python-pyenchant' 'python2-pyenchant') +pkgver=1.6.11 +pkgrel=2 +arch=('any') +url="https://pypi.python.org/pypi/pyenchant" +license=('LGPL') +makedepends=('python2-setuptools' 'python-setuptools' 'enchant') +source=('https://pypi.python.org/packages/f3/00/c04496277b1e681d0f500baf7ac8f3c7f1d21b9ea97ed951ed4ac5635fda/pyenchant-1.6.11.tar.gz' + '0001-Add-enchant-2-compatibility.patch') +md5sums=('a97f46c6bf0133318759e099117e91a8' + 'b25bd3e7e3b6c19d24d2209214673e41') + +prepare() { + cd pyenchant-${pkgver} + patch -Np1 -i "${srcdir}/0001-Add-enchant-2-compatibility.patch" +} + +build() { + cp -r pyenchant-${pkgver} pyenchant2-${pkgver} + + cd ${srcdir}/pyenchant-${pkgver} + + python3 setup.py build + + cd ${srcdir}/pyenchant2-${pkgver} + + python2 setup.py build +} + +package_python-pyenchant() { + pkgdesc="PyEnchant is a spellchecking library for Python3 based on the Enchant library" + depends=('python' 'enchant') + + cd pyenchant-${pkgver} + + python3 setup.py install --root=${pkgdir} --optimize=1 +} + +package_python2-pyenchant() { + pkgdesc="PyEnchant is a spellchecking library for Python2 based on the Enchant library" + depends=('python2' 'enchant') + + cd pyenchant2-${pkgver} + + python2 setup.py install --root=${pkgdir} --optimize=1 +}