← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:fix-pythonpath-byte-compilation into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:fix-pythonpath-byte-compilation into launchpad:master.

Commit message:
copy-apache-config: Byte-compile using $(PYTHON), not $(PY)

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/409676

`make copy-apache-config` (called from `make install`) has to byte-compile `scripts/_pythonpath.py` to avoid problems with Apache doing so as root.  However, Launchpad's virtualenv may not exist yet, as for example when `make install` is being run by `rocketfuel-setup`, so we need to use the system Python rather than the one in the virtualenv.  The Python version is the same either way, so this makes no difference to byte-compilation.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:fix-pythonpath-byte-compilation into launchpad:master.
diff --git a/Makefile b/Makefile
index 2e3955b..ffaa831 100644
--- a/Makefile
+++ b/Makefile
@@ -474,7 +474,7 @@ copy-certificates:
 copy-apache-config: codehosting-dir
 	# Byte-compile scripts/_pythonpath.py first, otherwise Apache may do
 	# so as root and cause permission problems.
-	$(PY) -m py_compile scripts/_pythonpath.py
+	$(PYTHON) -m py_compile scripts/_pythonpath.py
 	# We insert the absolute path to the branch-rewrite script
 	# into the Apache config as we copy the file into position.
 	set -e; \