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