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
28952446
Kaydet (Commit)
28952446
authored
Haz 24, 2012
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Closes #15173: Tidied up copyright statements and removed pythonv references.
üst
e51a3692
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
site.py
Lib/site.py
+2
-2
test_venv.py
Lib/test/test_venv.py
+6
-5
__init__.py
Lib/venv/__init__.py
+5
-6
pythonw.c
Mac/Tools/pythonw.c
+1
-1
No files found.
Lib/site.py
Dosyayı görüntüle @
28952446
...
...
@@ -499,8 +499,8 @@ def venv(known_paths):
global
PREFIXES
,
ENABLE_USER_SITE
env
=
os
.
environ
if
sys
.
platform
==
'darwin'
and
'__PY
THO
NV_LAUNCHER__'
in
env
:
executable
=
os
.
environ
[
'__PY
THO
NV_LAUNCHER__'
]
if
sys
.
platform
==
'darwin'
and
'__PY
VE
NV_LAUNCHER__'
in
env
:
executable
=
os
.
environ
[
'__PY
VE
NV_LAUNCHER__'
]
else
:
executable
=
sys
.
executable
executable_dir
,
executable_name
=
os
.
path
.
split
(
executable
)
...
...
Lib/test/test_venv.py
Dosyayı görüntüle @
28952446
...
...
@@ -2,6 +2,7 @@
Test harness for the venv module.
Copyright (C) 2011-2012 Vinay Sajip.
Licensed to the PSF under a contributor agreement.
"""
import
os
...
...
@@ -29,8 +30,8 @@ class BaseTest(unittest.TestCase):
self
.
pydocname
=
'pydoc'
self
.
lib
=
(
'lib'
,
'python
%
s'
%
sys
.
version
[:
3
])
self
.
include
=
'include'
if
sys
.
platform
==
'darwin'
and
'__PY
THO
NV_LAUNCHER__'
in
os
.
environ
:
executable
=
os
.
environ
[
'__PY
THO
NV_LAUNCHER__'
]
if
sys
.
platform
==
'darwin'
and
'__PY
VE
NV_LAUNCHER__'
in
os
.
environ
:
executable
=
os
.
environ
[
'__PY
VE
NV_LAUNCHER__'
]
else
:
executable
=
sys
.
executable
self
.
exe
=
os
.
path
.
split
(
executable
)[
-
1
]
...
...
@@ -69,9 +70,9 @@ class BasicTest(BaseTest):
self
.
isdir
(
self
.
include
)
self
.
isdir
(
*
self
.
lib
)
data
=
self
.
get_text_file_contents
(
'pyvenv.cfg'
)
if
sys
.
platform
==
'darwin'
and
(
'__PY
THO
NV_LAUNCHER__'
if
sys
.
platform
==
'darwin'
and
(
'__PY
VE
NV_LAUNCHER__'
in
os
.
environ
):
executable
=
os
.
environ
[
'__PY
THO
NV_LAUNCHER__'
]
executable
=
os
.
environ
[
'__PY
VE
NV_LAUNCHER__'
]
else
:
executable
=
sys
.
executable
path
=
os
.
path
.
dirname
(
executable
)
...
...
@@ -127,7 +128,7 @@ class BasicTest(BaseTest):
for
usl
in
(
False
,
True
):
builder
=
venv
.
EnvBuilder
(
clear
=
True
,
symlinks
=
usl
)
if
(
usl
and
sys
.
platform
==
'darwin'
and
'__PY
THO
NV_LAUNCHER__'
in
os
.
environ
):
'__PY
VE
NV_LAUNCHER__'
in
os
.
environ
):
self
.
assertRaises
(
ValueError
,
builder
.
create
,
self
.
env_dir
)
else
:
builder
.
create
(
self
.
env_dir
)
...
...
Lib/venv/__init__.py
Dosyayı görüntüle @
28952446
"""
Virtual environment (venv) package for Python. Based on PEP 405.
Copyright (C) 20011-2012 Vinay Sajip. All Rights Reserved.
Copyright (C) 2011-2012 Vinay Sajip.
Licensed to the PSF under a contributor agreement.
usage: python -m venv [-h] [--system-site-packages] [--symlinks] [--clear]
[--upgrade]
...
...
@@ -36,7 +37,6 @@ try:
import
threading
except
ImportError
:
threading
=
None
import
zipfile
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -119,8 +119,8 @@ class EnvBuilder:
context
.
prompt
=
'(
%
s) '
%
context
.
env_name
create_if_needed
(
env_dir
)
env
=
os
.
environ
if
sys
.
platform
==
'darwin'
and
'__PY
THO
NV_LAUNCHER__'
in
env
:
executable
=
os
.
environ
[
'__PY
THO
NV_LAUNCHER__'
]
if
sys
.
platform
==
'darwin'
and
'__PY
VE
NV_LAUNCHER__'
in
env
:
executable
=
os
.
environ
[
'__PY
VE
NV_LAUNCHER__'
]
else
:
executable
=
sys
.
executable
dirname
,
exename
=
os
.
path
.
split
(
os
.
path
.
abspath
(
executable
))
...
...
@@ -346,8 +346,7 @@ def main(args=None):
elif
not
hasattr
(
sys
,
'base_prefix'
):
compatible
=
False
if
not
compatible
:
raise
ValueError
(
'This script is only for use with '
'Python 3.3 (pythonv variant)'
)
raise
ValueError
(
'This script is only for use with Python 3.3'
)
else
:
import
argparse
...
...
Mac/Tools/pythonw.c
Dosyayı görüntüle @
28952446
...
...
@@ -159,7 +159,7 @@ main(int argc, char **argv) {
status
=
_NSGetExecutablePath
(
path
,
&
size
);
if
(
status
==
0
)
{
if
(
realpath
(
path
,
real_path
)
!=
NULL
)
{
setenv
(
"__PY
THO
NV_LAUNCHER__"
,
real_path
,
1
);
setenv
(
"__PY
VE
NV_LAUNCHER__"
,
real_path
,
1
);
}
}
...
...
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