|
|
|
@ -3,9 +3,16 @@
|
|
|
|
|
%global enchant_dep enchant >= 1.5.0
|
|
|
|
|
%global srcname enchant
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} > 7
|
|
|
|
|
# Disable python2 build by default
|
|
|
|
|
%bcond_with python2
|
|
|
|
|
%else
|
|
|
|
|
%bcond_without python2
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: python-enchant
|
|
|
|
|
Version: 3.2.0
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Version: 2.0.0
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Summary: Python bindings for Enchant spellchecking library
|
|
|
|
|
|
|
|
|
|
License: LGPLv2+
|
|
|
|
@ -19,12 +26,33 @@ BuildRequires: enchant-devel
|
|
|
|
|
PyEnchant is a spellchecking library for Python, based on the Enchant
|
|
|
|
|
library by Dom Lachowicz.
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%package -n python2-%{srcname}
|
|
|
|
|
Summary: Python 2 bindings for Enchant spellchecking library
|
|
|
|
|
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
# For running tests
|
|
|
|
|
BuildRequires: python2-nose
|
|
|
|
|
|
|
|
|
|
Requires: %{enchant_dep}
|
|
|
|
|
|
|
|
|
|
Provides: PyEnchant
|
|
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
|
|
|
|
|
|
|
%description -n python2-%{srcname}
|
|
|
|
|
PyEnchant is a spellchecking library for Python 2, based on the Enchant
|
|
|
|
|
library by Dom Lachowicz.
|
|
|
|
|
%endif # with python2
|
|
|
|
|
|
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
|
Summary: Python 3 bindings for Enchant spellchecking library
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
# For running tests
|
|
|
|
|
BuildRequires: python3-nose
|
|
|
|
|
|
|
|
|
|
Requires: %{enchant_dep}
|
|
|
|
|
|
|
|
|
@ -39,25 +67,64 @@ library by Dom Lachowicz.
|
|
|
|
|
# Remove bundled egg-info
|
|
|
|
|
rm -rf py%{srcname}.egg-info
|
|
|
|
|
|
|
|
|
|
find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
|
|
|
|
rm -rf %{py3dir}
|
|
|
|
|
cp -a . %{py3dir}
|
|
|
|
|
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%py3_build
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" %py2_build
|
|
|
|
|
%endif # with python2
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%py3_install
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" %py3_build
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%py3_install \
|
|
|
|
|
--single-version-externally-managed
|
|
|
|
|
# Directories used in windows build
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{python3_sitelib}/%{srcname}/lib
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{python3_sitelib}/%{srcname}/share
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Tests are not included in the upstream tarball
|
|
|
|
|
#%%check
|
|
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%py2_install \
|
|
|
|
|
--single-version-externally-managed
|
|
|
|
|
# Directories used in windows build
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{python2_sitelib}/%{srcname}/lib
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{python2_sitelib}/%{srcname}/share
|
|
|
|
|
%endif # with python2
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
pushd $RPM_BUILD_ROOT/%{python2_sitelib}
|
|
|
|
|
# There is no dictionary for language C, need to use en_US
|
|
|
|
|
LANG=en_US.UTF-8 /usr/bin/nosetests-2.*
|
|
|
|
|
popd
|
|
|
|
|
%endif # with python2
|
|
|
|
|
|
|
|
|
|
pushd $RPM_BUILD_ROOT/%{python3_sitelib}
|
|
|
|
|
# There is no dictionary for language C, need to use en_US
|
|
|
|
|
LANG=en_US.UTF-8 /usr/bin/nosetests-3.*
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%files -n python2-%{srcname}
|
|
|
|
|
%doc README.txt TODO.txt
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%dir %{python2_sitelib}/%{srcname}
|
|
|
|
|
%dir %{python2_sitelib}/%{srcname}/checker
|
|
|
|
|
%dir %{python2_sitelib}/%{srcname}/tokenize
|
|
|
|
|
%{python2_sitelib}/%{srcname}/*.py
|
|
|
|
|
%{python2_sitelib}/%{srcname}/*.py[co]
|
|
|
|
|
%{python2_sitelib}/%{srcname}/*/*.py
|
|
|
|
|
%{python2_sitelib}/%{srcname}/*/*.py[co]
|
|
|
|
|
%{python2_sitelib}/py%{srcname}-%{version}-py?.?.egg-info
|
|
|
|
|
%endif # with python2
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{srcname}
|
|
|
|
|
%doc README.rst
|
|
|
|
|
%doc README.txt TODO.txt
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%dir %{python3_sitelib}/%{srcname}
|
|
|
|
|
%dir %{python3_sitelib}/%{srcname}/__pycache__
|
|
|
|
@ -71,63 +138,12 @@ rm -rf $RPM_BUILD_ROOT/%{python3_sitelib}/%{srcname}/share
|
|
|
|
|
%{python3_sitelib}/%{srcname}/checker/__pycache__/*.py[co]
|
|
|
|
|
%{python3_sitelib}/%{srcname}/tokenize/*.py
|
|
|
|
|
%{python3_sitelib}/%{srcname}/tokenize/__pycache__/*.py[co]
|
|
|
|
|
%{python3_sitelib}/py%{srcname}-%{version}-py%{python3_version}.egg-info
|
|
|
|
|
%{python3_sitelib}/py%{srcname}-%{version}-py?.?.egg-info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.2.0-5
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.2.0-4
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jan 20 2021 Charalampos Stratakis <cstratak@redhat.com> - 3.2.0-2
|
|
|
|
|
- Drop dependency on python-nose as tests are not included
|
|
|
|
|
|
|
|
|
|
* Wed Dec 09 2020 Charalampos Stratakis <cstratak@redhat.com> - 3.2.0-1
|
|
|
|
|
- Update to 3.2.0 (rhbz#1905482)
|
|
|
|
|
|
|
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.1-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 01 2020 Charalampos Stratakis <cstratak@redhat.com> - 3.1.1-1
|
|
|
|
|
- Update to version 3.1.1 (rhbz#1837989)
|
|
|
|
|
|
|
|
|
|
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.1-2
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Wed Mar 18 2020 Charalampos Stratakis <cstratak@redhat.com> - 3.0.1-1
|
|
|
|
|
- Update to version 3.0.1 (rhbz#1794914)
|
|
|
|
|
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-11
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Sep 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.0.0-10
|
|
|
|
|
- Subpackage python2-enchant has been removed
|
|
|
|
|
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
|
|
|
|
|
|
|
|
|
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 2.0.0-9
|
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.0.0-6
|
|
|
|
|
- Drop explicit locale setting for python3, use C.UTF-8 for python2
|
|
|
|
|
See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
|
|
|
|
|
|
|
|
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jun 17 2018 Miro Hrončok <mhroncok@redhat.com> - 2.0.0-4
|
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
* Wed Jul 26 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 2.0.0-3
|
|
|
|
|
- Rebuilt for MSVSphere 8.8
|
|
|
|
|
|
|
|
|
|
* Thu Mar 15 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.0.0-3
|
|
|
|
|
- Conditionalize the python2 subpackage
|
|
|
|
|