python-enchant/python-enchant.spec

94 lines
2.6 KiB
RPMSpec
Raw Normal View History

2022-04-29 11:22:23 +08:00
%global srcname enchant
2019-12-17 11:27:40 +08:00
Name: python-enchant
2022-04-29 11:22:23 +08:00
Version: 3.2.2
2024-01-26 10:29:06 +08:00
Release: 2
2019-12-17 11:27:40 +08:00
Summary: Cygwin python-enchant packaging
License: LGPLv2+
2024-01-26 10:29:06 +08:00
URL: https://pyenchant.github.io/pyenchant/
2019-12-17 11:27:40 +08:00
Source0: https://files.pythonhosted.org/packages/source/p/pyenchant/pyenchant-%{version}.tar.gz
BuildArch: noarch
2024-01-26 10:29:06 +08:00
BuildRequires: enchant2-devel
2022-04-29 11:22:23 +08:00
BuildRequires: python3-devel python3-setuptools
2019-12-17 11:27:40 +08:00
%description
Cygwin python-enchant packaging.
2022-04-29 11:22:23 +08:00
%package -n python3-%{srcname}
2019-12-17 11:27:40 +08:00
Summary: Cygwin python3-enchant packaging
2024-01-26 10:29:06 +08:00
Requires: enchant2
2019-12-17 11:27:40 +08:00
%{?python_provide:%python_provide python3-enchant}
2022-04-29 11:22:23 +08:00
%description -n python3-%{srcname}
2019-12-17 11:27:40 +08:00
Cygwin python3-enchant packaging.
%package_help
%prep
2022-04-29 11:22:23 +08:00
%autosetup -n py%{srcname}-%{version} -p1
2019-12-17 11:27:40 +08:00
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' | \
2022-04-29 11:22:23 +08:00
xargs sed -i '1s|^#!python|#!%{__python3}|'
2019-12-17 11:27:40 +08:00
%build
pushd %{_builddir}/python3-%{name}-%{version}-%{release}
CFLAGS="$RPM_OPT_FLAGS" %py3_build
popd
%install
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
2022-04-29 11:22:23 +08:00
# Tests are not included in the upstream tarball
##%check
2019-12-17 11:27:40 +08:00
2022-04-29 11:22:23 +08:00
%files -n python3-%{srcname}
2019-12-17 11:27:40 +08:00
%defattr(-,root,root)
%license LICENSE.txt
2022-04-29 11:22:23 +08:00
%dir %{python3_sitelib}/%{srcname}
%dir %{python3_sitelib}/%{srcname}/__pycache__
%dir %{python3_sitelib}/%{srcname}/checker
%dir %{python3_sitelib}/%{srcname}/checker/__pycache__
%dir %{python3_sitelib}/%{srcname}/tokenize
%dir %{python3_sitelib}/%{srcname}/tokenize/__pycache__
%{python3_sitelib}/%{srcname}/*.py
%{python3_sitelib}/%{srcname}/__pycache__/*.py[co]
%{python3_sitelib}/%{srcname}/checker/*.py
%{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
2019-12-17 11:27:40 +08:00
%files help
%defattr(-,root,root)
2022-04-29 11:22:23 +08:00
%doc README.rst
2019-12-17 11:27:40 +08:00
%changelog
2024-01-26 10:29:06 +08:00
* Fri Jan 26 2024 yaoxin <yao_xin001@hoperun.com> - 3.2.2-2
- Update enchant to enchant2
2022-04-29 11:22:23 +08:00
* Fri Apr 29 2022 yaoxin <yaoxin30@h-partners.com> - 3.2.2-1
- Upgrade to 3.2.2
2021-12-18 16:31:15 +08:00
* Sat Dec 18 2021 shixuantong <shixuantong@huawei.com> - 2.0.0-9
- fix build fail
2020-10-30 10:33:09 +08:00
* Thu Oct 22 2020 huanghaitao <huanghaitao8@huawei.com> - 2.0.0-8
- Disable python2 module
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