Bump fsharp.py to get upstream nuget feed cleanup
[mono-project.git] / packaging / MacSDK / pcl-reference-assemblies.py
blob1c1587d2a814fe205ebac7ba59b4e76155e1d3ef
1 import glob
2 import os
3 import shutil
6 class PCLReferenceAssembliesPackage(Package):
8 def __init__(self):
9 Package.__init__(self,
10 name='PortableReferenceAssemblies',
11 version='2014-04-14',
12 sources=['https://bosstoragemirror.blob.core.windows.net/bot-provisioning/PortableReferenceAssemblies-2014-04-14.zip'])
14 def build(self):
15 pass
17 # A bunch of shell script written inside python literals ;(
18 def install(self):
19 dest = os.path.join(
20 self.staged_prefix,
21 "lib",
22 "mono",
23 "xbuild-frameworks",
24 ".NETPortable")
25 if not os.path.exists(dest):
26 os.makedirs(dest)
28 shutil.rmtree(dest, ignore_errors=True)
30 self.sh("rsync -abv -q %s/* %s" % (self.workspace, dest))
32 for f in glob.glob("%s/*/Profile/*/SupportedFrameworks" % dest):
33 self.write_xml(f)
35 def write_xml(self, directory):
36 # print "Writing iOS/Android/Mac listings for " + directory
37 data = {
38 os.path.join(directory, "MonoTouch.xml"):
39 """<Framework Identifier="MonoTouch" MinimumVersion="1.0" Profile="*" DisplayName="Xamarin.iOS Classic"/>""",
40 os.path.join(directory, "Xamarin.iOS.xml"):
41 """<Framework Identifier="Xamarin.iOS" MinimumVersion="1.0" Profile="*" DisplayName="Xamarin.iOS Unified"/>""",
42 os.path.join(directory, "Xamarin.Android.xml"):
43 """<Framework Identifier="MonoAndroid" MinimumVersion="1.0" Profile="*" DisplayName="Xamarin.Android"/>""",
44 os.path.join(directory, "Xamarin.Mac.xml"):
45 """<Framework Identifier="Xamarin.Mac" MinimumVersion="2.0" Profile="*" DisplayName="Xamarin.Mac Unified"/>""",
46 os.path.join(directory, "Xamarin.TVOS.xml"):
47 """<Framework Identifier="Xamarin.TVOS" MinimumVersion="1.0" Profile="*" DisplayName="Xamarin.TVOS"/>""",
48 os.path.join(directory, "Xamarin.WatchOS.xml"):
49 """<Framework Identifier="Xamarin.WatchOS" MinimumVersion="1.0" Profile="*" DisplayName="Xamarin.WatchOS"/>""",
51 for filename, content in data.iteritems():
52 f = open(filename, "w")
53 f.write(content + "\n")
54 f.close()
57 PCLReferenceAssembliesPackage()