aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2013-06-07 11:46:26 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2013-06-07 11:46:26 -0400
commit263f9fdf54de12fb10ab18949afd8bc515cd61ac (patch)
tree15f9cfa702b615fbc986b71fec3a5bbb1f2a1343
parent85d13294c7570cc32e75c0413924672e72ff3f60 (diff)
downloadipsutils-263f9fdf54de12fb10ab18949afd8bc515cd61ac.tar.gz
Add docstrings
-rw-r--r--ipsutils/build.py8
-rw-r--r--ipsutils/config.py7
-rw-r--r--ipsutils/env.py4
3 files changed, 16 insertions, 3 deletions
diff --git a/ipsutils/build.py b/ipsutils/build.py
index b214d42..ec3d2ab 100644
--- a/ipsutils/build.py
+++ b/ipsutils/build.py
@@ -20,11 +20,13 @@ import os
class Build(env.Environment):
def __init__(self, ipsfile, *args, **kwargs):
- # Parent Config parses configuration data in .ips file
- # Inherited members are used to populate package information
- # as well as build tasks
+ """Enqueue's build tasks in the controller stack and fire's off the
+ build procedure.
+ """
super(Build, self).__init__(ipsfile)
self.ipsfile = ipsfile
+ # Inherited members are used to populate package information
+ # as well as build tasks
if 'options' in kwargs:
self.options = kwargs['options']
diff --git a/ipsutils/config.py b/ipsutils/config.py
index bd5b8ce..756d8fa 100644
--- a/ipsutils/config.py
+++ b/ipsutils/config.py
@@ -19,7 +19,11 @@ import collections
class Config(object):
def __init__(self, ipsfile=''):
+ """SPEC file parsing engine.
+ """
super(Config, self).__init__()
+
+ #Defines possible FMRI section keywords used by IPS
key_dict = collections.OrderedDict()
key_dict['name'] = ''
key_dict['repackage'] = ''
@@ -35,6 +39,7 @@ class Config(object):
key_dict['classification'] = ''
key_dict['description'] = ''
+ #Define valid build script sections in SPEC file
script_dict = collections.OrderedDict()
script_dict['prep'] = []
script_dict['build'] = []
@@ -99,6 +104,8 @@ class Config(object):
exit(1)
def check_keywords(self):
+ """Validate SPEC file's FMRI section
+ """
mandatory = ['arch', 'classification', 'description', 'group',
'license', 'maintainer', 'name', 'release', 'source_url', 'summary',
'version']
diff --git a/ipsutils/env.py b/ipsutils/env.py
index 2056c88..ce9dd21 100644
--- a/ipsutils/env.py
+++ b/ipsutils/env.py
@@ -20,6 +20,10 @@ from . import config
class Environment(config.Config):
def __init__(self, ipsfile):
+ """Implements an extended environment from the Config class.
+
+ ipsfile = A valid SPEC file
+ """
super(Environment, self).__init__(ipsfile)
# Platform specific ipsbuild directory assignment