From 048cb7ce7b97b0df0bd86dcc0e014aa61e84a512 Mon Sep 17 00:00:00 2001 From: Radek Novacek Date: Mon, 26 Jan 2015 08:08:18 +0100 Subject: [PATCH] Update to 1.6.6 - Enable python3 tests in the check section --- ...chant-1.6.5-disable-distribute-setup.patch | 14 ----------- python-enchant-1.6.5-fix-docstring-test.patch | 13 ---------- ...on-enchant-1.6.5-fix-tests-without-X.patch | 17 ------------- python-enchant.spec | 24 ++++++++++--------- 4 files changed, 13 insertions(+), 55 deletions(-) delete mode 100644 python-enchant-1.6.5-disable-distribute-setup.patch delete mode 100644 python-enchant-1.6.5-fix-docstring-test.patch delete mode 100644 python-enchant-1.6.5-fix-tests-without-X.patch diff --git a/python-enchant-1.6.5-disable-distribute-setup.patch b/python-enchant-1.6.5-disable-distribute-setup.patch deleted file mode 100644 index 9844584..0000000 --- a/python-enchant-1.6.5-disable-distribute-setup.patch +++ /dev/null @@ -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 - diff --git a/python-enchant-1.6.5-fix-docstring-test.patch b/python-enchant-1.6.5-fix-docstring-test.patch deleted file mode 100644 index 273acd5..0000000 --- a/python-enchant-1.6.5-fix-docstring-test.patch +++ /dev/null @@ -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.""" diff --git a/python-enchant-1.6.5-fix-tests-without-X.patch b/python-enchant-1.6.5-fix-tests-without-X.patch deleted file mode 100644 index 2f4cff7..0000000 --- a/python-enchant-1.6.5-fix-tests-without-X.patch +++ /dev/null @@ -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 diff --git a/python-enchant.spec b/python-enchant.spec index 7f1dde7..f393263 100644 --- a/python-enchant.spec +++ b/python-enchant.spec @@ -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 1.6.6-1 +- Update to 1.6.6 +- Enable python3 tests in the check section + * Sat Jun 07 2014 Fedora Release Engineering - 1.6.5-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild