Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# cross/ cross-python venv
# build/ build-python venv
# lib/ libs for setting up cross-python
# bin/ holds activate scripts.
if os.path.exists(env_dir) and (self.clear_cross or self.clear_build):
subdirs = os.listdir(env_dir)
for sub in subdirs:
if sub in ('cross', 'build'):
continue
utils.remove_path(os.path.join(env_dir, sub))
context = super().ensure_directories(env_dir)
context.lib_path = os.path.join(env_dir, 'lib')
context.exposed_libs = os.path.join(context.lib_path, 'exposed.txt')
utils.mkdir_if_needed(context.lib_path)
return context