@@ -29,36 +29,40 @@ Noteworthy points include:
29
29
Installation
30
30
============
31
31
32
- mplcairo requires Python 3 (Python 3.6 on Windows) and cairo≥1.11.4 (but
33
- preferably ≥1.15.4) [# ]_, and also declares the following dependencies (which
34
- are installed by pip):
32
+ mplcairo requires
35
33
36
- - Matplotlib≥2.2,
37
- - pybind11≥2.2 [# ]_,
38
- - on Linux and OSX only, pycairo≥1.16.0 [# ]_.
34
+ - Python 3 (3.6 on Windows),
35
+ - Matplotlib≥2.2 (declared as ``install_requires ``),
36
+ - pybind11≥2.2 [# ]_ (declared as ``install_requires ``),
37
+ - on Linux and OSX, pycairo≥1.16.0 [# ]_ (declared as conditional
38
+ ``install_requires ``),
39
+ - on Windows, cairo≥1.11.4 [# ]_ (shipped with the wheel).
39
40
40
- Linux and OSX wheels are available on Github releases. Download them manually
41
- and install using pip, as usual.
41
+ As usual, install using pip::
42
42
43
- .. [# ] cairo 1.11.4 added mesh gradient support (used by ``draw_quad_mesh() ``).
44
-
45
- cairo 1.15.4 added support for PDF metadata and links.
43
+ python -mpip install mplcairo
46
44
47
- .. [# ] pybind11 is technically only a build-time requirement, but doesn't play
45
+ .. [# ] pybind11 is actually only a build-time requirement, but doesn't play
48
46
well with ``setup_requires ``.
49
47
50
48
.. [# ] pycairo 1.16.0 added ``get_include() ``.
51
49
52
50
We do not actually rely on pycairo's Python bindings. Rather, specifying a
53
51
dependency on pycairo is a convenient way to specify a dependency on cairo
54
- itself, and allows us to load cairo at runtime instead of linking to it
55
- (simplifying the build of self-contained wheels).
52
+ (≥1.13.1, for pycairo≥1.14.0) itself, and allows us to load cairo at
53
+ runtime instead of linking to it (simplifying the build of self-contained
54
+ wheels).
56
55
57
56
On Windows, this strategy is (AFAIK) not possible, so we explicitly link
58
57
against the cairo DLL. Moreover, commonly available Windows builds of
59
58
pycairo (Anaconda, conda-forge, Gohlke) do not include FreeType support, and
60
59
are thus unusable anyways.
61
60
61
+ .. [# ] cairo 1.11.4 added mesh gradient support (used by ``draw_quad_mesh() ``).
62
+
63
+ (cairo 1.15.4 added support for PDF metadata and links; the presence of this
64
+ feature is detected at runtime.)
65
+
62
66
Building
63
67
========
64
68
@@ -130,7 +134,9 @@ Windows
130
134
131
135
The following additional dependencies are required:
132
136
133
- - a "recent enough" version of MSVC (19.13.26128 is sufficient).
137
+ - a "recent enough" version of MSVC (19.13.26128 is sufficient). (This is the
138
+ reason for restricting support to Python 3.6 on Windows: distutils is able to
139
+ use MSVC 2017 only since Python 3.6.4.)
134
140
135
141
- FreeType headers, which can e.g. be installed using conda ::
136
142
0 commit comments