diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 97c8c34afa60..3e2a6144dece 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -243,7 +243,7 @@ jobs: shell: bash.exe -eo pipefail -o igncr "{0}" id: cygwin-run-pytest run: | - xvfb-run pytest -rfEsXR -n auto \ + xvfb-run pytest-3.${{ matrix.python-minor-version }} -rfEsXR -n auto \ --maxfail=50 --timeout=300 --durations=25 \ --cov-report=xml --cov=lib --log-level=DEBUG --color=yes diff --git a/src/_backend_agg.cpp b/src/_backend_agg.cpp index 10a17f2dc9cb..c35f92eb8fc1 100644 --- a/src/_backend_agg.cpp +++ b/src/_backend_agg.cpp @@ -2,6 +2,7 @@ #define NO_IMPORT_ARRAY +#include #include "_backend_agg.h" #include "mplutils.h" diff --git a/src/_c_internal_utils.cpp b/src/_c_internal_utils.cpp index 813aeb6f7d5a..464aabcb2e3a 100644 --- a/src/_c_internal_utils.cpp +++ b/src/_c_internal_utils.cpp @@ -1,3 +1,6 @@ +#include +/* Python.h must be included before any system headers, + to ensure visibility macros are properly set. */ #include #ifdef _WIN32 diff --git a/src/_tkagg.cpp b/src/_tkagg.cpp index 3b58114a71c0..91cf285202ed 100644 --- a/src/_tkagg.cpp +++ b/src/_tkagg.cpp @@ -9,6 +9,7 @@ // rewritten, we have removed the PIL licensing information. If you want PIL, // you can get it at https://python-pillow.org/ +#include #include #include #include diff --git a/src/_ttconv.cpp b/src/_ttconv.cpp index a682c26b17b0..715d46d4cf7a 100644 --- a/src/_ttconv.cpp +++ b/src/_ttconv.cpp @@ -5,9 +5,8 @@ Python wrapper for TrueType conversion library in ../ttconv. */ -#include "mplutils.h" - #include +#include "mplutils.h" #include "pprdrv.h" #include diff --git a/src/ft2font.h b/src/ft2font.h index 69dafb66bdca..6b8f05466700 100644 --- a/src/ft2font.h +++ b/src/ft2font.h @@ -2,8 +2,13 @@ /* A python interface to FreeType */ #pragma once + #ifndef MPL_FT2FONT_H #define MPL_FT2FONT_H + +#define PY_SSIZE_T_CLEAN +#include + #include #include #include @@ -19,9 +24,6 @@ extern "C" { #include FT_TRUETYPE_TABLES_H } -#define PY_SSIZE_T_CLEAN -#include - /* By definition, FT_FIXED as 2 16bit values stored in a single long. */ diff --git a/src/numpy_cpp.h b/src/numpy_cpp.h index a69c1cb29a50..6165789b7603 100644 --- a/src/numpy_cpp.h +++ b/src/numpy_cpp.h @@ -14,10 +14,6 @@ * original. */ -#include "py_exceptions.h" - -#include - #ifdef _POSIX_C_SOURCE # undef _POSIX_C_SOURCE #endif @@ -40,6 +36,10 @@ #include #include +#include "py_exceptions.h" + +#include + namespace numpy {