76 lines
2 KiB
RPMSpec
76 lines
2 KiB
RPMSpec
%global srcname enchant
|
|
|
|
Name: python-enchant
|
|
Version: 3.2.2
|
|
Release: %autorelease
|
|
Summary: Python bindings for Enchant spellchecking library
|
|
|
|
License: LGPL-2.1-or-later
|
|
URL: https://pyenchant.github.io/pyenchant/
|
|
Source: %{pypi_source pyenchant}
|
|
|
|
BuildArch: noarch
|
|
BuildRequires: enchant2
|
|
|
|
%description
|
|
PyEnchant is a spellchecking library for Python, based on the Enchant
|
|
library by Dom Lachowicz.
|
|
|
|
|
|
%package -n python3-%{srcname}
|
|
Summary: Python 3 bindings for Enchant spellchecking library
|
|
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-setuptools
|
|
|
|
Requires: enchant2
|
|
|
|
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
|
%description -n python3-%{srcname}
|
|
PyEnchant is a spellchecking library for Python 3, based on the Enchant
|
|
library by Dom Lachowicz.
|
|
|
|
%prep
|
|
%setup -q -n py%{srcname}-%{version}
|
|
# Remove bundled egg-info
|
|
rm -rf py%{srcname}.egg-info
|
|
|
|
find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
|
|
|
%build
|
|
%py3_build
|
|
|
|
%install
|
|
%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
|
|
|
|
|
|
# Tests are not included in the upstream tarball
|
|
%check
|
|
%py3_check_import %{srcname} %{srcname}.checker %{srcname}.tokenize
|
|
|
|
|
|
%files -n python3-%{srcname}
|
|
%doc README.rst
|
|
%license LICENSE.txt
|
|
%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
|
|
|
|
|
|
%changelog
|
|
%autochangelog
|