[Python-checkins] devinabox: Couple of things:

brett.cannon python-checkins at python.org
Thu Nov 15 20:33:39 CET 2012


http://hg.python.org/devinabox/rev/cbe2b5ca4a01
changeset: 46:cbe2b5ca4a01
user: Brett Cannon <brett at python.org>
date: Thu Nov 15 14:33:22 2012 -0500
summary:
 Couple of things:
* Fix a bug where CPPFLAGS was misnamed
* Clean up after the build of coverage.py
* Fix the 'make distclean' call to occur in the proper directory
files:
 make_a_box.py | 12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/make_a_box.py b/make_a_box.py
--- a/make_a_box.py
+++ b/make_a_box.py
@@ -136,12 +136,13 @@
 self.cpython_dir = os.path.dirname(self.executable)
 yield
 print('Cleaning up the CPython build ...')
- subprocess.check_call(['make', 'distclean'])
+ with change_cwd(self.cpython_dir):
+ subprocess.check_call(['make', 'distclean'])
 
 @contextlib.contextmanager
 def build_coveragepy(self):
 env = os.environ.copy()
- env['CPPPATH'] = '-I {} -I {}'.format(self.cpython_dir,
+ env['CPPFLAGS'] = '-I {} -I {}'.format(self.cpython_dir,
 os.path.join(self.cpython_dir, 'Include'))
 with change_cwd(self.coveragepy_dir):
 # Don't want to use venv because we want the file paths to match
@@ -150,8 +151,9 @@
 cmd = [self.executable, 'setup.py', 'build_ext', '--inplace']
 subprocess.check_call(cmd, env=env)
 yield
- # XXX clean up tracer.so and any other build directories;
- # leave distribute for those that want to build themselves
+ print('Cleaning up coverage.py build ...')
+ shutil.rmtree('build')
+ os.unlink(os.path.join('coverage', 'tracer.so'))
 
 def generate_coveragepy_command(self, command, *args):
 exclude = '{},{}'.format(os.path.join('Lib', 'test', '*'),
@@ -304,7 +306,6 @@
 documentation."""
 super().create()
 with change_cwd(os.path.join(self.directory, 'Doc')):
- # XXX Windows?
 subprocess.check_call(['make', 'checkout'])
 
 def build(self):
@@ -321,6 +322,7 @@
 
 
 if __name__ == '__main__':
+ # XXX CLI: create, build, list
 all_providers = (CPython, Devguide, PEPs, CoveragePy, Mercurial,
 VisualCPPExpress)
 print(__doc__)
-- 
Repository URL: http://hg.python.org/devinabox


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /