diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py index a6045256..125a4bbe 100755 --- a/pelican/tools/pelican_quickstart.py +++ b/pelican/tools/pelican_quickstart.py @@ -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) diff --git a/pelican/tools/templates/Makefile.in b/pelican/tools/templates/Makefile.in index 221568aa..dd5181ca 100644 --- a/pelican/tools/templates/Makefile.in +++ b/pelican/tools/templates/Makefile.in @@ -1,4 +1,4 @@ -PELICAN=$pelican +PELICAN?=$pelican PELICANOPTS=$pelicanopts BASEDIR=$$(CURDIR) diff --git a/pelican/tools/templates/develop_server.sh.in b/pelican/tools/templates/develop_server.sh.in index 6dd11e6d..5c1c1530 100755 --- a/pelican/tools/templates/develop_server.sh.in +++ b/pelican/tools/templates/develop_server.sh.in @@ -2,7 +2,7 @@ ## # This section should match your Makefile ## -PELICAN=$pelican +PELICAN=$${PELICAN:-$pelican} PELICANOPTS=$pelicanopts BASEDIR=$$(pwd)