- Update to 2.0.0:

* Support for enchant2, py3 fixes
- Add patch to prefer enchant2 when both available:
  * enchant2.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyenchant?expand=0&rev=19
This commit is contained in:
Tomáš Chvátal 2018-08-24 13:05:32 +00:00 committed by Git OBS Bridge
parent c364066645
commit 541fc45db3
5 changed files with 47 additions and 19 deletions

22
enchant2.patch Normal file
View File

@ -0,0 +1,22 @@
From ed02ae493ade4ca749462d041ce83261783fa1a1 Mon Sep 17 00:00:00 2001
From: Raphael Michel <mail@raphaelmichel.de>
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")

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:27d3307aa3d3cd413c20eb1fd977446c133cae47d7329d8f846cd3d8ddae6278
size 64137

3
pyenchant-2.0.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fc31cda72ace001da8fe5d42f11c26e514a91fa8c70468739216ddd8de64e2a0
size 64022

View File

@ -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

View File

@ -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