summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-04-24 22:25:56 +0000
committerGreg Noel <GregNoel@tigris.org>2010-04-24 22:25:56 +0000
commit176e5aa1f01a461939f5bd72ffd0dd8db9a175da (patch)
treebbdcd3f7da00dc5fcfa712bfaf148f392ac12fda /bin
parent8d23e18390f93d99ea18c8d2d7a38a1dd0c79dd8 (diff)
downloadscons-176e5aa1f01a461939f5bd72ffd0dd8db9a175da.tar.gz
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 c5d45ce6..f377869e 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 7dd4c20c..6f49dcad 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 e9ebcf89..77bda58f 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