diff --git a/.gitignore b/.gitignore index 4ddbce6..bc5b042 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ hunspell-0.1.tar.gz +/pyhunspell-0.3.3.tar.gz diff --git a/pyhunspell-0.1-hunspell13.patch b/pyhunspell-0.1-hunspell13.patch deleted file mode 100644 index 5cad488..0000000 --- a/pyhunspell-0.1-hunspell13.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u hunspell-0.1/setup.py hunspell-0.1/setup.py ---- hunspell-0.1/setup.py 2011-05-25 11:30:47.576913210 +0100 -+++ hunspell-0.1/setup.py 2011-05-25 11:30:56.607025572 +0100 -@@ -3,7 +3,7 @@ - - main = Extension( 'hunspell', - define_macros = [('_LINUX',None)], -- libraries = ['hunspell-1.2'], -+ libraries = ['hunspell-1.3'], - include_dirs = ['/usr/include/hunspell'], - sources = ['hunspell.c'], - extra_compile_args = ['-Wall']) diff --git a/pyhunspell-0.3.3-hunspell13.patch b/pyhunspell-0.3.3-hunspell13.patch new file mode 100644 index 0000000..fea430e --- /dev/null +++ b/pyhunspell-0.3.3-hunspell13.patch @@ -0,0 +1,13 @@ +diff -ru pyhunspell-0.3.3.orig/setup.py pyhunspell-0.3.3/setup.py +--- pyhunspell-0.3.3.orig/setup.py 2015-12-22 08:33:33.241258987 +0100 ++++ pyhunspell-0.3.3/setup.py 2015-12-22 08:35:12.257087169 +0100 +@@ -22,7 +22,7 @@ + + main = Extension('hunspell', + define_macros=[('_LINUX', None)], +- libraries=['hunspell'], ++ libraries=['hunspell-1.3'], + include_dirs=['/usr/include/hunspell'], + sources=['hunspell.c'], + extra_compile_args=['-Wall']) +pyhunspell-0.3.3 のみに存在: setup.py.~1~ diff --git a/pyhunspell.spec b/pyhunspell.spec index 28d6ad2..d0e0a04 100644 --- a/pyhunspell.spec +++ b/pyhunspell.spec @@ -1,48 +1,90 @@ +%if 0%{?fedora} +%global with_python3 1 +%else +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} +%endif + Name: pyhunspell -Version: 0.1 -Release: 14%{?dist} +Version: 0.3.3 +Release: 1%{?dist} Summary: Python bindings for hunspell Group: Development/Languages License: LGPLv3+ -URL: http://code.google.com/p/pyhunspell/ -Source0: http://pyhunspell.googlecode.com/files/hunspell-%{version}.tar.gz +URL: https://github.com/blatinier/pyhunspell +Source0: https://github.com/blatinier/pyhunspell/archive/pyhunspell-%{version}.tar.gz BuildRequires: python2-devel hunspell-devel +%if 0%{?with_python3} +BuildRequires: python3-devel +%endif # if with_python3 + # make it build with hunspell-1.3: -Patch0: pyhunspell-0.1-hunspell13.patch -# see: -# https://bugzilla.redhat.com/show_bug.cgi?id=800116 -# http://code.google.com/p/pyhunspell/issues/detail?id=4 -# patch from Eugene Sizikov: -# http://code.google.com/p/pyhunspell/issues/detail?id=4#c1 -Patch1: pyhunspell-0.1-rhbz800116.patch +Patch0: pyhunspell-0.3.3-hunspell13.patch %description These are python bindings for hunspell, that allow to use the hunspell library in python. +%if 0%{?with_python3} +%package python3 +Summary: Python3 bindings for hunspell allowing to use the hunspell library in Python3 +Group: Development/Languages +License: LGPLv3+ +Requires: %{name} = %{version}-%{release} + +%description python3 +This package contains a Python3 module to use the hunspell library +from Python3. + +%endif # with_python3 %prep -%setup -q -n hunspell-%{version} +%setup -q -n pyhunspell-%{version} %patch0 -p1 -b .hunspell13 -%patch1 -p0 -b .rhbz800116 + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif # with_python3 %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build +%if 0%{?with_python3} +pushd %{py3dir} +CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build +popd +%endif # with_python3 + %install %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +popd +%endif # with_python3 %files -%doc PKG-INFO +%doc PKG-INFO README COPYING COPYING.LESSER %{python_sitearch}/hunspell.so %{python_sitearch}/hunspell-*.egg-info +%if 0%{?with_python3} +%files python3 +%{python3_sitearch}/* +%endif # with_python3 %changelog +* Tue Dec 22 2015 Mike FABIAN - 0.3.3-1 +- update to 0.3.3 +- remove patch for the leaks found with the gcc-with-cpychecker + static analyzer, it is included upstream +- add a python3 sub-package +- Resolves: rhbz#800116 + * Thu Jun 18 2015 Fedora Release Engineering - 0.1-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 9b1721a..adda13c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -14b80b3533ebfe5437e2c24999ce4fac hunspell-0.1.tar.gz +08fa04a3d8a462aca9c02efa01a04125 pyhunspell-0.3.3.tar.gz