Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Correctly checks environment for addons

  • Loading branch information...
commit 47ee1da726673b5d7a977e4fb4d18df30338b0f1 1 parent ef5ab72
@josephwecker authored
View
7 INSTALL
@@ -1,6 +1,11 @@
Very soon there should be packages for installing via apt and brew. But in any
case, here's what you need to do manually:
-Put bin/
+Put bin/construct somewhere where you have your binaries (such as /usr/local/bin )
+Add the following environment variable to your .bash_profile or .profile or
+.bashrc :
+ export CONSTRUCT_ADDONS="...path-to.../construct/lib"
+
+(replacing with the actual path to the lib directory of course)
View
4 README.asciidoc
@@ -48,7 +48,7 @@ construct [options] construction-files
==== Basic sequence of events
1. Load addons (unless -A which disables addons)
- * Loads from '/etc/construct/addons/*' first
+ * Loads from '$CONSTRUCT_ADDONS/*' first
* Then loads from '~/.construct/'
* Then loads from any '.construct' files in the current directory
* Then loads from any '.construct' files in any parent directories unless -P
@@ -69,7 +69,7 @@ construct [options] construction-files
'construct'::
command-line command. Either specify a rule file(s) or it looks for
construction file in current directory.
-'/etc/construct/addons/*'::
+'$CONSTRUCT_ADDONS/*'::
global addons (python files that get imported)
'~/.construct/*'::
user-local addons
View
3  bin/construct
@@ -1159,7 +1159,8 @@ if __name__ == '__main__':
# Look: /etc/construct/addons, ~/.construct, then local .construct's
if not options.no_addons:
addons = Addons()
- addons.find_in('etc','construct','addons')
+ if os.environ['CONSTRUCT_ADDONS']:
+ addons.find_in(os.path.expandvars('$CONSTRUCT_ADDONS'))
addons.find_in('~','.construct')
if not options.no_parent_addons:
(wd, _cwd) = os.path.split(os.path.abspath(os.getcwd()))
View
7 lib/construct_basics.py
@@ -1,4 +1,3 @@
-
-
-def testing_this():
- print 'testing this!\n'
+def construct(*args):
+ ''' A way to spawn children construct statements.'''
+ pass
Please sign in to comment.
Something went wrong with that request. Please try again.