nss-pam-ldapd branch master updated. 0.9.0-19-g5adc2ca
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd branch master updated. 0.9.0-19-g5adc2ca
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd branch master updated. 0.9.0-19-g5adc2ca
- Date: Sun, 28 Jul 2013 19:49:53 +0200 (CEST)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nss-pam-ldapd".
The branch, master has been updated
via 5adc2cae8909924dadeac78916d1b14680dc8061 (commit)
from e17730f5bd2ad179dbac47a11d56f86a0ea42f07 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://arthurdejong.org/git/nss-pam-ldapd/commit/?id=5adc2cae8909924dadeac78916d1b14680dc8061
commit 5adc2cae8909924dadeac78916d1b14680dc8061
Author: Arthur de Jong <arthur@arthurdejong.org>
Date: Sat Jul 27 22:18:08 2013 +0200
Have test_pycompile not write any pyc files
We need to avoid writing pyc files because during make distcheck, the
source directory is read-only.
This also ensures that the test is skipped if the Python interpreter is
not found.
diff --git a/tests/test_pycompile.sh b/tests/test_pycompile.sh
index 21a1751..c429b1f 100755
--- a/tests/test_pycompile.sh
+++ b/tests/test_pycompile.sh
@@ -26,5 +26,38 @@ srcdir="${srcdir-`dirname "$0"`}"
top_srcdir="${top_srcdir-${srcdir}/..}"
python="${PYTHON-python}"
-# compile all Python files
-${python} -m compileall -f -q "${top_srcdir}"
+# if Python is missing, ignore
+if ! ${python} --version > /dev/null 2> /dev/null
+then
+ echo "Python (${python}) not found"
+ exit 77
+fi
+
+# compile all Python files (without writing pyc files)
+${python} -c "
+import os
+import py_compile
+import sys
+import traceback
+
+top_srcdir = '$top_srcdir'
+errors_found = 0
+tmpfile = 'tmpfile.pyc'
+
+for root, dirs, files in os.walk(top_srcdir):
+ for f in files:
+ if f.endswith('.py'):
+ filename = os.path.join(root, f)
+ try:
+ py_compile.compile(filename, tmpfile, doraise=True)
+ except py_compile.PyCompileError, e:
+ print 'Compiling %s ...' % os.path.abspath(filename)
+ print e
+ errors_found += 1
+
+os.unlink(tmpfile)
+
+if errors_found:
+ print '%d errors found' % errors_found
+ sys.exit(1)
+"
-----------------------------------------------------------------------
Summary of changes:
tests/test_pycompile.sh | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
hooks/post-receive
--
nss-pam-ldapd
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/
- nss-pam-ldapd branch master updated. 0.9.0-19-g5adc2ca,
Commits of the nss-pam-ldapd project