from .xlate import XLATOR
-__version__ = '0.6.0'
+__version__ = '0.6.1'
LOG = logging.getLogger(__name__)
self._issues_url = None
self.operatingsystem_support = []
self.tags = []
+ self._pdk_version = None
super(ModuleMetadata, self).__init__(
appname=appname, verbose=verbose, version=version,
return
self._version = to_str(value).strip()
+ # -------------------------------------------------------------------------
+ @property
+ def pdk_version(self):
+ """The used PDK version of the module."""
+ return self._pdk_version
+
+ @pdk_version.setter
+ def pdk_version(self, value):
+ if value is None:
+ self._pdk_version = None
+ return
+ self._pdk_version = to_str(value).strip()
+
# -------------------------------------------------------------------------
@property
def author(self):
res['name'] = self.name
res['version'] = self.version
+ res['pdk_version'] = self.pdk_version
res['author'] = self.author
res['license'] = self.license
res['summary'] = self.summary
if tg:
self.tags.append(tg)
+ if 'pdk-version' in json_data:
+ self.pdk_version = json_data['pdk-version']
+
self.initialized = True
if self.verbose > 3:
LOG.debug("ModuleMetadata:\n{}".format(pp(self.as_dict())))
new.operatingsystem_support.append(copy.copy(supp))
for tag in self.tags:
new.tags.append(tag)
+ new.pdk_version = self.pdk_version
new.initialized = True
data['tags'] = []
for tag in self.tags:
data['tags'].append(tag)
+ if self.pdk_version:
+ data['pdk-version'] = self.pdk_version
if self.verbose > 4:
LOG.debug("ModuleMetadata:\n{}".format(pp(data)))