From 624ab5d1a7d1f7134623afa457bfe5e003459d72 2016-04-05 23:41:32 From: Min RK Date: 2016-04-05 23:41:32 Subject: [PATCH] Backport PR #9211: Release process tweaks Things I ran into while releasing 4.1.1. The only one that might be controversial is removing the `python -m compileall` check before we build packages. Because this is hardcoded to `python`, it runs on Python 2 on my system, and fails on one of our tools scripts that happens to be Python 3 only. We could make this smarter, but I don't think it's worth it. We now have continuous integration and editors with built in static analysis, so if we make a file invalid Python syntax we'll know about it well before release. I also ran into a problem in that I don't have access to archive.ipython.org (I'm sure I did on one of my other computers, but I forget which). There should probably be a check for that somewhere earlier in the build process, but I haven't included it here. --- diff --git a/docs/source/coredev/release_process.rst b/docs/source/coredev/release_process.rst index 7ab4fc6..b279c6a 100644 --- a/docs/source/coredev/release_process.rst +++ b/docs/source/coredev/release_process.rst @@ -102,7 +102,7 @@ release is: ``1.3rc1``. Notice that there is no separator between the '3' and the 'r'. -Commit the changes to release.py and jsversion:: +Commit the changes to release.py:: git commit -am "release $VERSION" git push origin $BRANCH diff --git a/tools/build_release b/tools/build_release index 3521e5f..3b115f1 100755 --- a/tools/build_release +++ b/tools/build_release @@ -4,7 +4,7 @@ import os from shutil import rmtree -from toollib import sh, pjoin, get_ipdir, cd, compile_tree, execfile, sdists, buildwheels +from toollib import sh, pjoin, get_ipdir, cd, execfile, sdists, buildwheels def build_release(): @@ -15,9 +15,6 @@ def build_release(): # Load release info execfile(pjoin('IPython', 'core', 'release.py'), globals()) - # Check that everything compiles - compile_tree('*') - # Cleanup for d in ['build', 'dist', pjoin('docs', 'build'), pjoin('docs', 'dist'), pjoin('docs', 'source', 'api', 'generated')]: diff --git a/tools/toollib.py b/tools/toollib.py index 1b390c7..ad71bd0 100644 --- a/tools/toollib.py +++ b/tools/toollib.py @@ -49,17 +49,8 @@ def get_ipdir(): raise SystemExit('Invalid ipython directory: %s' % ipdir) return ipdir - -def compile_tree(folder='.'): - """Compile all Python files below current directory.""" - stat = os.system('python -m compileall {}'.format(folder)) - if stat: - msg = '*** ERROR: Some Python files in tree do NOT compile! ***\n' - msg += 'See messages above for the actual file that produced it.\n' - raise SystemExit(msg) - try: - execfile + execfile = execfile except NameError: def execfile(fname, globs, locs=None): locs = locs or globs