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
bdf3b509
Kaydet (Commit)
bdf3b509
authored
Tem 18, 2003
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SF patch 773476: NameError when there are no prefixes.
üst
a920a889
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
site.py
Lib/site.py
+9
-3
No files found.
Lib/site.py
Dosyayı görüntüle @
bdf3b509
...
@@ -91,11 +91,16 @@ del dir, dircase, L
...
@@ -91,11 +91,16 @@ del dir, dircase, L
# using the -S option for Python. See http://www.python.org/sf/586680
# using the -S option for Python. See http://www.python.org/sf/586680
if
(
os
.
name
==
"posix"
and
sys
.
path
and
if
(
os
.
name
==
"posix"
and
sys
.
path
and
os
.
path
.
basename
(
sys
.
path
[
-
1
])
==
"Modules"
):
os
.
path
.
basename
(
sys
.
path
[
-
1
])
==
"Modules"
):
from
distutils.util
import
get_platform
s
=
"build/lib.
%
s-
%.3
s"
%
(
"linux-i686"
,
sys
.
version
)
s
=
"build/lib.
%
s-
%.3
s"
%
(
get_platform
(),
sys
.
version
)
s
=
os
.
path
.
join
(
os
.
path
.
dirname
(
sys
.
path
[
-
1
]),
s
)
s
=
os
.
path
.
join
(
os
.
path
.
dirname
(
sys
.
path
[
-
1
]),
s
)
sys
.
path
.
append
(
s
)
sys
.
path
.
append
(
s
)
del
get_platform
,
s
##if (os.name == "posix" and sys.path and
## os.path.basename(sys.path[-1]) == "Modules"):
## from distutils.util import get_platform
## s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
## s = os.path.join(os.path.dirname(sys.path[-1]), s)
## sys.path.append(s)
## del get_platform, s
def
_init_pathinfo
():
def
_init_pathinfo
():
global
_dirs_in_sys_path
global
_dirs_in_sys_path
...
@@ -158,6 +163,7 @@ def addpackage(sitedir, name):
...
@@ -158,6 +163,7 @@ def addpackage(sitedir, name):
_dirs_in_sys_path
=
None
_dirs_in_sys_path
=
None
prefixes
=
[
sys
.
prefix
]
prefixes
=
[
sys
.
prefix
]
sitedir
=
None
# make sure sitedir is initialized because of later 'del'
if
sys
.
exec_prefix
!=
sys
.
prefix
:
if
sys
.
exec_prefix
!=
sys
.
prefix
:
prefixes
.
append
(
sys
.
exec_prefix
)
prefixes
.
append
(
sys
.
exec_prefix
)
for
prefix
in
prefixes
:
for
prefix
in
prefixes
:
...
...
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