mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-21 17:35:55 +01:00
./waf-light --interpreter "#! /usr/bin/env python3" - for #1856
This commit is contained in:
parent
ec9081e81c
commit
f9f6dbfa50
6
wscript
6
wscript
@ -82,6 +82,9 @@ def options(opt):
|
||||
opt.add_option('--make-waf', action='store_true', default=True,
|
||||
help='creates the waf script', dest='waf')
|
||||
|
||||
opt.add_option('--interpreter', action='store', default=None,
|
||||
help='specify the #! line on top of the waf file', dest='interpreter')
|
||||
|
||||
opt.add_option('--sign', action='store_true', default=False, help='make a signed file', dest='signed')
|
||||
|
||||
default_zip = 'bz2'
|
||||
@ -386,6 +389,9 @@ def create_waf(self, *k, **kw):
|
||||
(cnt, C1) = find_unused(cnt, '\n')
|
||||
ccc = code1.replace("C1='x'", "C1='%s'" % C1).replace("C2='x'", "C2='%s'" % C2).replace("C3='x'", "C3='%s'" % C3)
|
||||
|
||||
if getattr(Options.options, 'interpreter', None):
|
||||
ccc = ccc.replace('#!/usr/bin/env python', Options.options.interpreter)
|
||||
|
||||
f = open('waf', 'wb')
|
||||
try:
|
||||
f.write(ccc.encode())
|
||||
|
Loading…
Reference in New Issue
Block a user