Skip to content

Commit

Permalink
[ci] use raw strings in NuGet helper script (#2710)
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS authored and jameslamb committed Jan 27, 2020
1 parent d906428 commit ef0b2d8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .nuget/create_nuget.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
copy_file(os.path.join(source, "lib_lightgbm.dll"), os.path.join(windows_folder_path, "lib_lightgbm.dll"))
copy_file(os.path.join(source, "lightgbm.exe"), os.path.join(windows_folder_path, "lightgbm.exe"))
version = open(os.path.join(current_dir, os.path.pardir, 'VERSION.txt')).read().strip()
nuget_str = '''<?xml version="1.0"?>
nuget_str = r"""<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>LightGBM</id>
Expand All @@ -47,8 +47,8 @@
<file src="runtimes\**" target="runtimes"/>
</files>
</package>
''' % (version, datetime.datetime.now().year)
prop_str = '''
""" % (version, datetime.datetime.now().year)
prop_str = r"""
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="Exists('packages.config') OR
Exists('$(MSBuildProjectName).packages.config') OR
Expand All @@ -65,8 +65,8 @@
</Content>
</ItemGroup>
</Project>
'''
target_str = '''
"""
target_str = r"""
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<EnableLightGBMUnsupportedPlatformTargetCheck Condition="'$(EnableLightGBMUnsupportedPlatformTargetCheck)' == ''">true</EnableLightGBMUnsupportedPlatformTargetCheck>
Expand All @@ -80,7 +80,7 @@
Text="LightGBM currently supports 'x64' processor architectures. Please ensure your application is targeting 'x64'." />
</Target>
</Project>
'''
"""
with open(os.path.join(current_dir, "LightGBM.nuspec"), "w") as nuget_file:
nuget_file.write(nuget_str)
with open(os.path.join(current_dir, "build", "LightGBM.props"), "w") as prop_file:
Expand Down

0 comments on commit ef0b2d8

Please sign in to comment.