diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-04-06 13:25:26 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-04-06 13:25:26 -0600 |
commit | bb726ca19f434f5055c0efceefe48d89469fcbbe (patch) | |
tree | 889782afaf67fd5acb5f222969251871c0c46e5a /tools/osxbuild/build.py | |
parent | 7441fa50523f5b4a16c854bf004d675e5bd86ab8 (diff) | |
download | numpy-bb726ca19f434f5055c0efceefe48d89469fcbbe.tar.gz |
2to3: Apply `print` fixer.
Add `print_function` to all `from __future__ import ...` statements
and use the python3 print function syntax everywhere.
Closes #3078.
Diffstat (limited to 'tools/osxbuild/build.py')
-rw-r--r-- | tools/osxbuild/build.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/osxbuild/build.py b/tools/osxbuild/build.py index 7aa9312dd..71d37889d 100644 --- a/tools/osxbuild/build.py +++ b/tools/osxbuild/build.py @@ -10,7 +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 +from __future__ import division, print_function import os import shutil @@ -26,9 +26,9 @@ BUILD_DIR = 'build' DIST_DIR = 'dist' def remove_dirs(): - print 'Removing old build and distribution directories...' - print """The distribution is built as root, so the files have the correct - permissions when installed by the user. Chown them to user for removal.""" + print('Removing old build and distribution directories...') + print("""The distribution is built as root, so the files have the correct + permissions when installed by the user. Chown them to user for removal.""") if os.path.exists(BUILD_DIR): cmd = 'sudo chown -R %s %s' % (getuser(), BUILD_DIR) shellcmd(cmd) @@ -39,12 +39,12 @@ def remove_dirs(): shutil.rmtree(DIST_DIR) def build_dist(): - print 'Building distribution... (using sudo)' + print('Building distribution... (using sudo)') cmd = 'sudo python setupegg.py bdist_mpkg' shellcmd(cmd) def build_dmg(): - print 'Building disk image...' + print('Building disk image...') # Since we removed the dist directory at the start of the script, # our pkg should be the only file there. pkg = os.listdir(DIST_DIR)[0] @@ -60,19 +60,19 @@ def copy_readme(): """Copy a user README with info regarding the website, instead of the developer README which tells one how to build the source. """ - print 'Copy user README.txt for installer.' + print('Copy user README.txt for installer.') shutil.copy(USER_README, DEV_README) def revert_readme(): """Revert the developer README.""" - print 'Reverting README.txt...' + print('Reverting README.txt...') cmd = 'svn revert %s' % DEV_README shellcmd(cmd) def shellcmd(cmd, verbose=True): """Call a shell command.""" if verbose: - print cmd + print(cmd) try: subprocess.check_call(cmd, shell=True) except subprocess.CalledProcessError as err: |