summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-04-24 22:25:56 (GMT)
committerGreg Noel <GregNoel@tigris.org>2010-04-24 22:25:56 (GMT)
commitbcdc9a412521ae0b9f9aea7997a880af6dbda2a6 (patch)
treebbdcd3f7da00dc5fcfa712bfaf148f392ac12fda /bin
parented90f2420a34f20480311261cf8663803ca65b6e (diff)
downloadSCons-bcdc9a412521ae0b9f9aea7997a880af6dbda2a6.zip
SCons-bcdc9a412521ae0b9f9aea7997a880af6dbda2a6.tar.gz
SCons-bcdc9a412521ae0b9f9aea7997a880af6dbda2a6.tar.bz2
Convert to Python 3.x division rules.
Diffstat (limited to 'bin')
-rw-r--r--bin/calibrate.py3
-rw-r--r--bin/linecount.py1
-rwxr-xr-xbin/svn-bisect.py3
3 files changed, 5 insertions, 2 deletions
diff --git a/bin/calibrate.py b/bin/calibrate.py
index c5d45ce..f377869 100644
--- a/bin/calibrate.py
+++ b/bin/calibrate.py
@@ -20,6 +20,7 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+from __future__ import division
import optparse
import os
@@ -71,7 +72,7 @@ def main(argv=None):
good = 0
for v in vm.groups():
var, value = v.split('=', 1)
- value = int((int(value) * opts.max) / elapsed)
+ value = int((int(value) * opts.max) // elapsed)
os.environ[var] = str(value)
run += 1
diff --git a/bin/linecount.py b/bin/linecount.py
index 7dd4c20..6f49dca 100644
--- a/bin/linecount.py
+++ b/bin/linecount.py
@@ -21,6 +21,7 @@
# in each category, the number of non-blank lines, and the number of
# non-comment lines. The last figure (non-comment) lines is the most
# interesting one for most purposes.
+from __future__ import division
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/bin/svn-bisect.py b/bin/svn-bisect.py
index e9ebcf8..77bda58 100755
--- a/bin/svn-bisect.py
+++ b/bin/svn-bisect.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
# -*- Python -*-
+from __future__ import division
import sys
from math import log, ceil
@@ -52,7 +53,7 @@ msg = "****** max %d revisions to test (bug bracketed by [%d,%d])"
while upper-lower > 1:
print msg % (ceil(log(upper-lower,2)), lower, upper)
- mid = int((lower + upper)/2)
+ mid = (lower + upper)//2
midfails = testfail(mid)
if midfails == lowerfails:
lower = mid