Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4821231

Browse files
authored
Merge pull request #22491 from anntzer/s79
Linewrap setupext to 79 character lines.
2 parents 2785b4c + 00b30bf commit 4821231

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

.flake8

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ exclude =
4242

4343
per-file-ignores =
4444
setup.py: E402
45-
setupext.py: E501
4645
tests.py: F401
4746

4847
lib/matplotlib/__init__.py: E402, F401

setupext.py

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
def _get_xdg_cache_dir():
2424
"""
25-
Return the XDG cache directory.
25+
Return the `XDG cache directory`__.
2626
27-
See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
27+
__ https://specifications.freedesktop.org/basedir-spec/latest/
2828
"""
2929
cache_dir = os.environ.get('XDG_CACHE_HOME')
3030
if not cache_dir:
@@ -177,7 +177,8 @@ def get_and_extract_tarball(urls, sha, dirname):
177177

178178
# Also update the cache path in `.circleci/config.yml`.
179179
LOCAL_QHULL_VERSION = '2020.2'
180-
LOCAL_QHULL_HASH = 'b5c2d7eb833278881b952c8a52d20179eab87766b00b865000469a45c1838b7e'
180+
LOCAL_QHULL_HASH = (
181+
'b5c2d7eb833278881b952c8a52d20179eab87766b00b865000469a45c1838b7e')
181182

182183

183184
# Matplotlib build options, which can be altered using mplsetup.cfg
@@ -649,18 +650,19 @@ def do_custom_build(self, env):
649650
'x64' if platform.architecture()[0] == '64bit' else 'Win32')
650651
base_path = Path("build/freetype-2.6.1/builds/windows")
651652
vc = 'vc2010'
652-
sln_path = (
653-
base_path / vc / "freetype.sln"
654-
)
653+
sln_path = base_path / vc / "freetype.sln"
655654
# https://developercommunity.visualstudio.com/comments/190992/view.html
656-
(sln_path.parent / "Directory.Build.props").write_text("""
657-
<Project>
658-
<PropertyGroup>
659-
<!-- The following line *cannot* be split over multiple lines. -->
660-
<WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
661-
</PropertyGroup>
662-
</Project>
663-
""")
655+
(sln_path.parent / "Directory.Build.props").write_text(
656+
"<Project>"
657+
"<PropertyGroup>"
658+
# WindowsTargetPlatformVersion must be given on a single line.
659+
"<WindowsTargetPlatformVersion>$("
660+
"[Microsoft.Build.Utilities.ToolLocationHelper]"
661+
"::GetLatestSDKTargetPlatformVersion('Windows', '10.0')"
662+
")</WindowsTargetPlatformVersion>"
663+
"</PropertyGroup>"
664+
"</Project>"
665+
)
664666
# It is not a trivial task to determine PlatformToolset to plug it
665667
# into msbuild command, and Directory.Build.props will not override
666668
# the value in the project file.
@@ -713,7 +715,8 @@ def do_custom_build(self, env):
713715
for ext in self._extensions_to_update:
714716
qhull_path = Path(f'build/qhull-{LOCAL_QHULL_VERSION}/src')
715717
ext.include_dirs.insert(0, str(qhull_path))
716-
ext.sources.extend(map(str, sorted(qhull_path.glob('libqhull_r/*.c'))))
718+
ext.sources.extend(
719+
map(str, sorted(qhull_path.glob('libqhull_r/*.c'))))
717720
if sysconfig.get_config_var("LIBM") == "-lm":
718721
ext.libraries.extend("m")
719722

0 commit comments

Comments
 (0)