Files
MINGW-packages/mingw-w64-python-matplotlib/setupext.py.patch
2022-04-03 16:54:14 +01:00

41 lines
1.3 KiB
Diff

--- a/setupext.py
+++ b/setupext.py
@@ -19,6 +19,7 @@
_log = logging.getLogger(__name__)
+MSYS = "MSYSTEM" in os.environ
def _get_xdg_cache_dir():
"""
@@ -188,9 +189,9 @@
options = {
'backend': config.get('rc_options', 'backend', fallback=None),
'system_freetype': config.getboolean(
- 'libs', 'system_freetype', fallback=sys.platform.startswith('aix')),
+ 'libs', 'system_freetype', fallback=sys.platform.startswith('aix') or MSYS),
'system_qhull': config.getboolean(
- 'libs', 'system_qhull', fallback=False),
+ 'libs', 'system_qhull', fallback=False or MSYS),
}
@@ -213,7 +214,7 @@
"""
Get path to pkg-config and set up the PKG_CONFIG environment variable.
"""
- if sys.platform == 'win32':
+ if sys.platform == 'win32' and not MSYS:
return None
pkg_config = os.environ.get('PKG_CONFIG') or 'pkg-config'
if shutil.which(pkg_config) is None:
@@ -265,7 +266,7 @@
# conda Windows header and library paths.
# https://github.com/conda/conda/issues/2312 re: getting the env dir.
- if sys.platform == 'win32':
+ if sys.platform == 'win32' and not MSYS:
conda_env_path = (os.getenv('CONDA_PREFIX') # conda >= 4.1
or os.getenv('CONDA_DEFAULT_ENV')) # conda < 4.1
if conda_env_path and os.path.isdir(conda_env_path):