Skip to content

Commit

Permalink
Ruff autofix after Black --preview
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Dec 6, 2023
1 parent f8b357f commit 1c7ccf9
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions winbuild/build_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def cmd_msbuild(
"patch": {
r"CMakeLists.txt": {
# libjpeg-turbo does not detect MSVC x86_arm64 cross-compiler correctly
'if(MSVC_IDE AND CMAKE_GENERATOR_PLATFORM MATCHES "arm64")': ( # noqa: E501
'if(MSVC_IDE AND CMAKE_GENERATOR_PLATFORM MATCHES "arm64")': (
"if({architecture} STREQUAL ARM64)"
),
},
Expand Down Expand Up @@ -195,19 +195,19 @@ def cmd_msbuild(
"patch": {
r"libtiff\tif_lzma.c": {
# link against liblzma.lib
"#ifdef LZMA_SUPPORT": ( # noqa: E501
"#ifdef LZMA_SUPPORT": (
'#ifdef LZMA_SUPPORT\n#pragma comment(lib, "liblzma.lib")'
),
},
r"libtiff\tif_webp.c": {
# link against webp.lib
"#ifdef WEBP_SUPPORT": ( # noqa: E501
"#ifdef WEBP_SUPPORT": (
'#ifdef WEBP_SUPPORT\n#pragma comment(lib, "webp.lib")'
),
},
r"test\CMakeLists.txt": {
"add_executable(test_write_read_tags ../placeholder.h)": "",
"target_sources(test_write_read_tags PRIVATE test_write_read_tags.c)": ( # noqa: E501
"target_sources(test_write_read_tags PRIVATE test_write_read_tags.c)": (
""
),
"target_link_libraries(test_write_read_tags PRIVATE tiff)": "",
Expand Down Expand Up @@ -257,26 +257,26 @@ def cmd_msbuild(
"patch": {
r"builds\windows\vc2010\freetype.vcxproj": {
# freetype setting is /MD for .dll and /MT for .lib, we need /MD
"<RuntimeLibrary>MultiThreaded</RuntimeLibrary>": ( # noqa: E501
"<RuntimeLibrary>MultiThreaded</RuntimeLibrary>": (
"<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>"
),
# freetype doesn't specify SDK version, MSBuild may guess incorrectly
'<PropertyGroup Label="Globals">': ( # noqa: E501
'<PropertyGroup Label="Globals">': (
'<PropertyGroup Label="Globals">\n '
" <WindowsTargetPlatformVersion>$(WindowsSDKVersion)</WindowsTargetPlatformVersion>"
),
},
r"builds\windows\vc2010\freetype.user.props": {
"<UserDefines></UserDefines>": "<UserDefines>FT_CONFIG_OPTION_SYSTEM_ZLIB;FT_CONFIG_OPTION_USE_PNG;FT_CONFIG_OPTION_USE_HARFBUZZ;FT_CONFIG_OPTION_USE_BROTLI</UserDefines>", # noqa: E501
"<UserIncludeDirectories></UserIncludeDirectories>": r"<UserIncludeDirectories>{dir_harfbuzz}\src;{inc_dir}</UserIncludeDirectories>", # noqa: E501
"<UserLibraryDirectories></UserLibraryDirectories>": ( # noqa: E501
"<UserLibraryDirectories></UserLibraryDirectories>": (
"<UserLibraryDirectories>{lib_dir}</UserLibraryDirectories>"
),
"<UserDependencies></UserDependencies>": "<UserDependencies>zlib.lib;libpng16.lib;brotlicommon.lib;brotlidec.lib</UserDependencies>", # noqa: E501
},
r"src/autofit/afshaper.c": {
# link against harfbuzz.lib
"#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ": ( # noqa: E501
"#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ": (
"#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ\n#pragma comment(lib,"
' "harfbuzz.lib")'
),
Expand All @@ -302,11 +302,11 @@ def cmd_msbuild(
"patch": {
r"Projects\VC2022\lcms2_static\lcms2_static.vcxproj": {
# default is /MD for x86 and /MT for x64, we need /MD always
"<RuntimeLibrary>MultiThreaded</RuntimeLibrary>": ( # noqa: E501
"<RuntimeLibrary>MultiThreaded</RuntimeLibrary>": (
"<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>"
),
# retarget to default toolset (selected by vcvarsall.bat)
"<PlatformToolset>v143</PlatformToolset>": ( # noqa: E501
"<PlatformToolset>v143</PlatformToolset>": (
"<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>"
),
# retarget to latest (selected by vcvarsall.bat)
Expand All @@ -331,7 +331,7 @@ def cmd_msbuild(
"license": "LICENSE",
"patch": {
r"src\lib\openjp2\ht_dec.c": {
"#ifdef OPJ_COMPILER_MSVC\n return (OPJ_UINT32)__popcnt(val);": ( # noqa: E501
"#ifdef OPJ_COMPILER_MSVC\n return (OPJ_UINT32)__popcnt(val);": (
"#if defined(OPJ_COMPILER_MSVC) && (defined(_M_IX86) ||"
" defined(_M_AMD64))\n return (OPJ_UINT32)__popcnt(val);"
),
Expand All @@ -357,7 +357,7 @@ def cmd_msbuild(
"if(OPENMP_FOUND)": "if(false)",
"install": "#install",
# libimagequant does not detect MSVC x86_arm64 cross-compiler correctly
"if(${{CMAKE_SYSTEM_PROCESSOR}} STREQUAL ARM64)": ( # noqa: E501
"if(${{CMAKE_SYSTEM_PROCESSOR}} STREQUAL ARM64)": (
"if({architecture} STREQUAL ARM64)"
),
}
Expand Down

0 comments on commit 1c7ccf9

Please sign in to comment.