#3 New patch: Adapt doctests for Python 3.8 and newer Numpy
Closed a month ago by zbyszek. Opened 2 months ago by lbalhar.
rpms/ lbalhar/python-igor master  into  master

The added file is too large to be shown here, see it at: adapt-doctests-for-Python-3.8-and-newer-Numpy.patch
file modified
+7 -9

@@ -4,7 +4,7 @@ 

  

  Name:           python-igor

  Version:        0.3

- Release:        9.%{gitdate}git%{shortcommit}%{?dist}

+ Release:        10.%{gitdate}git%{shortcommit}%{?dist}

  Summary:        Parser for Igor Binary Waves (.ibw) and Packed Experiment (.pxp) files

  

  # igor-0.2/igor/igorpy.py is PD, the restis LGPLv3+

@@ -12,6 +12,7 @@ 

  

  URL:            http://blog.tremily.us/posts/igor/

  Source0:        https://github.com/wking/igor/archive/v%{version}/%{name}-%{version}.tar.gz

+ Patch0:         adapt-doctests-for-Python-3.8-and-newer-Numpy.patch

  

  BuildArch:      noarch

  BuildRequires:  /usr/bin/rename

@@ -42,7 +43,7 @@ 

  life-cycle testing).

  

  %prep

- %autosetup -n igor-%{version} -N

+ %autosetup -p1 -n igor-%{version}

  

  %build

  %py3_build

@@ -54,13 +55,7 @@ 

  rename '.py' '' %{buildroot}%{_bindir}/*

  

  %check

- # Tests fail under python3, primarily because b'' prefixes are present

- # everywhere in output under python3. Upstream has rejected my initial

- # approach of just adding them everywhere in the examples, and indeed,

- # it seems that a better solution that works for python2 and python3 should

- # be found. Unfortunately this hasn't happened so far, so let's just run

- # the tests and ignore their result for now.

- nosetests-%{python3_version} --with-doctest --doctest-tests igor test -v || :

+ nosetests-%{python3_version} --with-doctest --doctest-tests igor test -v

  

  %global _docdir_fmt %{name}

  

@@ -76,6 +71,9 @@ 

  %{_bindir}/igorpackedexperiment

  

  %changelog

+ * Mon Oct 21 2019 Lumír Balhar <lbalhar@redhat.com> - 0.3-10.20150408git2c2a79d

+ - New patch: Adapt doctests for Python 3.8 and newer Numpy

+ 

  * Thu Oct 17 2019 Lumír Balhar <lbalhar@redhat.com> - 0.3-9.20150408git2c2a79d

  - Remove Python 2 subpackage, move scripts to Python 3 subpackage

  

As I promised, there is a patch for doctests which makes them compatible with the latest Python 3.8 and Numpy.

Honestly, I don't understand the outputs well enough so I am using ellipsis only on places where it's necessary which makes this patch bigger than it probably has to be. But it works.

Pull-Request has been closed by zbyszek

a month ago