Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1838162 - python-matplotlib fails to build with Python 3.9: FAILED test_dviread.py::test_dviread - FileNotFoundError: missing font metric...
Summary: python-matplotlib fails to build with Python 3.9: FAILED test_dviread.py::tes...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-matplotlib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Thomas Spura
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-05-20 14:49 UTC by Miro Hrončok
Modified: 2020-05-20 15:41 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-20 15:41:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-05-20 14:49:33 UTC
python-matplotlib fails to build with Python 3.9.0b1.

_________________________________ test_dviread _________________________________
[gw1] linux -- Python 3.9.0 /usr/bin/python3

    @pytest.mark.skipif(shutil.which("kpsewhich") is None,
                        reason="kpsewhich is not available")
    def test_dviread():
        dirpath = Path(__file__).parent / 'baseline_images/dviread'
        with (dirpath / 'test.json').open() as f:
            correct = json.load(f)
        with dr.Dvi(str(dirpath / 'test.dvi'), None) as dvi:
>           data = [{'text': [[t.x, t.y,
                               chr(t.glyph),
                               t.font.texname.decode('ascii'),
                               round(t.font.size, 2)]
                              for t in page.text],
                     'boxes': [[b.x, b.y, b.height, b.width] for b in page.boxes]}
                    for page in dvi]

../../BUILDROOT/python-matplotlib-3.2.1-1.fc33.x86_64/usr/lib64/python3.9/site-packages/matplotlib/tests/test_dviread.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-matplotlib-3.2.1-1.fc33.x86_64/usr/lib64/python3.9/site-packages/matplotlib/tests/test_dviread.py:59: in <listcomp>
    data = [{'text': [[t.x, t.y,
../../BUILDROOT/python-matplotlib-3.2.1-1.fc33.x86_64/usr/lib64/python3.9/site-packages/matplotlib/dviread.py:243: in __iter__
    while self._read():
../../BUILDROOT/python-matplotlib-3.2.1-1.fc33.x86_64/usr/lib64/python3.9/site-packages/matplotlib/dviread.py:301: in _read
    self._dtable[byte](self, byte)
../../BUILDROOT/python-matplotlib-3.2.1-1.fc33.x86_64/usr/lib64/python3.9/site-packages/matplotlib/dviread.py:161: in wrapper
    return method(self, *[f(self, byte-min) for f in get_args])
../../BUILDROOT/python-matplotlib-3.2.1-1.fc33.x86_64/usr/lib64/python3.9/site-packages/matplotlib/dviread.py:441: in _fnt_def
    self._fnt_def_real(k, c, s, d, a, l)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <matplotlib.dviread.Dvi object at 0x7f80942bc670>, k = 7, c = 1274110073
s = 655360, d = 655360, a = 0, l = 5

    def _fnt_def_real(self, k, c, s, d, a, l):
        n = self.file.read(a + l)
        fontname = n[-l:].decode('ascii')
        tfm = _tfmfile(fontname)
        if tfm is None:
>           raise FileNotFoundError("missing font metrics file: %s" % fontname)
E           FileNotFoundError: missing font metrics file: cmr10

../../BUILDROOT/python-matplotlib-3.2.1-1.fc33.x86_64/usr/lib64/python3.9/site-packages/matplotlib/dviread.py:448: FileNotFoundError



This might be related to the new texlive that juts landed in rawhide, right?

Setting severity to high, because we'd liek to proceed with Koji rebuilds soon.


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01395396-python-matplotlib/

For all our attempts to build python-matplotlib with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-matplotlib/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2020-05-20 15:41:09 UTC
https://koschei.fedoraproject.org/package/python-matplotlib?collection=f33 indicates this is fixed. Closing here and triggered a rebuild.


Note You need to log in before you can comment on or make changes to this bug.