Blob Blame History Raw
%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:        1%{?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.4.0-hunspell15.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 pyhunspell-%{version}
%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
%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
%{python3_sitearch}/*
%endif # with_python3

%changelog
* Fri Sep 01 2017 Mike FABIAN <mfabian@redhat.com> - 0.5.0-1
- update to 0.5.0

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.4.1-5
- Rebuild for Python 3.6

* Tue Dec 13 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.4.1-4
- Rebuild for hunspell 1.5.x

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Mon Apr 18 2016 Caolán McNamara <caolanm@redhat.com> - 0.4.1-2
- rebuild for hunspell 1.4.0

* Mon Apr 04 2016 Mike FABIAN <mfabian@redhat.com> - 0.4.1-1
- update to 0.4.1

* Mon Mar 21 2016 Mike FABIAN <mfabian@redhat.com> - 0.4.0-1
- update to 0.4.0

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Dec 22 2015 Mike FABIAN <mfabian@redhat.com> - 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 <rel-eng@lists.fedoraproject.org> - 0.1-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Fri Jan 11 2013 Mike FABIAN <mfabian@redhat.com> - 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 <opensource@till.name> - 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 <rel-eng@lists.fedoraproject.org> - 0.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed May 25 2011 Caolán McNamara <caolanm@redhat.com> - 0.1-5
- rebuild for new hunspell

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Tue Aug 25 2009 Till Maas <opensource@till.name> - 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 <opensource@till.name> - 0.1-1
- Initial spec for Fedora