Lines Matching full:path

56             prompt = os.path.basename(os.getcwd())
67 env_dir = os.path.abspath(env_dir)
88 def clear_directory(self, path):
89 for fn in os.listdir(path):
90 fn = os.path.join(path, fn)
91 if os.path.islink(fn) or os.path.isfile(fn):
93 elif os.path.isdir(fn):
114 if not os.path.exists(d):
116 elif os.path.islink(d) or os.path.isfile(d):
121 f'it contains the PATH separator {os.pathsep}.')
122 if os.path.exists(env_dir) and self.clear:
126 context.env_name = os.path.split(env_dir)[1]
132 raise ValueError('Unable to determine path to the running '
133 'Python interpreter. Provide an explicit path or '
134 'check that your PATH environment variable is '
136 dirname, exename = os.path.split(os.path.abspath(executable))
150 link_path = os.path.join(env_dir, 'lib64')
151 if not os.path.exists(link_path): # Issue #21643
154 context.bin_name = os.path.relpath(binpath, env_dir)
155 context.env_exe = os.path.join(binpath, exename)
163 real_env_exe = os.path.realpath(context.env_exe)
164 if os.path.normcase(real_env_exe) != os.path.normcase(context.env_exe):
182 context.cfg_path = path = os.path.join(context.env_dir, 'pyvenv.cfg')
183 with open(path, 'w', encoding='utf-8') as f:
193 f.write('executable = %s\n' % os.path.realpath(sys.executable))
225 if not os.path.islink(dst): # can't link to itself!
227 assert os.path.dirname(src) == os.path.dirname(dst)
228 os.symlink(os.path.basename(src), dst)
241 bad_src = os.path.lexists(src) and not os.path.exists(src)
242 if self.symlinks and not bad_src and not os.path.islink(dst):
245 assert os.path.dirname(src) == os.path.dirname(dst)
246 os.symlink(os.path.basename(src), dst)
255 basename, ext = os.path.splitext(os.path.basename(src))
256 srcfn = os.path.join(os.path.dirname(__file__),
262 if sysconfig.is_python_build() or not os.path.isfile(srcfn):
270 src = os.path.join(os.path.dirname(src), basename + ext)
273 if not os.path.exists(src):
288 path = context.env_exe
292 copier(context.executable, path)
293 if not os.path.islink(path):
294 os.chmod(path, 0o755)
296 path = os.path.join(binpath, suffix)
297 if not os.path.exists(path):
300 copier(context.env_exe, path, relative_symlinks_ok=True)
301 if not os.path.islink(path):
302 os.chmod(path, 0o755)
311 os.path.normcase(os.path.splitext(f)[1]) in ('.exe', '.dll')
316 os.path.normcase(f).startswith(('python', 'vcruntime'))
320 base_exe = os.path.basename(context.env_exe)
324 src = os.path.join(dirname, suffix)
325 if os.path.lexists(src):
326 copier(src, os.path.join(binpath, suffix))
332 tcldir = os.path.basename(root)
333 tcldir = os.path.join(context.env_dir, 'Lib', tcldir)
334 if not os.path.exists(tcldir):
336 src = os.path.join(root, 'init.tcl')
337 dst = os.path.join(tcldir, 'init.tcl')
345 # really need is to ensure that the path variables do not overrule
372 path = os.path.abspath(os.path.dirname(__file__))
373 path = os.path.join(path, 'scripts')
374 self.install_scripts(context, path)
404 def install_scripts(self, context, path):
410 :param path: Absolute pathname of a directory containing script.
418 plen = len(path)
419 for root, dirs, files in os.walk(path):
420 if root == path: # at top-level, remove irrelevant dirs
429 srcfile = os.path.join(root, f)
434 dstdir = os.path.join(binpath, *suffix)
435 if not os.path.exists(dstdir):
437 dstfile = os.path.join(dstdir, f)