diff --git a/enchant2.patch b/enchant2.patch new file mode 100644 index 0000000..a84ad58 --- /dev/null +++ b/enchant2.patch @@ -0,0 +1,22 @@ +From ed02ae493ade4ca749462d041ce83261783fa1a1 Mon Sep 17 00:00:00 2001 +From: Raphael Michel +Date: Thu, 8 Mar 2018 10:40:00 +0100 +Subject: [PATCH] Auto-detect enchant2 + +After support for enchant2 is already merged, the only thing missing is to detect the library :) +--- + enchant/_enchant.py | 1 + + 1 file changed, 1 insertion(+) + +Index: pyenchant-2.0.0/enchant/_enchant.py +=================================================================== +--- pyenchant-2.0.0.orig/enchant/_enchant.py ++++ pyenchant-2.0.0/enchant/_enchant.py +@@ -71,6 +71,7 @@ def _e_path_possibilities(): + yield "libenchant.so.1" + yield "libenchant.so" + # See if ctypes can find the library for us, under various names. ++ yield find_library("enchant-2") + yield find_library("enchant") + yield find_library("libenchant") + yield find_library("libenchant-1") diff --git a/pyenchant-1.6.11.tar.gz b/pyenchant-1.6.11.tar.gz deleted file mode 100644 index d1790ea..0000000 --- a/pyenchant-1.6.11.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:27d3307aa3d3cd413c20eb1fd977446c133cae47d7329d8f846cd3d8ddae6278 -size 64137 diff --git a/pyenchant-2.0.0.tar.gz b/pyenchant-2.0.0.tar.gz new file mode 100644 index 0000000..0b4c2db --- /dev/null +++ b/pyenchant-2.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc31cda72ace001da8fe5d42f11c26e514a91fa8c70468739216ddd8de64e2a0 +size 64022 diff --git a/python-pyenchant.changes b/python-pyenchant.changes index e816271..5e35651 100644 --- a/python-pyenchant.changes +++ b/python-pyenchant.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Aug 24 13:01:16 UTC 2018 - tchvatal@suse.com + +- Update to 2.0.0: + * Support for enchant2, py3 fixes +- Add patch to prefer enchant2 when both available: + * enchant2.patch + ------------------------------------------------------------------- Thu Aug 31 16:50:42 UTC 2017 - toddrme2178@gmail.com diff --git a/python-pyenchant.spec b/python-pyenchant.spec index 9f9d832..7bacc17 100644 --- a/python-pyenchant.spec +++ b/python-pyenchant.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyenchant # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,27 +18,25 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python -%bcond_without test Name: python-pyenchant -Version: 1.6.11 +Version: 2.0.0 Release: 0 Summary: Python bindings for the Enchant spellchecking system -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Development/Languages/Python -Url: https://github.com/rfk/pyenchant/ +URL: https://github.com/rfk/pyenchant/ Source: https://files.pythonhosted.org/packages/source/p/pyenchant/pyenchant-%{version}.tar.gz -BuildRequires: %{python_module devel} +Patch0: enchant2.patch BuildRequires: %{python_module setuptools} +BuildRequires: enchant-2-backend-hunspell BuildRequires: fdupes -BuildRequires: python-rpm-macros -BuildRequires: python3-2to3 -%if %{with test} -BuildRequires: enchant BuildRequires: myspell-en BuildRequires: myspell-en_AU BuildRequires: myspell-en_US -%endif -Requires: enchant +BuildRequires: python-rpm-macros +BuildRequires: python3-2to3 +Requires: enchant-2-backend-hunspell +Provides: python-enchant BuildArch: noarch %ifpython2 Provides: PyEnchant = %{version} @@ -53,7 +51,9 @@ PyEnchant is a spellchecking library for Python, based on the excellent Enchant %prep %setup -q -n pyenchant-%{version} +%patch0 -p1 chmod a-x *.txt +chmod a-x *egg-info/* %build %python_build @@ -62,15 +62,13 @@ chmod a-x *.txt %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if %{with test} %check export LANG=en_US.UTF-8 %python_exec setup.py test -%endif %files %{python_files} -%defattr(-,root,root,-) -%doc LICENSE.txt README.txt TODO.txt +%license LICENSE.txt +%doc README.txt TODO.txt %{python_sitelib}/enchant %{python_sitelib}/pyenchant-%{version}-py*.egg-info