From 670b12649e34164514fc4981d8fbacfadf1f389e Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Thu, 28 Mar 2013 10:03:43 -0600 Subject: 2to3: Add `from __future__ import ...` to some files that were missed. With the exception of numpy/distutils/tests/test_exec_command.py, all of these files are script files in tools/osxbuild and tools/win32build. The import in the script files omits `absolute_import` as they are not part of a package. --- numpy/distutils/tests/test_exec_command.py | 2 ++ tools/osxbuild/build.py | 1 + tools/osxbuild/install_and_test.py | 5 ++++- tools/win32build/build.py | 12 ++++++++---- tools/win32build/doall.py | 2 ++ tools/win32build/misc/x86analysis.py | 3 ++- tools/win32build/prepare_bootstrap.py | 2 ++ 7 files changed, 21 insertions(+), 6 deletions(-) diff --git a/numpy/distutils/tests/test_exec_command.py b/numpy/distutils/tests/test_exec_command.py index d38c096ba..9b1a9e5d0 100644 --- a/numpy/distutils/tests/test_exec_command.py +++ b/numpy/distutils/tests/test_exec_command.py @@ -1,3 +1,5 @@ +from __future__ import division, absolute_import + import os import sys import StringIO diff --git a/tools/osxbuild/build.py b/tools/osxbuild/build.py index ef6006fa1..7aa9312dd 100644 --- a/tools/osxbuild/build.py +++ b/tools/osxbuild/build.py @@ -10,6 +10,7 @@ built using sudo so file permissions are correct when installed on user system. Script will prompt for sudo pwd. """ +from __future__ import division import os import shutil diff --git a/tools/osxbuild/install_and_test.py b/tools/osxbuild/install_and_test.py index e9b34f5b0..651298b3f 100644 --- a/tools/osxbuild/install_and_test.py +++ b/tools/osxbuild/install_and_test.py @@ -1,5 +1,8 @@ #!/usr/bin/env python -"""Install the built package and run the tests.""" +"""Install the built package and run the tests. + +""" +from __future__ import division import os diff --git a/tools/win32build/build.py b/tools/win32build/build.py index 4acb2e879..43d8a395d 100644 --- a/tools/win32build/build.py +++ b/tools/win32build/build.py @@ -1,11 +1,15 @@ """Python script to build windows binaries to be fed to the "superpack". The script is pretty dumb: it assumes python executables are installed the -standard way, and the location for blas/lapack/atlas is harcoded.""" +standard way, and the location for blas/lapack/atlas is harcoded. + +TODO: + - integrate the x86analysis script to check built binaries + - make the config configurable with a file + +""" +from __future__ import division -# TODO: -# - integrate the x86analysis script to check built binaries -# - make the config configurable with a file import sys import subprocess import os diff --git a/tools/win32build/doall.py b/tools/win32build/doall.py index eb07394ea..e9866122e 100644 --- a/tools/win32build/doall.py +++ b/tools/win32build/doall.py @@ -1,3 +1,5 @@ +from __future__ import division + import subprocess import os diff --git a/tools/win32build/misc/x86analysis.py b/tools/win32build/misc/x86analysis.py index bccf0171c..e5eb886b4 100644 --- a/tools/win32build/misc/x86analysis.py +++ b/tools/win32build/misc/x86analysis.py @@ -5,6 +5,7 @@ # checking the assembly for instructions specific to sse, etc... Obviously, # this won't work all the times (for example, if some instructions are used # only after proper detection of the running CPU, this will give false alarm). +from __future__ import division import sys import re @@ -57,7 +58,7 @@ SSE2_SET = ["addpd", "addsd", "andnpd", "andpd", "clflush", "cmppd", "cmpsd", "sqrtsd", "subpd", "subsd", "ucomisd", "unpckhpd", "unpcklpd", "xorpd"] SSE3_SET = [ "addsubpd", "addsubps", "haddpd", "haddps", "hsubpd", "hsubps", - "lddqu", "movddup", "movshdup", "movsldup", "fisttp"] + "lddqu", "movddup", "movshdup", "movsldup", "fisttp"] def get_vendor_string(): """Return the vendor string reading cpuinfo.""" diff --git a/tools/win32build/prepare_bootstrap.py b/tools/win32build/prepare_bootstrap.py index f1d8edbfb..d5822b83e 100644 --- a/tools/win32build/prepare_bootstrap.py +++ b/tools/win32build/prepare_bootstrap.py @@ -1,3 +1,5 @@ +from __future__ import division + import os import subprocess import shutil -- cgit v1.2.3