linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #01463
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2173: support installs that only have an asciidoc.py file but no executable
------------------------------------------------------------
revno: 2173
committer: poy <poy@xxxxxxxxxx>
branch nick: repo
timestamp: Thu 2010-07-01 19:43:48 +0200
message:
support installs that only have an asciidoc.py file but no executable
modified:
build_util.py
help/SConscript
help/gen_compile.py
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'build_util.py'
--- build_util.py 2009-09-17 20:34:04 +0000
+++ build_util.py 2010-07-01 17:43:48 +0000
@@ -126,6 +126,21 @@
return ret
+ # support installs that only have an asciidoc.py file but no executable
+ def get_asciidoc(self):
+ if 'PATHEXT' in self.env['ENV']:
+ pathext = self.env['ENV']['PATHEXT'] + ';.py'
+ else:
+ pathext = ''
+ asciidoc = self.env.WhereIs('asciidoc', pathext = pathext)
+ if asciidoc is None:
+ return None
+ if asciidoc[-3:] == '.py':
+ if self.env.WhereIs('python') is None:
+ return None
+ asciidoc = 'python ' + asciidoc
+ return asciidoc
+
# source is *one* SCons file node (not a list!) designating the .po file
# env must contain 'NAME_FILE', which is a SCons file node to the target file
def gen_po_name(source, env):
=== modified file 'help/SConscript'
--- help/SConscript 2010-06-30 16:08:57 +0000
+++ help/SConscript 2010-07-01 17:43:48 +0000
@@ -32,7 +32,8 @@
print 'Perl is required to run po4a scripts, skipping help build'
Return()
-if env.WhereIs('asciidoc') is None:
+env['asciidoc'] = dev.get_asciidoc()
+if env['asciidoc'] is None:
print 'asciidoc is required to process Compile.txt, skipping help build'
Return()
=== modified file 'help/gen_compile.py'
--- help/gen_compile.py 2010-06-30 16:08:57 +0000
+++ help/gen_compile.py 2010-07-01 17:43:48 +0000
@@ -1,5 +1,5 @@
def gen_compile(target, source, env):
- env.Execute('asciidoc -s -o"' + str(target[0]) + '" "' + str(source[0]) + '"')
+ env.Execute(env['asciidoc'] + ' -s -o"' + str(target[0]) + '" "' + str(source[0]) + '"')
f = open(str(source[1]), "rb")
template = f.read()