forked from pool/python-bibtexparser
Accepting request 810602 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/810602 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-bibtexparser?expand=0&rev=3
This commit is contained in:
13
python-bibtexparser-remove-unittest2.patch
Normal file
13
python-bibtexparser-remove-unittest2.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
Index: python-bibtexparser-1.1.0/bibtexparser/tests/test_crossref_resolving.py
|
||||
===================================================================
|
||||
--- python-bibtexparser-1.1.0.orig/bibtexparser/tests/test_crossref_resolving.py 2019-01-17 16:31:34.000000000 +0100
|
||||
+++ python-bibtexparser-1.1.0/bibtexparser/tests/test_crossref_resolving.py 2020-06-01 11:32:48.246219654 +0200
|
||||
@@ -1,4 +1,7 @@
|
||||
-import unittest2 as unittest
|
||||
+try:
|
||||
+ import unittest2 as unittest
|
||||
+except ImportError:
|
||||
+ import unittest
|
||||
from bibtexparser.bibdatabase import BibDatabase
|
||||
from bibtexparser.bparser import BibTexParser
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 1 10:15:19 UTC 2020 - pgajdos@suse.com
|
||||
|
||||
- unittest2 is not neccessary for python3
|
||||
- added patches
|
||||
use unittest2 only if present, fall back to unittest
|
||||
+ python-bibtexparser-remove-unittest2.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 15 10:00:08 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_without python2
|
||||
Name: python-bibtexparser
|
||||
Version: 1.1.0
|
||||
Release: 0
|
||||
@@ -25,6 +26,8 @@ License: LGPL-3.0-only OR BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/sciunto-org/python-bibtexparser
|
||||
Source: https://github.com/sciunto-org/python-bibtexparser/archive/v%{version}.tar.gz#/python-bibtexparser-%{version}.tar.gz
|
||||
# https://github.com/sciunto-org/python-bibtexparser/pull/259
|
||||
Patch0: python-bibtexparser-remove-unittest2.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
@@ -36,7 +39,9 @@ BuildArch: noarch
|
||||
BuildRequires: %{python_module future >= 0.16.0}
|
||||
BuildRequires: %{python_module pyparsing >= 2.0.3}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module unittest2}
|
||||
%if %{with python2}
|
||||
BuildRequires: python-unittest2
|
||||
%endif
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
@@ -45,6 +50,7 @@ Python library to parse bibtex files..
|
||||
|
||||
%prep
|
||||
%setup -q -n python-bibtexparser-%{version}
|
||||
%patch0 -p1
|
||||
sed -i -e '/^#!\//, 1d' bibtexparser/*.py
|
||||
|
||||
%build
|
||||
|
||||
Reference in New Issue
Block a user