import os import sys import distutils from distutils import file_util if not os.path.exists("lib"): os.makedirs("lib") if not os.path.exists("lib/native"): os.makedirs("lib/native") if not os.path.exists("lib/net40"): os.makedirs("lib/net40") if not os.path.exists("lib/net45"): os.makedirs("lib/net45") distutils.file_util.copy_file("../Release/lightgbm.exe", "./lib/") distutils.file_util.copy_file("../Release/lib_lightgbm.dll", "./lib/") version = open('../VERSION.txt').read().strip() nuget_str = ''' LightGBM %s Guolin Ke Guolin Ke https://github.com/Microsoft/LightGBM/blob/master/LICENSE https://github.com/Microsoft/LightGBM false A fast, distributed, high performance gradient boosting framework Copyright 2017 @ Microsoft machine-learning data-mining distributed native boosting gbdt ''' % (version) nuget_file = open("LightGBM.nuspec", "w") nuget_file.write(nuget_str) nuget_file.close()