Update to 1.6.6

- Enable python3 tests in the check section
This commit is contained in:
Radek Novacek 2015-01-26 08:08:18 +01:00
parent 79c89e3caf
commit 048cb7ce7b
4 changed files with 13 additions and 55 deletions

View File

@ -1,14 +0,0 @@
diff -up pyenchant-1.6.5/setup.py.disable-distribute-setup pyenchant-1.6.5/setup.py
--- pyenchant-1.6.5/setup.py.disable-distribute-setup 2013-08-06 09:08:02.620478114 +0200
+++ pyenchant-1.6.5/setup.py 2013-08-06 09:08:13.130744158 +0200
@@ -6,8 +6,8 @@
#
-import distribute_setup
-distribute_setup.use_setuptools()
+#import distribute_setup
+#distribute_setup.use_setuptools()
from setuptools import setup, find_packages, Extension
from distutils.archive_util import make_archive

View File

@ -1,13 +0,0 @@
diff -up pyenchant-1.6.5/enchant/tests.py.fix-docstring-test pyenchant-1.6.5/enchant/tests.py
--- pyenchant-1.6.5/enchant/tests.py.fix-docstring-test 2012-11-01 09:39:36.268616326 +0100
+++ pyenchant-1.6.5/enchant/tests.py 2012-11-01 09:40:54.037488976 +0100
@@ -414,7 +414,8 @@ class TestDocStrings(unittest.TestCase):
"dictwithpwl","skippable","dicts","dict's","filenames",
"trie","api","ctypes","wxspellcheckerdialog","stateful",
"cmdlinechecker","spellchecks","callback","clunkier","iterator",
- "ispell","cor","backends"]
+ "ispell","cor","backends", "incant", "runtime", "subclasses",
+ "initialise"]
def test_docstrings(self):
"""Test that all our docstrings are error-free."""

View File

@ -1,17 +0,0 @@
diff -up pyenchant-1.6.5/enchant/tests.py.fix-tests-without-X pyenchant-1.6.5/enchant/tests.py
--- pyenchant-1.6.5/enchant/tests.py.fix-tests-without-X 2012-11-01 08:54:43.261512454 +0100
+++ pyenchant-1.6.5/enchant/tests.py 2012-11-01 09:01:12.184938020 +0100
@@ -427,11 +427,11 @@ class TestDocStrings(unittest.TestCase):
import enchant.checker.CmdLineChecker
try:
import enchant.checker.GtkSpellCheckerDialog
- except ImportError:
+ except (ImportError, RuntimeError):
pass
try:
import enchant.checker.wxSpellCheckerDialog
- except ImportError:
+ except (ImportError, RuntimeError):
pass
errors = []
# Naive recursion here would blow the stack, instead we

View File

@ -1,8 +1,8 @@
%global with_python3 1
Name: python-enchant
Version: 1.6.5
Release: 14%{?dist}
Version: 1.6.6
Release: 1%{?dist}
Summary: Python bindings for Enchant spellchecking library
Group: Development/Languages
@ -11,11 +11,6 @@ URL: http://packages.python.org/pyenchant/
Source0: http://pypi.python.org/packages/source/p/pyenchant/pyenchant-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: python-enchant-1.6.5-fix-tests-without-X.patch
Patch1: python-enchant-1.6.5-fix-docstring-test.patch
# python-distribute got merged into python-setuptools
Patch2: python-enchant-1.6.5-disable-distribute-setup.patch
BuildArch: noarch
BuildRequires: enchant-devel
@ -29,6 +24,8 @@ BuildRequires: python-nose
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools >= 0:0.6a9
# For running tests
BuildRequires: python3-nose
%endif # if with_python3
# Work around a problem with libenchant versioning
@ -56,9 +53,6 @@ library by Dom Lachowicz.
%prep
%setup -q -n pyenchant-%{version}
%patch0 -p1 -b .fix-tests-without-X
%patch1 -p1 -b .fix-docstring-test
%patch2 -p1 -b .disable-distribute-setup
%if 0%{?with_python3}
rm -rf %{py3dir}
@ -97,11 +91,15 @@ rm -rf $RPM_BUILD_ROOT/%{python_sitelib}/enchant/share
%check
pushd $RPM_BUILD_ROOT/%{python_sitelib}
# There is no dictionary for language C, need to use en_US
LANG=en_US.UTF-8 /usr/bin/nosetests
LANG=en_US.UTF-8 /usr/bin/nosetests-2.*
popd
# Tests are failing in python3 because of collision between
# local and stdlib tokenize module
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
%clean
rm -rf $RPM_BUILD_ROOT
@ -138,6 +136,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Jan 26 2015 Radek Novacek <rnovacek@redhat.com> 1.6.6-1
- Update to 1.6.6
- Enable python3 tests in the check section
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.5-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild