2019-12-17 11:27:40 +08:00
|
|
|
Name: python-enchant
|
|
|
|
|
Version: 2.0.0
|
2020-06-24 15:46:16 +08:00
|
|
|
Release: 7
|
2019-12-17 11:27:40 +08:00
|
|
|
Summary: Cygwin python-enchant packaging
|
|
|
|
|
License: LGPLv2+
|
|
|
|
|
URL: https://github.com/cygwinports/python-enchant
|
|
|
|
|
Source0: https://files.pythonhosted.org/packages/source/p/pyenchant/pyenchant-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
BuildRequires: enchant-devel python2-devel python2-setuptools python2-nose
|
|
|
|
|
BuildRequires: python3-devel python3-setuptools python3-nose
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Cygwin python-enchant packaging.
|
|
|
|
|
|
|
|
|
|
%package -n python2-enchant
|
|
|
|
|
Summary: python2 package for enchant
|
|
|
|
|
Requires: enchant >= 1.5.0
|
|
|
|
|
Provides: PyEnchant
|
|
|
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
|
|
|
|
|
|
|
%description -n python2-enchant
|
|
|
|
|
python2 package for enchant
|
|
|
|
|
|
|
|
|
|
%package -n python3-enchant
|
|
|
|
|
Summary: Cygwin python3-enchant packaging
|
|
|
|
|
Requires: enchant >= 1.5.0
|
|
|
|
|
%{?python_provide:%python_provide python3-enchant}
|
|
|
|
|
|
|
|
|
|
%description -n python3-enchant
|
|
|
|
|
Cygwin python3-enchant packaging.
|
|
|
|
|
|
|
|
|
|
%package_help
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n pyenchant-%{version} -p1
|
|
|
|
|
|
|
|
|
|
rm -rf pyenchant.egg-info
|
|
|
|
|
rm -rf %{_builddir}/python3-%{name}-%{version}-%{release}
|
|
|
|
|
cp -a . %{_builddir}/python3-%{name}-%{version}-%{release}
|
|
|
|
|
find %{_builddir}/python3-%{name}-%{version}-%{release} -name '*.py' | \
|
|
|
|
|
xargs sed -i '1s|^#!python|#!%{_bindir}/python3|'
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" %py2_build
|
|
|
|
|
|
|
|
|
|
pushd %{_builddir}/python3-%{name}-%{version}-%{release}
|
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" %py3_build
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
|
|
|
|
%py2_install \
|
|
|
|
|
--single-version-externally-managed
|
|
|
|
|
|
|
|
|
|
rm -rf %{buildroot}/%{python2_sitelib}/%{srcname}/lib
|
|
|
|
|
rm -rf %{buildroot}/%{python2_sitelib}/%{srcname}/share
|
|
|
|
|
|
|
|
|
|
pushd %{_builddir}/python3-%{name}-%{version}-%{release}
|
|
|
|
|
%py3_install \
|
|
|
|
|
--single-version-externally-managed
|
2020-06-24 15:46:16 +08:00
|
|
|
rm -rf %{buildroot}/%{python3_sitelib}/%{srcname}/lib
|
|
|
|
|
rm -rf %{buildroot}/%{python3_sitelib}/%{srcname}/share
|
2019-12-17 11:27:40 +08:00
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd %{buildroot}/%{python2_sitelib}
|
|
|
|
|
LANG=en_US.UTF-8 /usr/bin/nosetests-2.*
|
|
|
|
|
popd
|
|
|
|
|
|
2020-06-24 15:46:16 +08:00
|
|
|
pushd %{buildroot}/%{python3_sitelib}
|
2019-12-17 11:27:40 +08:00
|
|
|
LANG=en_US.UTF-8 /usr/bin/nosetests-3.*
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files -n python2-enchant
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%dir %{python2_sitelib}/enchant
|
|
|
|
|
%{python2_sitelib}/enchant
|
|
|
|
|
%{python2_sitelib}/pyenchant-%{version}-py?.?.egg-info
|
|
|
|
|
|
|
|
|
|
%files -n python3-enchant
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%dir %{python3_sitelib}/enchant
|
|
|
|
|
%{python3_sitelib}/enchant
|
|
|
|
|
%{python3_sitelib}/pyenchant-%{version}-py?.?.egg-info
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc README.txt TODO.txt
|
|
|
|
|
|
|
|
|
|
%changelog
|
2020-06-24 15:46:16 +08:00
|
|
|
* Wed Jun 24 2020 zhanghua <zhanghua40@huawei.com> - 2.0.0-7
|
|
|
|
|
- Fix python3.8 complied error
|
|
|
|
|
|
2019-12-17 11:27:40 +08:00
|
|
|
* Fri Dec 13 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.0.0-6
|
|
|
|
|
- Package init
|
|
|
|
|
|