%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.5.0 Release: 4%{?dist} Summary: Python bindings for hunspell Group: Development/Languages License: LGPLv3+ 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.5: 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\ in python. %description %_description %package -n python2-pyhunspell Summary: %summary %{?python_provide:%python_provide python2-pyhunspell} # Remove before F30 Provides: pyhunspell = %{version}-%{release} Provides: pyhunspell%{?_isa} = %{version}-%{release} Obsoletes: pyhunspell < %{version}-%{release} %description -n python2-pyhunspell %_description %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} # 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 from Python3. %endif # with_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} 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 -n python2-pyhunspell %doc AUTHORS.md CHANGELOG.md COPYING COPYING.LESSER gpl-3.0.txt lgpl-3.0.txt PKG-INFO README.md %{python_sitearch}/hunspell.so %{python_sitearch}/hunspell-*.egg-info %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 * Mon Dec 04 2017 Caolán McNamara - 0.5.0-2 - rebuild for hunspell 1.6.2 * Fri Sep 01 2017 Mike FABIAN - 0.5.0-1 - update to 0.5.0 * Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek - 0.4.1-10 - Add Provides for the old name without %%_isa * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.4.1-9 - Python 2 binary package renamed to python2-pyhunspell See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 * Thu Aug 03 2017 Fedora Release Engineering - 0.4.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 0.4.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.4.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 0.4.1-5 - Rebuild for Python 3.6 * Tue Dec 13 2016 Igor Gnatenko - 0.4.1-4 - Rebuild for hunspell 1.5.x * Tue Jul 19 2016 Fedora Release Engineering - 0.4.1-3 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Mon Apr 18 2016 Caolán McNamara - 0.4.1-2 - rebuild for hunspell 1.4.0 * Mon Apr 04 2016 Mike FABIAN - 0.4.1-1 - update to 0.4.1 * Mon Mar 21 2016 Mike FABIAN - 0.4.0-1 - update to 0.4.0 * Thu Feb 04 2016 Fedora Release Engineering - 0.3.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * 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 * Sun Aug 17 2014 Fedora Release Engineering - 0.1-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.1-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 0.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 0.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Fri Jan 11 2013 Mike FABIAN - 0.1-9 - Resolves: #800116 - Bugs found in pyhunspell-0.1-6.fc17 using gcc-with-cpychecker static analyzer * Wed Jan 09 2013 Till Maas - 0.1-8 - python site_arch macro is not needed now, remove it - remove buildroot tag - Add comment/bz reference for patch - removal of buildroot in %%install - remove %%clean section - remove defattr(-,root,root,-) - Add PKG-INFO to %%doc - BuildRequires should be python2-devel and not just python-devel * Sat Jul 21 2012 Fedora Release Engineering - 0.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Sat Jan 14 2012 Fedora Release Engineering - 0.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed May 25 2011 Caolán McNamara - 0.1-5 - rebuild for new hunspell * Tue Feb 08 2011 Fedora Release Engineering - 0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Jul 21 2010 David Malcolm - 0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Tue Aug 25 2009 Till Maas - 0.1-2 - Remove CFLAGS, whiche are used automagically - Change the %%description to a full sentence - Adjust the license tag, it's actually LGPLv3+ * Wed Jul 29 2009 Till Maas - 0.1-1 - Initial spec for Fedora