1 __all__ = ['get_config_vars', 'get_path']
5 from sysconfig import get_config_vars, get_path
7 from distutils.sysconfig import get_config_vars, get_python_lib
10 if name not in ('platlib', 'purelib'):
11 raise ValueError("Name must be purelib or platlib")
12 return get_python_lib(name == 'platlib')
17 from tempfile import TemporaryDirectory
22 class TemporaryDirectory(object):
24 Very simple temporary directory context manager.
25 Will try to delete afterward, but will also ignore OS and similar
30 self.name = None # Handle mkdtemp raising an exception
31 self.name = tempfile.mkdtemp()
36 def __exit__(self, exctype, excvalue, exctrace):
38 shutil.rmtree(self.name, True)
39 except OSError: # removal errors are not the only possible