Compare commits

...

No commits in common. "c8s" and "c9" have entirely different histories.
c8s ... c9

3 changed files with 66 additions and 79 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/pyenchant-2.0.0.tar.gz
SOURCES/pyenchant-3.2.0.tar.gz

View File

@ -1 +1 @@
92ca797bbef9660271c3a9269ff7eb841272044d SOURCES/pyenchant-2.0.0.tar.gz
d2a88525257d43c5c0e512fc4f5b7871459b42c9 SOURCES/pyenchant-3.2.0.tar.gz

View File

@ -3,16 +3,9 @@
%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: 2.0.0
Release: 3%{?dist}
Version: 3.2.0
Release: 5%{?dist}
Summary: Python bindings for Enchant spellchecking library
License: LGPLv2+
@ -26,33 +19,12 @@ 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}
@ -67,64 +39,25 @@ library by Dom Lachowicz.
# Remove bundled egg-info
rm -rf py%{srcname}.egg-info
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%build
%if %{with python2}
CFLAGS="$RPM_OPT_FLAGS" %py2_build
%endif # with python2
pushd %{py3dir}
CFLAGS="$RPM_OPT_FLAGS" %py3_build
popd
%py3_build
%install
pushd %{py3dir}
%py3_install \
--single-version-externally-managed
%py3_install
# Directories used in windows build
rm -rf $RPM_BUILD_ROOT/%{python3_sitelib}/%{srcname}/lib
rm -rf $RPM_BUILD_ROOT/%{python3_sitelib}/%{srcname}/share
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
# Tests are not included in the upstream tarball
#%%check
%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.txt TODO.txt
%doc README.rst
%license LICENSE.txt
%dir %{python3_sitelib}/%{srcname}
%dir %{python3_sitelib}/%{srcname}/__pycache__
@ -138,10 +71,64 @@ popd
%{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?.?.egg-info
%{python3_sitelib}/py%{srcname}-%{version}-py%{python3_version}.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
* Thu Mar 15 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.0.0-3
- Conditionalize the python2 subpackage