Skip to content

Commit

Permalink
Merge pull request #44 from prakashb72/dev2
Browse files Browse the repository at this point in the history
Removed the dependency of setuptool module from xmlcli
  • Loading branch information
prakashb72 authored Jul 2, 2024
2 parents a258f53 + 5171ebc commit 0d6729e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/xmlcli/UefiFwParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ def GetsetBiosKnobsFromBin(BiosBinaryFile=0, BiosOutSufix=0, Operation='genxml',
if (XmlFilename == 0):
XmlFilename = os.path.join(clb.TempFolder, '%s_FwInfo.xml' %BiosIdString)
file_content = '<SYSTEM>\n'
'\t<PLATFORM NAME=\"Generated by XmlCli Ref. Scripts Version %d.%d.%d - xmlcli.UefiFwParser.py\"/>\n' %(clb.__version__.version[0], clb.__version__.version[1], clb.__version__.version[2])
'\t<PLATFORM NAME=\"Generated by XmlCli Ref. Scripts Version %s - xmlcli.UefiFwParser.py\"/>\n' % clb.__version__
BiosIdLst = BiosIdString.split('.')
BiosDate = BiosIdLst[len(BiosIdLst)-1]
if(FoundPcBuild):
Expand Down
22 changes: 14 additions & 8 deletions src/xmlcli/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
from distutils.version import LooseVersion
class Version:
def __init__(self, major, minor, build, tag=""):
self.major=major
self.minor=minor
self.build=build
self.tag=tag

def __str__(self):
return f"{self.major}.{self.minor}.{self.build}{self.tag}"

# MAJOR ----------
# incremented any time you change the API that may break backwards compatibility
Expand All @@ -7,12 +15,10 @@
# MINOR ------------
MINOR = 0
# BUILD ------
BUILD = 4 # or __revision__
BUILD = 5 # or __revision__
# TAG -------
TAG = ""
__version__ = LooseVersion("{major}.{minor}.{build}{tag}".format(
major=MAJOR,
minor=MINOR,
build=BUILD,
tag=TAG
))

version_instance = Version(MAJOR, MINOR, BUILD, TAG)

__version__ = str(version_instance)

0 comments on commit 0d6729e

Please sign in to comment.