[packages/python-pyenchant] - new URLs, updated to 2.0.0 - removed outdated ez_setup patch - added python3 package
qboosh
qboosh at pld-linux.org
Wed Jan 1 17:22:27 CET 2020
commit dde642e5d48985084e20bac81b11de72535e8faf
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Jan 1 17:22:20 2020 +0100
- new URLs, updated to 2.0.0
- removed outdated ez_setup patch
- added python3 package
python-pyenchant-ez_setup.patch | 14 ------
python-pyenchant.spec | 104 +++++++++++++++++++++++++++++-----------
2 files changed, 75 insertions(+), 43 deletions(-)
---
diff --git a/python-pyenchant.spec b/python-pyenchant.spec
index efb1116..e73d7ab 100644
--- a/python-pyenchant.spec
+++ b/python-pyenchant.spec
@@ -1,22 +1,34 @@
-%define pname pyenchant
-Summary: Spellchecking library for Python
-Summary(pl.UTF-8): Biblioteka Pythona sprawdzająca pisownię
-Name: python-%{pname}
-Version: 1.5.3
-Release: 3
+#
+# Conditional build:
+%bcond_with tests # unit tests (require en_US dictionary)
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+Summary: Spellchecking library for Python 2
+Summary(pl.UTF-8): Biblioteka Pythona 2 sprawdzająca pisownię
+Name: python-pyenchant
+Version: 2.0.0
+Release: 1
License: LGPL v2.1+
-Group: Libraries
-Source0: http://downloads.sourceforge.net/pyenchant/%{pname}-%{version}.tar.gz
-# Source0-md5: d327fb9c8620ecc261a424083dc9aa95
-Patch0: %{name}-ez_setup.patch
-URL: http://pyenchant.sourceforge.net/
-BuildRequires: rpmbuild(macros) >= 1.710
-BuildRequires: enchant-devel >= 1.3.0
-BuildRequires: python-devel
-BuildRequires: python-setuptools >= 0.6-0.c3
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/pyenchant/
+Source0: https://files.pythonhosted.org/packages/source/p/pyenchant/pyenchant-%{version}.tar.gz
+# Source0-md5: c224ea53e119b04116d5301e5027051c
+URL: https://pypi.org/project/pyenchant/
+%if %{with python2}
+BuildRequires: python-devel >= 1:2.5
+BuildRequires: python-setuptools >= 1:7
+%endif
+%if %{with python3}
+BuildRequires: python3-2to3 >= 1:3.2
+BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-setuptools >= 1:7
+%endif
BuildRequires: rpm-pythonprov
-%pyrequires_eq python-libs
-Requires: enchant >= 1.3.0
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires: enchant >= 1.6.0
+Requires: python-libs >= 1:2.5
+BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -28,32 +40,66 @@ PyEnchant to zbiór dowiązań języka i klas obudowujących
udostępniających świetną bibliotekę sprawdzania pisowni Enchant jako
moduł Pythona.
+%package -n python3-pyenchant
+Summary: Spellchecking library for Python 3
+Summary(pl.UTF-8): Biblioteka Pythona 3 sprawdzająca pisownię
+Group: Libraries/Python
+Requires: enchant >= 1.6.0
+Requires: python3-libs >= 1:3.2
+
+%description -n python3-pyenchant
+PyEnchant is a set of language bindings and some wrapper classes to
+make the excellent Enchant spellchecker available as a Python module.
+
+%description -n python3-pyenchant -l pl.UTF-8
+PyEnchant to zbiór dowiązań języka i klas obudowujących
+udostępniających świetną bibliotekę sprawdzania pisowni Enchant jako
+moduł Pythona.
+
%prep
-%setup -q -n %{pname}-%{version}
-%patch0 -p1
+%setup -q -n pyenchant-%{version}
%build
-%py_build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
%install
rm -rf $RPM_BUILD_ROOT
-%py_install \
- --root $RPM_BUILD_ROOT \
- --single-version-externally-managed
+%if %{with python2}
+%py_install
%py_postclean
+%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/enchant/tests.py*
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/enchant/tests.py
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/enchant/__pycache__/tests.*.py*
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%files
%defattr(644,root,root,755)
%doc README.txt TODO.txt
-%dir %{py_sitescriptdir}/enchant
-%{py_sitescriptdir}/enchant/*.py[co]
-%dir %{py_sitescriptdir}/enchant/checker
-%{py_sitescriptdir}/enchant/checker/*.py[co]
-%dir %{py_sitescriptdir}/enchant/tokenize
-%{py_sitescriptdir}/enchant/tokenize/*.py[co]
+%{py_sitescriptdir}/enchant
%{py_sitescriptdir}/pyenchant-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-pyenchant
+%defattr(644,root,root,755)
+%doc README.txt TODO.txt
+%{py3_sitescriptdir}/enchant
+%{py3_sitescriptdir}/pyenchant-%{version}-py*.egg-info
+%endif
diff --git a/python-pyenchant-ez_setup.patch b/python-pyenchant-ez_setup.patch
deleted file mode 100644
index bb92e51..0000000
--- a/python-pyenchant-ez_setup.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -burNp pyenchant-1.5.1/setup.py pyenchant-1.5.1-dud/setup.py
---- pyenchant-1.5.1/setup.py 2009-01-08 01:09:54.000000000 +0100
-+++ pyenchant-1.5.1-dud/setup.py 2009-02-24 10:15:40.059815393 +0100
-@@ -5,8 +5,8 @@
- # This script is placed in the public domain.
- #
-
--import ez_setup
--ez_setup.use_setuptools()
-+#import ez_setup
-+#ez_setup.use_setuptools()
-
- from setuptools import setup, find_packages, Extension
-
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pyenchant.git/commitdiff/dde642e5d48985084e20bac81b11de72535e8faf
More information about the pld-cvs-commit
mailing list