Accepting request 628662 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/628662 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-csvkit?expand=0&rev=3
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 10 15:37:29 UTC 2018 - mcepl@suse.com
|
||||
|
||||
- Remove unnecessary unittest2 dependency
|
||||
(Patch remove-unittest2.patch makes necessary changes)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 29 11:52:04 UTC 2018 - jengelh@inai.de
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ License: MIT
|
||||
Group: Development/Languages/Python
|
||||
Url: https://github.com/wireservice/csvkit
|
||||
Source: https://files.pythonhosted.org/packages/source/c/csvkit/csvkit-%{version}.tar.gz
|
||||
Patch0: remove-unittest2.patch
|
||||
BuildRequires: %{python_module SQLAlchemy >= 0.9.3}
|
||||
BuildRequires: %{python_module Sphinx >= 1.0.7}
|
||||
BuildRequires: %{python_module aenum}
|
||||
@@ -47,7 +48,6 @@ BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module coverage >= 3.5.1b1}
|
||||
BuildRequires: %{python_module nose >= 1.1.2}
|
||||
BuildRequires: python-mock >= 1.3.0
|
||||
BuildRequires: python-unittest2 >= 1.1.0
|
||||
# /SECTION
|
||||
BuildArch: noarch
|
||||
|
||||
@@ -60,6 +60,7 @@ Aaron Bycoffe.
|
||||
|
||||
%prep
|
||||
%setup -q -n csvkit-%{version}
|
||||
%autopatch -p1
|
||||
# find and remove unneeded shebangs
|
||||
find csvkit -name "*.py" | xargs sed -i '1 {/^#!/ d}'
|
||||
|
||||
|
||||
41
remove-unittest2.patch
Normal file
41
remove-unittest2.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
--- a/tests/test_utilities/test_csvjson.py
|
||||
+++ b/tests/test_utilities/test_csvjson.py
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
import json
|
||||
import sys
|
||||
+import unittest
|
||||
|
||||
import six
|
||||
|
||||
@@ -14,6 +15,11 @@ except ImportError:
|
||||
from csvkit.utilities.csvjson import CSVJSON, launch_new_instance
|
||||
from tests.utils import CSVKitTestCase, EmptyFileTests
|
||||
|
||||
+if not hasattr(unittest.TestCase, 'assertRegex'):
|
||||
+ setattr(unittest.TestCase, 'assertRegex', unittest.TestCase.assertRegexpMatches)
|
||||
+
|
||||
+if not hasattr(unittest.TestCase, 'assertRaisesRegex'):
|
||||
+ setattr(unittest.TestCase, 'assertRaisesRegex', unittest.TestCase.assertRaisesRegexp)
|
||||
|
||||
class TestCSVJSON(CSVKitTestCase, EmptyFileTests):
|
||||
Utility = CSVJSON
|
||||
--- a/tests/test_utilities/test_csvstat.py
|
||||
+++ b/tests/test_utilities/test_csvstat.py
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
+import unittest
|
||||
|
||||
import agate
|
||||
|
||||
@@ -12,6 +13,8 @@ except ImportError:
|
||||
from csvkit.utilities.csvstat import CSVStat, launch_new_instance
|
||||
from tests.utils import CSVKitTestCase, ColumnsTests, EmptyFileTests, NamesTests
|
||||
|
||||
+if not hasattr(unittest.TestCase, 'assertRegex'):
|
||||
+ setattr(unittest.TestCase, 'assertRegex', unittest.TestCase.assertRegexpMatches)
|
||||
|
||||
class TestCSVStat(CSVKitTestCase, ColumnsTests, EmptyFileTests, NamesTests):
|
||||
Utility = CSVStat
|
||||
Reference in New Issue
Block a user