8000 Linewrap setupext to 79 character lines. by anntzer · Pull Request #22491 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Linewrap setupext to 79 character lines. #22491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ exclude =

per-file-ignores =
setup.py: E402
setupext.py: E501
tests.py: F401

lib/matplotlib/__init__.py: E402, F401
Expand Down
33 changes: 18 additions & 15 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

def _get_xdg_cache_dir():
"""
Return the XDG cache directory.
Return the `XDG cache directory`__.

See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
__ https://specifications.freedesktop.org/basedir-spec/latest/
"""
cache_dir = os.environ.get('XDG_CACHE_HOME')
if not cache_dir:
Expand Down Expand Up @@ -177,7 +177,8 @@ def get_and_extract_tarball(urls, sha, dirname):

# Also update the cache path in `.circleci/config.yml`.
LOCAL_QHULL_VERSION = '2020.2'
LOCAL_QHULL_HASH = 'b5c2d7eb833278881b952c8a52d20179eab87766b00b865000469a45c1838b7e'
LOCAL_QHULL_HASH = (
'b5c2d7eb833278881b952c8a52d20179eab87766b00b865000469a45c1838b7e')


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

Expand Down
0