]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add license header to Python files.
authorbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 5 Jan 2007 21:08:32 +0000 (21:08 +0000)
committerbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 5 Jan 2007 21:08:32 +0000 (21:08 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2177 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Python/Calc-Deps.py
Tools/Python/ContextTool.py
Tools/Python/Fd.py
Tools/Python/MkFar.py
Tools/Python/WorkspaceRoutines.py
Tools/Python/XmlRoutines.py

index 204379a3cb682a19f66be69c676f5454b155be28..b022a907ae118f2adc6d159ff4b5ecf9a6dbf609 100755 (executable)
@@ -1,5 +1,14 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
+# Copyright (c) 2007, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+# 
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
 """Calculate the dependencies a given module has by looking through the source
 code to see what guids and functions are referenced to see which Packages and
 Library Classes need to be referenced. """
 """Calculate the dependencies a given module has by looking through the source
 code to see what guids and functions are referenced to see which Packages and
 Library Classes need to be referenced. """
index 3c95adb09d1d49b80d90768da284737b148636cb..0dfd5c65b45346c2ce783c1058cc0dd5ea3801aa 100755 (executable)
@@ -1,6 +1,16 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
-# The EDK II Build System Context Tool Utility maintains Target.txt settings in an EDK II Workspace.
+# Copyright (c) 2007, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+# 
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+"""The EDK II Build System Context Tool Utility maintains Target.txt settings
+in an EDK II Workspace."""
 
 import wx, os, sys, copy
 from EdkIIWorkspace import *
 
 import wx, os, sys, copy
 from EdkIIWorkspace import *
index f71cc07171d14a4fdbc07f974d0a2095e1871b75..f8b26059e7aaeda294dc1caec0cbca961fb9e651 100755 (executable)
@@ -1,7 +1,16 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
-# An EDK II Build System Framework Database Utility maintains FrameworkDatabase.db 
-#  settings in an EDK II Workspace.
+# Copyright (c) 2007, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+# 
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+"""An EDK II Build System Framework Database Utility maintains
+FrameworkDatabase.db settings in an EDK II Workspace."""
 
 import wx, os, sys, copy
 from EdkIIWorkspace import *
 
 import wx, os, sys, copy
 from EdkIIWorkspace import *
@@ -570,4 +579,4 @@ if __name__ == '__main__':
   frame = Frame()
   frame.Show()
   app.MainLoop()
   frame = Frame()
   frame.Show()
   app.MainLoop()
-  
\ No newline at end of file
+  
index 327c81a94a28e3033128fbb91ab7f5ed5ce64f43..9c6cc5de55a191de02cf8b24903c9bffb3b1973e 100755 (executable)
@@ -1,5 +1,8 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
+"""This is a python script that takes user input from the command line and
+creates a far (Framework Archive Manifest) file for distribution."""
+
 import os, sys, getopt, string, xml.dom.minidom, zipfile, md5
 from XmlRoutines import *
 from WorkspaceRoutines import *
 import os, sys, getopt, string, xml.dom.minidom, zipfile, md5
 from XmlRoutines import *
 from WorkspaceRoutines import *
@@ -20,9 +23,13 @@ class Far:
     far.ExtraFiles=[]
 
 far = Far()
     far.ExtraFiles=[]
 
 far = Far()
+"""The far object is constructed from the template file the user passed in."""
 
 def parseMsa(msaFile, spdDir):
 
 
 def parseMsa(msaFile, spdDir):
 
+  """ XXX Parse an msa file and return a list of all the files that this msa
+  includes."""
+
   filelist = [msaFile]
 
   msaDir = os.path.dirname(msaFile)
   filelist = [msaFile]
 
   msaDir = os.path.dirname(msaFile)
@@ -41,6 +48,9 @@ def parseMsa(msaFile, spdDir):
 
 def parseSpd(spdFile):
 
 
 def parseSpd(spdFile):
 
+  """Parse an spd file and return a list of all the files that this spd
+  includes."""
+
   files = []
 
   spdDir = os.path.dirname(spdFile)
   files = []
 
   spdDir = os.path.dirname(spdFile)
@@ -75,6 +85,9 @@ def parseSpd(spdFile):
 
 def makeFarHeader(doc):
 
 
 def makeFarHeader(doc):
 
+  """Create a dom tree for the Far Header. It will use information from the
+  template file passed on the command line, if present."""
+
   header = doc.createElement("FarHeader")
   name = doc.createElement("FarName")
   name.appendChild(doc.createTextNode(far.FarName))
   header = doc.createElement("FarHeader")
   name = doc.createElement("FarName")
   name.appendChild(doc.createTextNode(far.FarName))
@@ -105,6 +118,8 @@ def makeFarHeader(doc):
 
 def getSpdGuidVersion(spdFile):
 
 
 def getSpdGuidVersion(spdFile):
 
+  """Returns a tuple (guid, version) which is read from the given spdFile."""
+
   spd = xml.dom.minidom.parse(inWorkspace(spdFile))
 
   return (XmlElement(spd, "/PackageSurfaceArea/SpdHeader/GuidValue"),
   spd = xml.dom.minidom.parse(inWorkspace(spdFile))
 
   return (XmlElement(spd, "/PackageSurfaceArea/SpdHeader/GuidValue"),
@@ -112,6 +127,8 @@ def getSpdGuidVersion(spdFile):
 
 def makeFar(files, farname):
 
 
 def makeFar(files, farname):
 
+  """Make a far out of the given filelist and writes it to the file farname."""
+
   domImpl = xml.dom.minidom.getDOMImplementation()
   man = domImpl.createDocument(None, "FrameworkArchiveManifest", None)
   top_element = man.documentElement
   domImpl = xml.dom.minidom.getDOMImplementation()
   man = domImpl.createDocument(None, "FrameworkArchiveManifest", None)
   top_element = man.documentElement
@@ -197,6 +214,10 @@ def makeFar(files, farname):
   return
 
 def farFileNode(doc, filename):
   return
 
 def farFileNode(doc, filename):
+
+  """This is a function that returns a dom tree for a given file that is
+  included in the far. An md5sum is calculated for that file."""
+
   content = doc.createElement("FarFilename")
   f=open(filename, "rb")
   content.setAttribute("Md5sum", md5.md5(f.read()).hexdigest())
   content = doc.createElement("FarFilename")
   f=open(filename, "rb")
   content.setAttribute("Md5sum", md5.md5(f.read()).hexdigest())
index a34eff2d7177a597b605edff7e0d7bbc85be0031..3634d256617d0ec8aed7c205cca39fe136f5a161 100755 (executable)
@@ -1,5 +1,14 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
+# Copyright (c) 2007, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+# 
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
 import os, sys, re, getopt, string, glob, xml.dom.minidom, pprint, md5, socket, getpass, time, random
 
 def inWorkspace(rel_path=""):
 import os, sys, re, getopt, string, glob, xml.dom.minidom, pprint, md5, socket, getpass, time, random
 
 def inWorkspace(rel_path=""):
index 2707bcbb978c4fc08411c055cedf6a01e27b82cf..53f5aa8f6157057b24cdf4d965923be3859d6c0e 100755 (executable)
@@ -1,7 +1,16 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
-# This is an XML API that uses a syntax similar to XPath, but it is written in
-# standard python so that no extra python packages are required to use it.
+# Copyright (c) 2007, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+# 
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+"""This is an XML API that uses a syntax similar to XPath, but it is written in
+standard python so that no extra python packages are required to use it."""
 
 import xml.dom.minidom
 
 
 import xml.dom.minidom
 
@@ -35,10 +44,10 @@ def XmlElementData (Dom):
   """Get the text for this element."""
   return Dom.firstChild.data.strip()
 
   """Get the text for this element."""
   return Dom.firstChild.data.strip()
 
-def XmlAttribute (Dom, String):
-  """Return a single attribute that named by String."""
+def XmlAttribute (Dom, AttName):
+  """Return a single attribute named AttName."""
   try:
   try:
-    return Dom.getAttribute(String)
+    return Dom.getAttribute(AttName)
   except:
     return ''
 
   except:
     return ''