forked from Samsung/TizenFX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Build] Set TFM supported by Tizen to vconf (Samsung#2026)
* Added to update TFM with maketfm.py Co-authored-by: Hyungju Lee <[email protected]>
- Loading branch information
1 parent
a9420fe
commit b10f9f9
Showing
4 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import os | ||
import xml.etree.ElementTree as ET | ||
|
||
scrpit_dir = os.path.dirname(os.path.abspath(__file__)) | ||
spec_dir = os.path.join(scrpit_dir, "csapi-tizenfx.spec") | ||
tree = ET.parse("../pkg/Tizen.NET/Tizen.NET.nuspec") | ||
root = tree.getroot() | ||
|
||
tfm_list = [] | ||
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) | ||
|
||
tfm_list = list(set(tfm_list)) | ||
tfm_list.sort(reverse=True) | ||
|
||
f = open(spec_dir,'r') | ||
origin_data = f.read() | ||
f.close() | ||
|
||
new_data = origin_data.replace("@tfm_support@", ':'.join(tfm_list)) | ||
|
||
f = open(spec_dir, 'w') | ||
f.write(new_data) | ||
f.close() |