File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +15
-11
lines changed
Original file line number Diff line number Diff line change @@ -1315,13 +1315,15 @@ def _init_tests():
1315
1315
if (ft2font .__freetype_version__ != LOCAL_FREETYPE_VERSION or
1316
1316
ft2font .__freetype_build_type__ != 'local' ):
1317
1317
_log .warning (
1318
- f"Matplotlib is not built with the correct FreeType version to "
1319
- f"run tests. Rebuild without setting system-freetype=true in "
1320
- f"Meson setup options. Expect many image comparison failures below. "
1321
- f"Expected freetype version { LOCAL_FREETYPE_VERSION } . "
1322
- f"Found freetype version { ft2font .__freetype_version__ } . "
1323
- "Freetype build type is {}local" .format (
1324
- "" if ft2font .__freetype_build_type__ == 'local' else "not " ))
1318
+ "Matplotlib is not built with the correct FreeType version to run tests. "
1319
+ "Rebuild without setting system-freetype=true in Meson setup options. "
1320
+ "Expect many image comparison failures below. "
1321
+ "Expected freetype version %s. "
1322
+ "Found freetype version %s. "
1323
+ "Freetype build type is %slocal." ,
1324
+ LOCAL_FREETYPE_VERSION ,
1325
+ ft2font .__freetype_version__ ,
1326
+ "" if ft2font .__freetype_build_type__ == 'local' else "not " )
1325
1327
1326
1328
1327
1329
def _replacer (data , value ):
Original file line number Diff line number Diff line change 10
10
#include < set>
11
11
#include < algorithm>
12
12
13
- #define STRINGIFY (s ) XSTRINGIFY(s)
14
- #define XSTRINGIFY (s ) #s
15
-
16
13
static PyObject *convert_xys_to_array (std::vector<double > &xys)
17
14
{
18
15
npy_intp dims[] = {(npy_intp)xys.size () / 2 , 2 };
@@ -1532,7 +1529,7 @@ PyMODINIT_FUNC PyInit_ft2font(void)
1532
1529
// Glyph is not constructible from Python, thus not added to the module.
1533
1530
PyType_Ready (PyGlyph_init_type ()) ||
1534
1531
PyModule_AddStringConstant (m, " __freetype_version__" , version_string) ||
1535
- PyModule_AddStringConstant (m, " __freetype_build_type__" , STRINGIFY ( FREETYPE_BUILD_TYPE) ) ||
1532
+ PyModule_AddStringConstant (m, " __freetype_build_type__" , FREETYPE_BUILD_TYPE) ||
1536
1533
PyModule_AddIntConstant (m, " SCALABLE" , FT_FACE_FLAG_SCALABLE) ||
1537
1534
PyModule_AddIntConstant (m, " FIXED_SIZES" , FT_FACE_FLAG_FIXED_SIZES) ||
1538
1535
PyModule_AddIntConstant (m, " FIXED_WIDTH" , FT_FACE_FLAG_FIXED_WIDTH) ||
Original file line number Diff line number Diff line change @@ -96,6 +96,11 @@ extension_data = {
96
96
' dependencies' : [
97
97
freetype_dep, numpy_dep, agg_dep.partial_dependency(includes : true ),
98
98
],
99
+ ' cpp_args' : [
100
+ ' -DFREETYPE_BUILD_TYPE="@0@"' .format(
101
+ freetype_dep.type_name() == ' internal' ? ' local' : ' system' ,
102
+ ),
103
+ ],
99
104
},
100
105
' _image' : {
101
106
' subdir' : ' matplotlib' ,
You can’t perform that action at this time.
0 commit comments