~jameinel/bzr/fix-push2

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_setup.py

  • Committer: Aaron Bentley
  • Date: 2006-09-22 04:52:17 UTC
  • mfrom: (2029 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2078.
  • Revision ID: aaron.bentley@utoronto.ca-20060922045217-4e775bf2fc6d0b3b
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        """
47
47
        if not os.path.isfile('setup.py'):
48
48
            raise TestSkipped('There is no setup.py file in current directory')
 
49
        try:
 
50
            import distutils.sysconfig
 
51
            makefile_path = distutils.sysconfig.get_makefile_filename()
 
52
            if not os.path.exists(makefile_path):
 
53
                raise TestSkipped('You must have the python Makefile installed to run this test.'
 
54
                                  ' Usually this can be found by installing "python-dev"')
 
55
        except ImportError:
 
56
            raise TestSkipped('You must have distutils installed to run this test.'
 
57
                              ' Usually this can be found by installing "python-dev"')
49
58
        self.log('test_build running in %s' % os.getcwd())
50
59
        install_dir = tempfile.mkdtemp()
51
60
        # setup.py must be run from the root source directory, but the tests