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
b9b965f6
Kaydet (Commit)
b9b965f6
authored
Haz 03, 2014
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #21643: Updated test and fixed logic bug in lib64 symlink creation.
üst
2f78b84c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
test_venv.py
Lib/test/test_venv.py
+16
-11
__init__.py
Lib/venv/__init__.py
+3
-3
No files found.
Lib/test/test_venv.py
Dosyayı görüntüle @
b9b965f6
...
@@ -203,17 +203,22 @@ class BasicTest(BaseTest):
...
@@ -203,17 +203,22 @@ class BasicTest(BaseTest):
"""
"""
Test upgrading an existing environment directory.
Test upgrading an existing environment directory.
"""
"""
builder
=
venv
.
EnvBuilder
(
upgrade
=
True
)
# See Issue #21643: the loop needs to run twice to ensure
self
.
run_with_capture
(
builder
.
create
,
self
.
env_dir
)
# that everything works on the upgrade (the first run just creates
self
.
isdir
(
self
.
bindir
)
# the venv).
self
.
isdir
(
self
.
include
)
for
upgrade
in
(
False
,
True
):
self
.
isdir
(
*
self
.
lib
)
builder
=
venv
.
EnvBuilder
(
upgrade
=
upgrade
)
fn
=
self
.
get_env_file
(
self
.
bindir
,
self
.
exe
)
self
.
run_with_capture
(
builder
.
create
,
self
.
env_dir
)
if
not
os
.
path
.
exists
(
fn
):
# diagnostics for Windows buildbot failures
self
.
isdir
(
self
.
bindir
)
bd
=
self
.
get_env_file
(
self
.
bindir
)
self
.
isdir
(
self
.
include
)
print
(
'Contents of
%
r:'
%
bd
)
self
.
isdir
(
*
self
.
lib
)
print
(
'
%
r'
%
os
.
listdir
(
bd
))
fn
=
self
.
get_env_file
(
self
.
bindir
,
self
.
exe
)
self
.
assertTrue
(
os
.
path
.
exists
(
fn
),
'File
%
r should exist.'
%
fn
)
if
not
os
.
path
.
exists
(
fn
):
# diagnostics for Windows buildbot failures
bd
=
self
.
get_env_file
(
self
.
bindir
)
print
(
'Contents of
%
r:'
%
bd
)
print
(
'
%
r'
%
os
.
listdir
(
bd
))
self
.
assertTrue
(
os
.
path
.
exists
(
fn
),
'File
%
r should exist.'
%
fn
)
def
test_isolation
(
self
):
def
test_isolation
(
self
):
"""
"""
...
...
Lib/venv/__init__.py
Dosyayı görüntüle @
b9b965f6
...
@@ -30,7 +30,6 @@ optional arguments:
...
@@ -30,7 +30,6 @@ optional arguments:
import
logging
import
logging
import
os
import
os
import
shutil
import
shutil
import
struct
import
subprocess
import
subprocess
import
sys
import
sys
import
types
import
types
...
@@ -140,11 +139,12 @@ class EnvBuilder:
...
@@ -140,11 +139,12 @@ class EnvBuilder:
create_if_needed
(
path
)
create_if_needed
(
path
)
create_if_needed
(
libpath
)
create_if_needed
(
libpath
)
# Issue 21197: create lib64 as a symlink to lib on 64-bit non-OS X POSIX
# Issue 21197: create lib64 as a symlink to lib on 64-bit non-OS X POSIX
if
((
s
truct
.
calcsize
(
'P'
)
==
8
)
and
(
os
.
name
==
'posix'
)
and
if
((
s
ys
.
maxsize
>
2
**
32
)
and
(
os
.
name
==
'posix'
)
and
(
sys
.
platform
!=
'darwin'
)):
(
sys
.
platform
!=
'darwin'
)):
p
=
os
.
path
.
join
(
env_dir
,
'lib'
)
p
=
os
.
path
.
join
(
env_dir
,
'lib'
)
link_path
=
os
.
path
.
join
(
env_dir
,
'lib64'
)
link_path
=
os
.
path
.
join
(
env_dir
,
'lib64'
)
os
.
symlink
(
p
,
link_path
)
if
not
os
.
path
.
exists
(
link_path
):
# Issue #21643
os
.
symlink
(
p
,
link_path
)
context
.
bin_path
=
binpath
=
os
.
path
.
join
(
env_dir
,
binname
)
context
.
bin_path
=
binpath
=
os
.
path
.
join
(
env_dir
,
binname
)
context
.
bin_name
=
binname
context
.
bin_name
=
binname
context
.
env_exe
=
os
.
path
.
join
(
binpath
,
exename
)
context
.
env_exe
=
os
.
path
.
join
(
binpath
,
exename
)
...
...
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