[sdks] Correctly set mac/watchos sdks version too
[mono-project.git] / packaging / MacSDK / nuget.py
blob8b9ddbcd65973fb96f12a5324da19ee1572d501a
1 import fileinput
4 class NuGetBinary (Package):
6 def __init__(self):
7 Package.__init__(self, name='NuGet', version='5.0.2', sources=[
8 'https://dist.nuget.org/win-x86-commandline/v%{version}/nuget.exe'])
10 def build(self):
11 pass
13 def install(self):
14 source = os.path.join(self.workspace, 'nuget.exe')
15 target = os.path.join(self.staged_prefix, 'lib/mono/nuget/nuget.exe')
16 ensure_dir(os.path.dirname(target))
17 shutil.move(source, target)
19 launcher = os.path.join(self.staged_prefix, "bin/nuget")
20 ensure_dir(os.path.dirname(launcher))
21 with open(launcher, "w") as output:
22 output.write("#!/bin/sh\n")
23 output.write(
24 'exec {0}/bin/mono $MONO_OPTIONS {1} "$@"\n'.format(self.staged_prefix, target))
25 os.chmod(launcher, 0o755)
26 NuGetBinary()