forked from pool/python-columnize
Accepting request 960143 from home:pgajdos:python
- do not require python-mock for build - added patches fix https://github.com/rocky/pycolumnize/issues/28 + python-columnize-no-mock.patch OBS-URL: https://build.opensuse.org/request/show/960143 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-columnize?expand=0&rev=3
This commit is contained in:
27
python-columnize-no-mock.patch
Normal file
27
python-columnize-no-mock.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
Index: columnize-0.3.10/__pkginfo__.py
|
||||
===================================================================
|
||||
--- columnize-0.3.10.orig/__pkginfo__.py 2020-04-17 03:02:33.000000000 +0200
|
||||
+++ columnize-0.3.10/__pkginfo__.py 2022-03-08 07:53:57.177335010 +0100
|
||||
@@ -45,7 +45,7 @@ exec(
|
||||
)
|
||||
)
|
||||
|
||||
-tests_require = ["mock"]
|
||||
+tests_require = [""]
|
||||
web = "https://github.com/rocky/pycolumnize"
|
||||
# tracebacks in zip files are funky and not debuggable
|
||||
zip_safe = False
|
||||
Index: columnize-0.3.10/test_columnize.py
|
||||
===================================================================
|
||||
--- columnize-0.3.10.orig/test_columnize.py 2022-03-08 07:53:49.941293417 +0100
|
||||
+++ columnize-0.3.10/test_columnize.py 2022-03-08 07:56:36.710251987 +0100
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- Python -*-
|
||||
"Unit test for Columnize"
|
||||
-import mock, operator, os, sys, unittest
|
||||
+import operator, os, sys, unittest
|
||||
+from unittest.mock import mock
|
||||
|
||||
top_builddir = os.path.join(os.path.dirname(__file__), os.path.pardir)
|
||||
if top_builddir[-1] != os.path.sep:
|
||||
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 8 06:50:19 UTC 2022 - pgajdos@suse.com
|
||||
|
||||
- do not require python-mock for build
|
||||
- added patches
|
||||
fix https://github.com/rocky/pycolumnize/issues/28
|
||||
+ python-columnize-no-mock.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 5 17:08:57 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-columnize
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -12,25 +12,27 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define modname columnize
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-columnize
|
||||
Version: 0.3.10
|
||||
Release: 0
|
||||
License: MIT
|
||||
Summary: Format a simple (i.e. not nested) list into aligned columns
|
||||
Url: https://github.com/rocky/pycolumnize
|
||||
URL: https://github.com/rocky/pycolumnize
|
||||
Group: Development/Languages/Python
|
||||
Source0: https://files.pythonhosted.org/packages/source/c/columnize/columnize-%{version}.tar.gz
|
||||
# Include test file missed from being included in source tarball
|
||||
Source1: https://raw.githubusercontent.com/rocky/pycolumnize/%{version}/test_columnize.py
|
||||
# PATCH-FEATURE-OPENSUSE drop-nose-requirement.patch badshah400@gmail.com -- Drop requirement on outdated nose; we do not run tests anyway
|
||||
Patch0: drop-nose-requirement.patch
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: python-rpm-macros
|
||||
# SECTION For tests
|
||||
BuildRequires: %{python_module mock}
|
||||
BuildRequires: %{python_module pytest}
|
||||
@@ -45,8 +47,9 @@ Format a simple (i.e. not nested) list into aligned columns.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n columnize-%{version}
|
||||
|
||||
cp %{SOURCE1} ./
|
||||
# https://github.com/rocky/pycolumnize/issues/28
|
||||
sed -i 's:mock:unittest.mock:' test_columnize.py
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
Reference in New Issue
Block a user