From 11f9b3e2837ea214ee8cccf69704b3314a8ffba9 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 24 Sep 2016 21:06:15 +0300 Subject: [PATCH] Exclude .tox/ virtual environments when compiling byte code --- add-pubkey/post-checkout | 4 ++-- hooks/post-checkout/compyle | 4 ++-- hooks/post-checkout/compyle-all | 4 ++-- hooks/post-merge | 4 ++-- hooks/post-rewrite | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/add-pubkey/post-checkout b/add-pubkey/post-checkout index 7394a62..19ac074 100755 --- a/add-pubkey/post-checkout +++ b/add-pubkey/post-checkout @@ -11,8 +11,8 @@ if [ \( "$new_branch" = 1 \) ]; then if [ "$new_HEAD" = "`git rev-parse phd-pubkey`" ]; then git clean -d -f -q else - python2.7 -m compileall -q . && - python2.7 -O -m compileall -q . + python -m compileall -q -x '\.tox/.+' . && + python -O -m compileall -q -x '\.tox/.+' . fi fi diff --git a/hooks/post-checkout/compyle b/hooks/post-checkout/compyle index dce8b01..0952d43 100755 --- a/hooks/post-checkout/compyle +++ b/hooks/post-checkout/compyle @@ -8,8 +8,8 @@ new_HEAD="$2" new_branch="$3" if [ "$new_branch" = 1 ]; then - python2.7 -m compileall -q . && - python2.7 -O -m compileall -q . + python -m compileall -q -x '\.tox/.+' . && + python -O -m compileall -q -x '\.tox/.+' . fi exit 0 diff --git a/hooks/post-checkout/compyle-all b/hooks/post-checkout/compyle-all index daf6ab3..d4887f6 100755 --- a/hooks/post-checkout/compyle-all +++ b/hooks/post-checkout/compyle-all @@ -2,7 +2,7 @@ # post-checkout hook that compiles python files to byte code -python2.7 -m compileall -q . && -python2.7 -O -m compileall -q . +python -m compileall -q -x '\.tox/.+' . && +python -O -m compileall -q -x '\.tox/.+' . exit 0 diff --git a/hooks/post-merge b/hooks/post-merge index 3bdcf5e..633a1d0 100755 --- a/hooks/post-merge +++ b/hooks/post-merge @@ -2,7 +2,7 @@ # post-merge hook that compiles python files to byte code -python2.7 -m compileall -q . && -python2.7 -O -m compileall -q . +python -m compileall -q -x '\.tox/.+' . && +python -O -m compileall -q -x '\.tox/.+' . exit 0 diff --git a/hooks/post-rewrite b/hooks/post-rewrite index 02466f9..df28442 100755 --- a/hooks/post-rewrite +++ b/hooks/post-rewrite @@ -2,7 +2,7 @@ # post-rewrite hook that compiles python files to byte code -python2.7 -m compileall -q . && -python2.7 -O -m compileall -q . +python -m compileall -q -x '\.tox/.+' . && +python -O -m compileall -q -x '\.tox/.+' . exit 0 -- 2.39.5