Commits

Brett Cannon committed cbe2b5c

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

  • Participants
  • Parent commits 92da896

Comments (0)

Files changed (1)

File make_a_box.py

         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
             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', '*'),
         documentation."""
         super().create()
         with change_cwd(os.path.join(self.directory, 'Doc')):
-            # XXX Windows?
             subprocess.check_call(['make', 'checkout'])
 
     def build(self):
 
 
 if __name__ == '__main__':
+    # XXX CLI: create, build, list
     all_providers = (CPython, Devguide, PEPs, CoveragePy, Mercurial,
                      VisualCPPExpress)
     print(__doc__)