Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
581c29f8
Kaydet (Commit)
581c29f8
authored
Şub 06, 2015
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #23399: pyvenv creates relative symlinks where possible.
üst
b5181340
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
__init__.py
Lib/venv/__init__.py
+8
-6
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/venv/__init__.py
Dosyayı görüntüle @
581c29f8
...
...
@@ -141,10 +141,9 @@ class EnvBuilder:
# Issue 21197: create lib64 as a symlink to lib on 64-bit non-OS X POSIX
if
((
sys
.
maxsize
>
2
**
32
)
and
(
os
.
name
==
'posix'
)
and
(
sys
.
platform
!=
'darwin'
)):
p
=
os
.
path
.
join
(
env_dir
,
'lib'
)
link_path
=
os
.
path
.
join
(
env_dir
,
'lib64'
)
if
not
os
.
path
.
exists
(
link_path
):
# Issue #21643
os
.
symlink
(
p
,
link_path
)
os
.
symlink
(
'lib'
,
link_path
)
context
.
bin_path
=
binpath
=
os
.
path
.
join
(
env_dir
,
binname
)
context
.
bin_name
=
binname
context
.
env_exe
=
os
.
path
.
join
(
binpath
,
exename
)
...
...
@@ -178,7 +177,7 @@ class EnvBuilder:
result
=
f
.
startswith
(
'python'
)
and
f
.
endswith
(
'.exe'
)
return
result
def
symlink_or_copy
(
self
,
src
,
dst
):
def
symlink_or_copy
(
self
,
src
,
dst
,
relative_symlinks_ok
=
False
):
"""
Try symlinking a file, and if that fails, fall back to copying.
"""
...
...
@@ -186,7 +185,11 @@ class EnvBuilder:
if
not
force_copy
:
try
:
if
not
os
.
path
.
islink
(
dst
):
# can't link to itself!
os
.
symlink
(
src
,
dst
)
if
relative_symlinks_ok
:
assert
os
.
path
.
dirname
(
src
)
==
os
.
path
.
dirname
(
dst
)
os
.
symlink
(
os
.
path
.
basename
(
src
),
dst
)
else
:
os
.
symlink
(
src
,
dst
)
except
Exception
:
# may need to use a more specific exception
logger
.
warning
(
'Unable to symlink
%
r to
%
r'
,
src
,
dst
)
force_copy
=
True
...
...
@@ -201,7 +204,6 @@ class EnvBuilder:
being processed.
"""
binpath
=
context
.
bin_path
exename
=
context
.
python_exe
path
=
context
.
env_exe
copier
=
self
.
symlink_or_copy
copier
(
context
.
executable
,
path
)
...
...
@@ -214,7 +216,7 @@ class EnvBuilder:
if
not
os
.
path
.
exists
(
path
):
# Issue 18807: make copies if
# symlinks are not wanted
copier
(
context
.
env_exe
,
path
)
copier
(
context
.
env_exe
,
path
,
relative_symlinks_ok
=
True
)
if
not
os
.
path
.
islink
(
path
):
os
.
chmod
(
path
,
0
o755
)
else
:
...
...
Misc/NEWS
Dosyayı görüntüle @
581c29f8
...
...
@@ -59,6 +59,8 @@ Core and Builtins
Library
-------
- Issue #23399: pyvenv creates relative symlinks where possible.
- Issue #23099: Closing io.BytesIO with exported buffer is rejected now to
prevent corrupting exported buffer.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment