Skip to content

Commit 76d2e02

Browse files
committed
Minor clean up to keep the line length bit short
1 parent b509068 commit 76d2e02

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/matplotlib/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@
100100
import sys
101101
import tempfile
102102
import warnings
103-
import platform
104103

105104
import numpy
106105
from packaging.version import parse as parse_version

setupext.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,11 +688,14 @@ def do_custom_build(self, env):
688688

689689
cc = get_ccompiler()
690690
cc.initialize() # Get msbuild in the %PATH% of cc.spawn.
691-
# Freetype 2.10.0+ support static builds and use them if available as they are easier to deploy
692-
msbuild_configuration = 'Release Static' if version.parse(LOCAL_FREETYPE_VERSION) >= version.parse("2.10.0") else 'Release'
691+
# Freetype 2.10.0+ support static builds.
692+
if version.parse(LOCAL_FREETYPE_VERSION) >= version.parse("2.10.0"):
693+
msbuild_config = 'Release Static'
694+
else:
695+
msbuild_config = 'Release'
693696
cc.spawn(["msbuild", str(sln_path),
694697
"/t:Clean;Build",
695-
f"/p:Configuration={msbuild_configuration};Platform={msbuild_platform}"])
698+
f"/p:Configuration={msbuild_config};Platform={msbuild_platform}"])
696699
# Move to the corresponding Unix build path.
697700
(src_path / "objs" / ".libs").mkdir()
698701
# Be robust against change of FreeType version.

0 commit comments

Comments
 (0)