tree = ET.parse(nuspec_file)
root = tree.getroot()
-tfm_list = []
+tfm_list1 = []
+tfm_list2 = []
for meta_child in root.iter():
if meta_child.tag == "{http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd}metadata":
for depen_child in meta_child:
if depen_child.tag == "{http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd}dependencies":
for group in depen_child:
tfm = group.attrib["targetFramework"].lower()
- tfm = tfm.replace(".", "")
- tfm = tfm.replace("20", "2.0")
- if tfm.strip():
- tfm_list.append(tfm)
+ if tfm.startswith("tizen"):
+ if len(tfm) == 8:
+ tfm_list1.append(tfm.replace(".", "").strip())
+ else:
+ tfm_list2.append(tfm.strip())
-tfm_list = list(set(tfm_list))
-tfm_list.sort(reverse=True)
+tfm_list1 = list(set(tfm_list1))
+tfm_list1.sort(reverse=True)
+tfm_list2 = list(set(tfm_list2))
+tfm_list2.sort(reverse=True)
+tfm_list = tfm_list2 + tfm_list1
f = open(spec_dir,'r')
origin_data = f.read()