8000 CI: add appveyor script to build Windows wheels by matthew-brett · Pull Request #6969 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

CI: add appveyor script to build Windows wheels #6969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TST: some tex tests also need to guard against missing gs
Also fixed a problem in an error message when bytes were appended to
a string (fails on py3.x) by using %.

One of the errors before:

======================================================================
ERROR: matplotlib.tests.test_backend_ps.test_savefig_to_stringio_with_usetex
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "lib\matplotlib\testing\decorators.py", line 152, in wrapped_callable

    func(*args, **kwargs)
  File "lib\matplotlib\testing\decorators.py", line 55, in failer
    result = f(*args, **kwargs)
  File "lib\matplotlib\tests\test_backend_ps.py", line 77, in test_savefig_to_stringio_with_usetex
    _test_savefig_to_stringio()
  File "lib\matplotlib\tests\test_backend_ps.py", line 40, in _test_savefig_to_stringio
    fig.savefig(buffer, format=format)
  File "lib\matplotlib\figure.py", line 1698, in savefig
    self.canvas.print_figure(*args, **kwargs)
  File "lib\matplotlib\backend_bases.py", line 2232, in print_figure
    **kwargs)
  File "lib\matplotlib\backends\backend_ps.py", line 985, in print_ps
    return self._print_ps(outfile, 'ps', *args, **kwargs)
  File "lib\matplotlib\backends\backend_ps.py", line 1012, in _print_ps
    **kwargs)
  File "lib\matplotlib\backends\backend_ps.py", line 1376, in _print_figure_tex
    rotated=psfrag_rotated)
  File "lib\matplotlib\backends\backend_ps.py", line 1539, in gs_distill
    raise RuntimeError(m % output)
RuntimeError: ghostscript was not able to process your image.
Here is the full report generated by ghostscript:

b''
  • Loading branch information
jankatins authored and matthew-brett committed Aug 26, 2016
commit 71372e710401c503306e99015cad048b99754b1c
9 changes: 7 additions & 2 deletions lib/matplotlib/backends/backend_ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -1503,8 +1503,13 @@ def gs_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False):

with io.open(outfile, 'rb') as fh:
if exit_status:
raise RuntimeError('ghostscript was not able to process \
your image.\nHere is the full report generated by ghostscript:\n\n' + fh.read())
output = fh.read()
m = "\n".join(["ghostscript was not able to process your image.",
"Here is the full report generated by ghostscript:",
"",
"%s"])
# use % to prevent problems with bytes
raise RuntimeError(m % output)
else:
verbose.report(fh.read(), 'debug')
os.remove(outfile)
Expand Down
2 changes: 2 additions & 0 deletions lib/matplotlib/tests/test_backend_ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def test_savefig_to_stringio_with_distiller():

@cleanup
@needs_tex
@needs_ghostscript
def test_savefig_to_stringio_with_usetex():
matplotlib.rcParams['text.latex.unicode'] = True
matplotlib.rcParams['text.usetex'] = True
Expand All @@ -90,6 +91,7 @@ def test_savefig_to_stringio_eps_afm():

@cleanup
@needs_tex
@needs_ghostscript
def test_savefig_to_stringio_with_usetex_eps():
matplotlib.rcParams['text.latex.unicode'] = True
matplotlib.rcParams['text.usetex'] = True
Expand Down
0