Skip to content

Commit

Permalink
Precompile *.py files and generate the Twisted dropin.cache
Browse files Browse the repository at this point in the history
  • Loading branch information
m0rgen committed Mar 1, 2017
1 parent 05ef4a9 commit 56b4197
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion support/Apple.make
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,16 @@ install-python:: build
$(_v) find "$(DSTROOT)$(CS_VIRTUALENV)" -type f -size 0 -name "*.h" -exec sh -c 'printf "/* empty */\n" > {}' ";";
@echo "Remving executable flag from .c files...";
$(_v) find "$(DSTROOT)$(CS_VIRTUALENV)" -type f -name "*.c" -print0 | xargs -0 $(CHMOD) -x;

@#
@# Compile to .pyc files
@#
@echo "Compiling to .pyc files..."
$(_v) "$(DSTROOT)$(CS_VIRTUALENV)/bin/python" -m compileall "$(DSTROOT)$(CS_VIRTUALENV)/lib/python2.7/site-packages";
@#
@# Force Twisted to generate dropin.cache
@#
@echo "Generating Twisted dropin.cache..."
$(_v) "$(DSTROOT)$(CS_VIRTUALENV)/bin/python" -c "from twisted.plugin import IPlugin, getPlugins; list(getPlugins(IPlugin))";
@#
@# Undo virtualenv so we use the python-wrapper
@#
Expand Down

0 comments on commit 56b4197

Please sign in to comment.