Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
ef0b2d82
Commit
ef0b2d82
authored
Jan 27, 2020
by
Nikita Titov
Committed by
James Lamb
Jan 26, 2020
Browse files
[ci] use raw strings in NuGet helper script (#2710)
parent
d9064282
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
.nuget/create_nuget.py
.nuget/create_nuget.py
+6
-6
No files found.
.nuget/create_nuget.py
View file @
ef0b2d82
...
...
@@ -27,7 +27,7 @@ if __name__ == "__main__":
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>
...
...
@@ -47,8 +47,8 @@ if __name__ == "__main__":
<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
...
...
@@ -65,8 +65,8 @@ if __name__ == "__main__":
</Content>
</ItemGroup>
</Project>
'''
target_str
=
'''
"""
target_str
=
r
"""
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<EnableLightGBMUnsupportedPlatformTargetCheck Condition="'$(EnableLightGBMUnsupportedPlatformTargetCheck)' == ''">true</EnableLightGBMUnsupportedPlatformTargetCheck>
...
...
@@ -80,7 +80,7 @@ if __name__ == "__main__":
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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment