From 101174d8b7a29f1e5cddd1b60413d4763769c2a9 Mon Sep 17 00:00:00 2001 From: Mike FABIAN Date: Mar 06 2018 13:12:00 +0000 Subject: Apply fix for encoding problem from upstream. See: https://github.com/blatinier/pyhunspell/issues/32 --- diff --git a/0001-add-information-on-readme-about-apple-fun.patch b/0001-add-information-on-readme-about-apple-fun.patch new file mode 100644 index 0000000..6f7ba04 --- /dev/null +++ b/0001-add-information-on-readme-about-apple-fun.patch @@ -0,0 +1,42 @@ +From a38352c6df5daef067ccff3eaad8e2a71ab7bbc5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= +Date: Sat, 22 Jul 2017 23:13:35 +0200 +Subject: [PATCH 01/12] add: information on readme about apple fun + +--- + AUTHORS.md | 1 + + README.md | 8 ++++++++ + 2 files changed, 9 insertions(+) + +diff --git a/AUTHORS.md b/AUTHORS.md +index 2e8eca7..4a9494a 100644 +--- a/AUTHORS.md ++++ b/AUTHORS.md +@@ -1,4 +1,5 @@ + # Contributors ++- Adam Bittlingmayer ([@bittlingmayer](https://github.com/bittlingmayer)) + - Antoine Fontaine ([@MDziwny](https://github.com/MDziwny)) + - arunbala ([@arunbala](https://github.com/arunbala)) + - Benjamin Drung ([@bdrung](https://github.com/bdrung)) +diff --git a/README.md b/README.md +index 0bdaf03..212e361 100644 +--- a/README.md ++++ b/README.md +@@ -64,6 +64,14 @@ True + False + ``` + ++# Troubleshooting ++ ++On MacOS Sierra with python 3.5 you can come across this error: ++``` ++fatal error: /Applications/XXX-bla-bla-bla-XXX/usr/bin/lipo: can't figure out the architecture type of: /var/folders/bla-bla-bla/XXX.out ++``` ++It might be solved by doing `brew unlink apple-gcc42`. See #31 and regebro/hovercraft#80. ++ + # Misc + + Saw a bug ? Wan't a feature ? Go fill an issue [here](https://github.com/blatinier/pyhunspell/issues) +-- +2.14.3 + diff --git a/0002-try-some-MacOS-fix.patch b/0002-try-some-MacOS-fix.patch new file mode 100644 index 0000000..de7b4e6 --- /dev/null +++ b/0002-try-some-MacOS-fix.patch @@ -0,0 +1,25 @@ +From bd200fcdd11dbab6c5624381ca8918855dcfd75d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= +Date: Sat, 27 Jan 2018 00:31:08 +0100 +Subject: [PATCH 02/12] try some MacOS fix + +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 59ebe33..b698f2d 100755 +--- a/setup.py ++++ b/setup.py +@@ -32,7 +32,7 @@ if platform.system() == "Windows": + else: + main_module_kwargs['macros'] = [('_LINUX', None)] + main_module_kwargs['libraries'] = ['hunspell'] +- main_module_kwargs['include_dirs'] = '/usr/include/hunspell', ++ main_module_kwargs['include_dirs'] = ['/usr/include/hunspell', '/usr/local/Cellar/hunspell/1.6.2/include/hunspell'], + main_module_kwargs['compile_args'] = ['-Wall'] + + main = Extension('hunspell', **main_module_kwargs) +-- +2.14.3 + diff --git a/0003-add-some-more-explanation-in-the-README.patch b/0003-add-some-more-explanation-in-the-README.patch new file mode 100644 index 0000000..956066f --- /dev/null +++ b/0003-add-some-more-explanation-in-the-README.patch @@ -0,0 +1,29 @@ +From 68987fa6e4d56e450a663ee1eeae84cae1aad305 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= +Date: Wed, 31 Jan 2018 16:18:41 +0100 +Subject: [PATCH 03/12] add some more explanation in the README + +--- + README.md | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/README.md b/README.md +index 212e361..e02d2f0 100644 +--- a/README.md ++++ b/README.md +@@ -27,11 +27,7 @@ Or from source using the following command as root: + python setup.py install + ``` + +-For OSX 10.10 [@mimrock](https://github.com/mimrock) indicated that you might need to do something like this: +- +-``` +-ln -s /usr/local/lib/libhunspell-1.4.a /usr/local/lib/libhunspell.a +-``` ++For OSX the version of the lib used to compile is hardcoded. If your installation fails, please try to clone the repo and change `main_module_kwargs['include_dirs']` in `setup.py` to the correct one and/or open an issue stating the problem and the hunspell version with the `.h` location in your system. + + For windows7 [@tallforasmurf](https://github.com/tallforasmurf) compiled a python 3.4 compatible version of the pyhunspell==0.3.3 package available here: http://pyhunspell.latinier.fr + (Warning: Those windows compiled packages are not reviewed or tested). It could work for other windows version or python versions. +-- +2.14.3 + diff --git a/0004-pop-version.patch b/0004-pop-version.patch new file mode 100644 index 0000000..fca9920 --- /dev/null +++ b/0004-pop-version.patch @@ -0,0 +1,40 @@ +From 2e5c3542f7fbf5d4f2cb892359bcd78a729a8a5f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= +Date: Wed, 31 Jan 2018 16:34:59 +0100 +Subject: [PATCH 04/12] pop version + +--- + CHANGELOG.md | 4 ++++ + setup.py | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 084a3d3..a823832 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -1,5 +1,9 @@ + # Changelog + ++## 0.5.1 (2018-01-31) ++### Bug fixes ++- Fix Installation fail on OSX (issue #33) ++ + ## 0.5.0 (2016-06-30) + ### New features + - A binding to `add_dic` allowing to load another dic in a hunspell instance (useful for technical terms, e.g, medical dictionary) (issue #30 & #2) +diff --git a/setup.py b/setup.py +index b698f2d..106df45 100755 +--- a/setup.py ++++ b/setup.py +@@ -38,7 +38,7 @@ else: + main = Extension('hunspell', **main_module_kwargs) + + setup(name="hunspell", +- version="0.5.0", ++ version="0.5.1", + description="Module for the Hunspell spellchecker engine", + author="Benoît Latinier", + author_email="benoit@latinier.fr", +-- +2.14.3 + diff --git a/0005-ignore-dist.patch b/0005-ignore-dist.patch new file mode 100644 index 0000000..0b281cf --- /dev/null +++ b/0005-ignore-dist.patch @@ -0,0 +1,21 @@ +From 94888cb4f42e8d3788bd31858602bb2f9c4e70cb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= +Date: Wed, 31 Jan 2018 20:48:40 +0100 +Subject: [PATCH 05/12] ignore dist + +--- + .gitignore | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/.gitignore b/.gitignore +index b739370..b0ded7e 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -2,3 +2,4 @@ + venv + __pycache__ + MANIFEST ++dist +-- +2.14.3 + diff --git a/0006-split-linux-macos-params.patch b/0006-split-linux-macos-params.patch new file mode 100644 index 0000000..1bf4cc1 --- /dev/null +++ b/0006-split-linux-macos-params.patch @@ -0,0 +1,33 @@ +From 9eaae7726ac95ae8b334e936064b51c8d0d42f46 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= +Date: Thu, 1 Feb 2018 21:36:59 +0100 +Subject: [PATCH 06/12] split linux/macos params + +--- + setup.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 106df45..0dcbf01 100755 +--- a/setup.py ++++ b/setup.py +@@ -29,10 +29,15 @@ if platform.system() == "Windows": + main_module_kwargs['include_dirs'] = ['V:/hunspell-1.3.3/src/hunspell'] + main_module_kwargs['library_dirs'] = ['V:/hunspell-1.3.3/src/win_api/x64/Release/libhunspell'] + main_module_kwargs['compile_args'] = ['/MT'] ++elif platform.system() == "Darwin": ++ main_module_kwargs['macros'] = [('_LINUX', None)] ++ main_module_kwargs['libraries'] = ['hunspell'] ++ main_module_kwargs['include_dirs'] = '/usr/local/Cellar/hunspell/1.6.2/include/hunspell', ++ main_module_kwargs['compile_args'] = ['-Wall'] + else: + main_module_kwargs['macros'] = [('_LINUX', None)] + main_module_kwargs['libraries'] = ['hunspell'] +- main_module_kwargs['include_dirs'] = ['/usr/include/hunspell', '/usr/local/Cellar/hunspell/1.6.2/include/hunspell'], ++ main_module_kwargs['include_dirs'] = '/usr/include/hunspell', + main_module_kwargs['compile_args'] = ['-Wall'] + + main = Extension('hunspell', **main_module_kwargs) +-- +2.14.3 + diff --git a/0007-pop-version.patch b/0007-pop-version.patch new file mode 100644 index 0000000..f77511c --- /dev/null +++ b/0007-pop-version.patch @@ -0,0 +1,40 @@ +From ebbd881020864f8e4ddf922b66c7fe8143bf90dc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= +Date: Thu, 1 Feb 2018 21:44:26 +0100 +Subject: [PATCH 07/12] pop version + +--- + CHANGELOG.md | 4 ++++ + setup.py | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index a823832..d03de9c 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -1,5 +1,9 @@ + # Changelog + ++## 0.5.2 (2018-02-01) ++### Bug fixes ++- Fix installation on linux broken by 0.5.1 ++ + ## 0.5.1 (2018-01-31) + ### Bug fixes + - Fix Installation fail on OSX (issue #33) +diff --git a/setup.py b/setup.py +index 0dcbf01..76115fe 100755 +--- a/setup.py ++++ b/setup.py +@@ -43,7 +43,7 @@ else: + main = Extension('hunspell', **main_module_kwargs) + + setup(name="hunspell", +- version="0.5.1", ++ version="0.5.2", + description="Module for the Hunspell spellchecker engine", + author="Benoît Latinier", + author_email="benoit@latinier.fr", +-- +2.14.3 + diff --git a/0008-Fix-sor-warning-and-make-the-package-wheel-compatibl.patch b/0008-Fix-sor-warning-and-make-the-package-wheel-compatibl.patch new file mode 100644 index 0000000..8a0835c --- /dev/null +++ b/0008-Fix-sor-warning-and-make-the-package-wheel-compatibl.patch @@ -0,0 +1,51 @@ +From c5cfab598530701557d2f10f00322089bc998947 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= +Date: Thu, 1 Feb 2018 23:27:05 +0100 +Subject: [PATCH 08/12] Fix sor warning and make the package wheel compatible + +--- + setup.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/setup.py b/setup.py +index 76115fe..cbdd340 100755 +--- a/setup.py ++++ b/setup.py +@@ -18,27 +18,27 @@ You should have received a copy of the GNU General Public License + along with PyHunspell. If not, see . + """ + +-from distutils.core import setup, Extension ++from setuptools import setup, Extension + import platform + + main_module_kwargs = {"sources": ['hunspell.cpp'], + "language": "c++"} + if platform.system() == "Windows": +- main_module_kwargs['macros'] = [('HUNSPELL_STATIC', None)] ++ main_module_kwargs['define_macros'] = [('HUNSPELL_STATIC', None)] + main_module_kwargs['libraries'] = ['libhunspell'] + main_module_kwargs['include_dirs'] = ['V:/hunspell-1.3.3/src/hunspell'] + main_module_kwargs['library_dirs'] = ['V:/hunspell-1.3.3/src/win_api/x64/Release/libhunspell'] +- main_module_kwargs['compile_args'] = ['/MT'] ++ main_module_kwargs['extra_compile_args'] = ['/MT'] + elif platform.system() == "Darwin": +- main_module_kwargs['macros'] = [('_LINUX', None)] ++ main_module_kwargs['define_macros'] = [('_LINUX', None)] + main_module_kwargs['libraries'] = ['hunspell'] + main_module_kwargs['include_dirs'] = '/usr/local/Cellar/hunspell/1.6.2/include/hunspell', +- main_module_kwargs['compile_args'] = ['-Wall'] ++ main_module_kwargs['extra_compile_args'] = ['-Wall'] + else: +- main_module_kwargs['macros'] = [('_LINUX', None)] ++ main_module_kwargs['define_macros'] = [('_LINUX', None)] + main_module_kwargs['libraries'] = ['hunspell'] + main_module_kwargs['include_dirs'] = '/usr/include/hunspell', +- main_module_kwargs['compile_args'] = ['-Wall'] ++ main_module_kwargs['extra_compile_args'] = ['-Wall'] + + main = Extension('hunspell', **main_module_kwargs) + +-- +2.14.3 + diff --git a/0009-pop-version.patch b/0009-pop-version.patch new file mode 100644 index 0000000..e6c8820 --- /dev/null +++ b/0009-pop-version.patch @@ -0,0 +1,40 @@ +From 111eb63703fc8a28571178a4b24b13756cfd83cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= +Date: Fri, 2 Feb 2018 14:24:37 +0100 +Subject: [PATCH 09/12] pop version + +--- + CHANGELOG.md | 4 ++++ + setup.py | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index d03de9c..43ede67 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -1,5 +1,9 @@ + # Changelog + ++## 0.5.3 (2018-02-02) ++### Improvements ++- Use only setuptools to build package, allows integration with conda ++ + ## 0.5.2 (2018-02-01) + ### Bug fixes + - Fix installation on linux broken by 0.5.1 +diff --git a/setup.py b/setup.py +index cbdd340..656c938 100755 +--- a/setup.py ++++ b/setup.py +@@ -43,7 +43,7 @@ else: + main = Extension('hunspell', **main_module_kwargs) + + setup(name="hunspell", +- version="0.5.2", ++ version="0.5.3", + description="Module for the Hunspell spellchecker engine", + author="Benoît Latinier", + author_email="benoit@latinier.fr", +-- +2.14.3 + diff --git a/0010-Delete-the-object-on-dealloc.patch b/0010-Delete-the-object-on-dealloc.patch new file mode 100644 index 0000000..9d907c0 --- /dev/null +++ b/0010-Delete-the-object-on-dealloc.patch @@ -0,0 +1,24 @@ +From bb8321f1189e515f985be7b7d6273b91868994db Mon Sep 17 00:00:00 2001 +From: Fabien Bourrel +Date: Fri, 2 Feb 2018 23:03:36 +0100 +Subject: [PATCH 10/12] Delete the object on dealloc + +--- + hunspell.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/hunspell.cpp b/hunspell.cpp +index 995d0c1..6650641 100644 +--- a/hunspell.cpp ++++ b/hunspell.cpp +@@ -97,6 +97,7 @@ HunSpell_init(HunSpell * self, PyObject *args, PyObject *kwds) + static void + HunSpell_dealloc(HunSpell * self) + { ++ delete self->handle; + Py_TYPE(self)->tp_free((PyObject *)self); + } + +-- +2.14.3 + diff --git a/0011-Update-AUTHOR-CHANGELOG.patch b/0011-Update-AUTHOR-CHANGELOG.patch new file mode 100644 index 0000000..21241f1 --- /dev/null +++ b/0011-Update-AUTHOR-CHANGELOG.patch @@ -0,0 +1,39 @@ +From f2292415e36c3d08ce6fa64040f60678f228953b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= +Date: Sat, 3 Feb 2018 18:10:11 +0100 +Subject: [PATCH 11/12] Update AUTHOR/CHANGELOG + +--- + AUTHORS.md | 1 + + CHANGELOG.md | 4 ++++ + 2 files changed, 5 insertions(+) + +diff --git a/AUTHORS.md b/AUTHORS.md +index 4a9494a..0e2ec8c 100644 +--- a/AUTHORS.md ++++ b/AUTHORS.md +@@ -5,6 +5,7 @@ + - Benjamin Drung ([@bdrung](https://github.com/bdrung)) + - Benoît Latinier ([@blatinier](https://github.com/blatinier)) (**Owner**) + - Denes Lados ([@mimrock](https://github.com/mimrock)) ++- Fabien Bourrel ([@Far3t](https://github.com/Far3t)) + - Leif Arne Storset (([@lastorset](https://github.com/lastorset)) + - Marios Zindilis ([@marios-zindilis](https://github.com/marios-zindilis)) + - Mateusz Korniak ([@matkor](https://github.com/matkor)) +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 43ede67..357f217 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -1,5 +1,9 @@ + # Changelog + ++## 0.5.4 (???) ++### Bug fixes ++- Fix a memory leak at instanciation (issue #39 fixed by @Far3t) ++ + ## 0.5.3 (2018-02-02) + ### Improvements + - Use only setuptools to build package, allows integration with conda +-- +2.14.3 + diff --git a/0012-fix-encoding-problem-32.patch b/0012-fix-encoding-problem-32.patch new file mode 100644 index 0000000..e0788b2 --- /dev/null +++ b/0012-fix-encoding-problem-32.patch @@ -0,0 +1,105 @@ +From d83879975432cc1dda2e143a6d85bb4121c3d2ce Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= +Date: Tue, 20 Feb 2018 22:50:48 +0100 +Subject: [PATCH 12/12] fix encoding problem (#32) + +--- + .gitignore | 2 +- + CHANGELOG.md | 1 + + hunspell.cpp | 15 +++++++++++---- + setup.py | 2 +- + tests/test_hunspell.py | 4 ++++ + 5 files changed, 18 insertions(+), 6 deletions(-) + +diff --git a/.gitignore b/.gitignore +index b0ded7e..b961bfb 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -1,5 +1,5 @@ + .pyc +-venv ++venv* + __pycache__ + MANIFEST + dist +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 357f217..4a1ba5f 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -3,6 +3,7 @@ + ## 0.5.4 (???) + ### Bug fixes + - Fix a memory leak at instanciation (issue #39 fixed by @Far3t) ++- Fix an encoding problem (issue #32) + + ## 0.5.3 (2018-02-02) + ### Improvements +diff --git a/hunspell.cpp b/hunspell.cpp +index 6650641..7c5cb71 100644 +--- a/hunspell.cpp ++++ b/hunspell.cpp +@@ -152,8 +152,9 @@ static PyObject * + HunSpell_suggest(HunSpell * self, PyObject *args) + { + char *word, **slist; +- int i, num_slist, ret; ++ int i, num_slist, ret, str_size; + PyObject *slist_list, *pystr; ++ PyObject *etype, *evalue, *etrace; + + if (!PyArg_ParseTuple(args, "et", self->encoding, &word)) + return NULL; +@@ -166,9 +167,15 @@ HunSpell_suggest(HunSpell * self, PyObject *args) + PyMem_Free(word); + + for (i = 0, ret = 0; !ret && i < num_slist; i++) { +- pystr = PyUnicode_FromString(slist[i]); +- if (!pystr) +- break; ++ str_size = strlen(slist[i]); ++ pystr = PyUnicode_DecodeUTF8(slist[i], str_size, "strict"); ++ if (!pystr) { ++ PyErr_Fetch(&etype, &evalue, &etrace); ++ Py_DECREF(etype); ++ pystr = PyUnicode_DecodeLatin1(slist[i], str_size, "strict"); ++ if (!pystr) ++ break; ++ } + ret = PyList_Append(slist_list, pystr); + Py_DECREF(pystr); + } +diff --git a/setup.py b/setup.py +index 656c938..1b65ab5 100755 +--- a/setup.py ++++ b/setup.py +@@ -43,7 +43,7 @@ else: + main = Extension('hunspell', **main_module_kwargs) + + setup(name="hunspell", +- version="0.5.3", ++ version="0.5.4", + description="Module for the Hunspell spellchecker engine", + author="Benoît Latinier", + author_email="benoit@latinier.fr", +diff --git a/tests/test_hunspell.py b/tests/test_hunspell.py +index 320f8ad..cdfd08d 100644 +--- a/tests/test_hunspell.py ++++ b/tests/test_hunspell.py +@@ -1,3 +1,4 @@ ++#-*- coding: utf-8 -*- + import os + import unittest + from hunspell import HunSpell, HunSpellError +@@ -28,6 +29,9 @@ class HunSpellTest(unittest.TestCase): + self.assertEqual(self.hunspell.suggest('spookie'), + ['spookier', 'spookiness', 'spook', 'cookie', + 'bookie', 'Spokane', 'spoken']) ++ self.assertEqual(self.hunspell.suggest('Eelysa'), ++ ['Elyssa', 'Elysees', 'Elysha', 'Elysia', ++ 'Elissa', 'Elysée']) + + def test_hunspell_stem(self): + self.assertEqual(self.hunspell.stem('dog'), [b'dog']) +-- +2.14.3 + diff --git a/pyhunspell-0.4.0-hunspell15.patch b/pyhunspell-0.4.0-hunspell15.patch deleted file mode 100644 index 5b70ee1..0000000 --- a/pyhunspell-0.4.0-hunspell15.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru pyhunspell-0.4.0.orig/setup.py pyhunspell-0.4.0/setup.py ---- pyhunspell-0.4.0.orig/setup.py 2016-03-18 22:19:08.000000000 +0100 -+++ pyhunspell-0.4.0/setup.py 2016-03-21 13:31:28.308888668 +0100 -@@ -30,7 +30,7 @@ - main_module_kwargs['compile_args'] = ['/MT'] - else: - main_module_kwargs['macros'] = [('_LINUX', None)] -- main_module_kwargs['libraries'] = ['hunspell'] -+ main_module_kwargs['libraries'] = ['hunspell-1.6'] - main_module_kwargs['include_dirs'] = '/usr/include/hunspell', - main_module_kwargs['compile_args'] = ['-Wall'] - diff --git a/pyhunspell-0.5.0-hunspell15.patch b/pyhunspell-0.5.0-hunspell15.patch new file mode 100644 index 0000000..3af220a --- /dev/null +++ b/pyhunspell-0.5.0-hunspell15.patch @@ -0,0 +1,13 @@ +diff -ru pyhunspell-0.5.0.orig/setup.py pyhunspell-0.5.0/setup.py +--- pyhunspell-0.5.0.orig/setup.py 2018-03-06 09:44:51.992177310 +0100 ++++ pyhunspell-0.5.0/setup.py 2018-03-06 09:52:40.841755041 +0100 +@@ -36,7 +36,7 @@ + main_module_kwargs['extra_compile_args'] = ['-Wall'] + else: + main_module_kwargs['define_macros'] = [('_LINUX', None)] +- main_module_kwargs['libraries'] = ['hunspell'] ++ main_module_kwargs['libraries'] = ['hunspell-1.6'] + main_module_kwargs['include_dirs'] = '/usr/include/hunspell', + main_module_kwargs['extra_compile_args'] = ['-Wall'] + +pyhunspell-0.5.0 のみに存在: setup.py.~1~ diff --git a/pyhunspell.spec b/pyhunspell.spec index cbc46b9..ae3b945 100644 --- a/pyhunspell.spec +++ b/pyhunspell.spec @@ -6,7 +6,7 @@ Name: pyhunspell Version: 0.5.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python bindings for hunspell Group: Development/Languages @@ -20,7 +20,19 @@ BuildRequires: python3-devel %endif # if with_python3 # make it build with hunspell-1.5: -Patch0: pyhunspell-0.4.0-hunspell15.patch +Patch0: pyhunspell-0.5.0-hunspell15.patch +Patch1: 0001-add-information-on-readme-about-apple-fun.patch +Patch2: 0002-try-some-MacOS-fix.patch +Patch3: 0003-add-some-more-explanation-in-the-README.patch +Patch4: 0004-pop-version.patch +Patch5: 0005-ignore-dist.patch +Patch6: 0006-split-linux-macos-params.patch +Patch7: 0007-pop-version.patch +Patch8: 0008-Fix-sor-warning-and-make-the-package-wheel-compatibl.patch +Patch9: 0009-pop-version.patch +Patch10: 0010-Delete-the-object-on-dealloc.patch +Patch11: 0011-Update-AUTHOR-CHANGELOG.patch +Patch12: 0012-fix-encoding-problem-32.patch %global _description\ These are python bindings for hunspell, that allow to use the hunspell library\ @@ -44,6 +56,10 @@ Summary: Python3 bindings for hunspell allowing to use the hunspell libra Group: Development/Languages License: LGPLv3+ Requires: %{name} = %{version}-%{release} +# Remove before F30 +Provides: pyhunspell = %{version}-%{release} +Provides: pyhunspell%{?_isa} = %{version}-%{release} +Obsoletes: pyhunspell < %{version}-%{release} %description python3 This package contains a Python3 module to use the hunspell library @@ -53,6 +69,18 @@ from Python3. %prep %setup -q -n pyhunspell-%{version} +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 %patch0 -p1 -b .hunspell13 %if 0%{?with_python3} @@ -86,10 +114,18 @@ popd %if 0%{?with_python3} %files python3 +%doc AUTHORS.md CHANGELOG.md COPYING COPYING.LESSER gpl-3.0.txt lgpl-3.0.txt PKG-INFO README.md %{python3_sitearch}/* %endif # with_python3 %changelog +* Tue Mar 06 2018 Mike FABIAN - 0.5.0-4 +- Apply fix for encoding problem from upstream. + (See: https://github.com/blatinier/pyhunspell/issues/32) +- Provide “pyhunspell” also from the pyhunspell-python3 package, otherwise + one cannot install pyhunspell-python3 because there is no “pyhunspell” package + anymore. + * Fri Feb 09 2018 Fedora Release Engineering - 0.5.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild