New subject: [PATCH 1/2] Add check for #! in *.py files
We don't want to have any *.py files as executable scripts, so hashbangs
never make sense.
---
check | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/check b/check
index 660c8cf..b9ed2d5 100755
--- a/check
+++ b/check
@@ -58,6 +58,16 @@ then
fi
;;
esac
+
+ case "$x" in
+ *.py)
+ if head -1 "$x" | grep '^#!' > /dev/null
+ then
+ echo "ERROR: $x has a hashbang" 1>&2
+ errors=1
+ fi
+ ;;
+ esac
done
fi
exit $errors
--
1.7.2.5
The proper way to run setup.py is with "python setup.py". That allows
you to choose the right Python version to use.
---
setup.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/setup.py b/setup.py
index f047131..eceb705 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2011, 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
--
1.7.2.5