allow executable files override from env

* PY, PELICAN
This commit is contained in:
yac 2013-05-30 19:32:23 +02:00
commit 8536cacf5f
3 changed files with 6 additions and 6 deletions

View file

@ -248,9 +248,9 @@ needed by Pelican.
try:
with codecs.open(os.path.join(CONF['basedir'], 'Makefile'), 'w', 'utf-8') as fd:
mkfile_template_name = 'Makefile'
py_v = 'PY=python'
py_v = 'PY?=python'
if six.PY3:
py_v = 'PY=python3'
py_v = 'PY?=python3'
template = string.Template(py_v)
fd.write(template.safe_substitute(CONF))
fd.write('\n')
@ -270,9 +270,9 @@ needed by Pelican.
try:
with codecs.open(os.path.join(CONF['basedir'], 'develop_server.sh'), 'w', 'utf-8') as fd:
lines = list(get_template('develop_server.sh'))
py_v = 'PY=python\n'
py_v = 'PY=${PY:-python}\n'
if six.PY3:
py_v = 'PY=python3\n'
py_v = 'PY=${PY:-python3}\n'
lines = lines[:4] + [py_v] + lines[4:]
for line in lines:
template = string.Template(line)

View file

@ -1,4 +1,4 @@
PELICAN=$pelican
PELICAN?=$pelican
PELICANOPTS=$pelicanopts
BASEDIR=$$(CURDIR)

View file

@ -2,7 +2,7 @@
##
# This section should match your Makefile
##
PELICAN=$pelican
PELICAN=$${PELICAN:-$pelican}
PELICANOPTS=$pelicanopts
BASEDIR=$$(pwd)