示例#1
0
 def test_srcdir(self):
     srcdir = sysconfig.get_config_var('srcdir')
     self.assertTrue(os.path.isabs(srcdir), srcdir)
     self.assertTrue(os.path.isdir(srcdir), srcdir)
     if sysconfig.python_build:
         Python_h = os.path.join(srcdir, 'Include', 'Python.h')
         self.assertTrue(os.path.exists(Python_h), Python_h)
         self.assertTrue(sysconfig._is_python_source_dir(srcdir))
     elif os.name == 'posix':
         self.assertEqual(
             os.path.dirname(sysconfig.get_makefile_filename()), srcdir)
示例#2
0
    def test_srcdir(self):
        # See Issues #15322, #15364.
        srcdir = sysconfig.get_config_var('srcdir')

        self.assertTrue(os.path.isabs(srcdir), srcdir)
        self.assertTrue(os.path.isdir(srcdir), srcdir)

        if sysconfig.python_build:
            # The python executable has not been installed so srcdir
            # should be a full source checkout.
            Python_h = os.path.join(srcdir, 'Include', 'Python.h')
            self.assertTrue(os.path.exists(Python_h), Python_h)
            self.assertTrue(sysconfig._is_python_source_dir(srcdir))
        elif os.name == 'posix':
            self.assertEqual(
                os.path.dirname(sysconfig.get_makefile_filename()), srcdir)
    def test_srcdir(self):
        # See Issues #15322, #15364.
        srcdir = sysconfig.get_config_var('srcdir')

        self.assertTrue(os.path.isabs(srcdir), srcdir)
        self.assertTrue(os.path.isdir(srcdir), srcdir)

        if sysconfig.python_build:
            # The python executable has not been installed so srcdir
            # should be a full source checkout.
            Python_h = os.path.join(srcdir, 'Include', 'Python.h')
            self.assertTrue(os.path.exists(Python_h), Python_h)
            self.assertTrue(sysconfig._is_python_source_dir(srcdir))
        elif os.name == 'posix':
            self.assertEqual(os.path.dirname(sysconfig.get_makefile_filename()),
                                 srcdir)