Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 664258 - dev-python/pytables-3.4.2 needs a patch for Python3.7
Summary: dev-python/pytables-3.4.2 needs a patch for Python3.7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2018-08-22 13:31 UTC by Helmut Jarausch
Modified: 2018-12-06 20:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild which fixes setup.py by using 'sed' (pytables-3.4.2.ebuild,1.65 KB, text/plain)
2018-08-22 13:31 UTC, Helmut Jarausch
Details
patch for ebuild (pytables-3.4.2.ebuild.patch,571 bytes, patch)
2018-08-25 14:42 UTC, Helmut Jarausch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2018-08-22 13:31:39 UTC
Created attachment 544462 [details]
ebuild which fixes setup.py by using 'sed'

setup.py contains the following lines which I don't understand (see below)
    with open(headername) as fd:
        for line in fd:
            if 'H5_VERS_MAJOR' in line:
                major_version = int(re.split("\s*", line)[2])
            if 'H5_VERS_MINOR' in line:
                minor_version = int(re.split("\s*", line)[2])
            if 'H5_VERS_RELEASE' in line:
                release_version = int(re.split("\s*", line)[2])

The regular expression "\s*" matches everywhere, such that re.split generates
a list of every character of 'line' which gives an invalid conversion from a non-numeric character to an int.

I think what one needs is re.split("\s+") which makes the above code work fine with Python3.6 as well as with Python3.7
Comment 1 Andreas Sturmlechner gentoo-dev 2018-08-25 13:39:24 UTC
Thanks for your work, please attach unified diffs instead of full ebuilds for easy review of your changes.
Comment 2 Helmut Jarausch 2018-08-25 14:42:50 UTC
Created attachment 545006 [details, diff]
patch for ebuild
Comment 3 Larry the Git Cow gentoo-dev 2018-12-06 20:47:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ac05b825d825c04f7a25c1730299d6d1db39928

commit 9ac05b825d825c04f7a25c1730299d6d1db39928
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2018-11-26 20:57:17 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2018-12-06 20:40:54 +0000

    dev-python/pytables: Fix for Python 3.7
    
    Closes: https://bugs.gentoo.org/664258
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Craig Andrews <candrews@gentoo.org>

 dev-python/pytables/pytables-3.4.2.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)