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
2c8bf043
Kaydet (Commit)
2c8bf043
authored
Şub 05, 2012
tarafından
Ned Deily
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #10881: Fix test_site failures with OS X framework builds.
üst
adb87e26
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
16 deletions
+19
-16
site.py
Lib/site.py
+1
-1
sysconfig.py
Lib/sysconfig.py
+3
-2
test_site.py
Lib/test/test_site.py
+13
-13
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/site.py
Dosyayı görüntüle @
2c8bf043
...
...
@@ -312,7 +312,7 @@ def getsitepackages():
# locations.
from
sysconfig
import
get_config_var
framework
=
get_config_var
(
"PYTHONFRAMEWORK"
)
if
framework
and
"/
%
s.framework/"
%
(
framework
,)
in
prefix
:
if
framework
:
sitepackages
.
append
(
os
.
path
.
join
(
"/Library"
,
framework
,
sys
.
version
[:
3
],
"site-packages"
))
...
...
Lib/sysconfig.py
Dosyayı görüntüle @
2c8bf043
...
...
@@ -176,8 +176,9 @@ def _getuserbase():
if
sys
.
platform
==
"darwin"
:
framework
=
get_config_var
(
"PYTHONFRAMEWORK"
)
if
framework
:
return
joinuser
(
"~"
,
"Library"
,
framework
,
"
%
d.
%
d"
%
(
sys
.
version_info
[:
2
]))
return
env_base
if
env_base
else
\
joinuser
(
"~"
,
"Library"
,
framework
,
"
%
d.
%
d"
%
(
sys
.
version_info
[:
2
]))
return
env_base
if
env_base
else
joinuser
(
"~"
,
".local"
)
...
...
Lib/test/test_site.py
Dosyayı görüntüle @
2c8bf043
...
...
@@ -228,7 +228,19 @@ class HelperFunctionsTests(unittest.TestCase):
self
.
assertEqual
(
len
(
dirs
),
1
)
wanted
=
os
.
path
.
join
(
'xoxo'
,
'Lib'
,
'site-packages'
)
self
.
assertEqual
(
dirs
[
0
],
wanted
)
elif
(
sys
.
platform
==
"darwin"
and
sysconfig
.
get_config_var
(
"PYTHONFRAMEWORK"
)):
# OS X framework builds
site
.
PREFIXES
=
[
'Python.framework'
]
dirs
=
site
.
getsitepackages
()
self
.
assertEqual
(
len
(
dirs
),
3
)
wanted
=
os
.
path
.
join
(
'/Library'
,
sysconfig
.
get_config_var
(
"PYTHONFRAMEWORK"
),
sys
.
version
[:
3
],
'site-packages'
)
self
.
assertEqual
(
dirs
[
2
],
wanted
)
elif
os
.
sep
==
'/'
:
# OS X non-framwework builds, Linux, FreeBSD, etc
self
.
assertEqual
(
len
(
dirs
),
2
)
wanted
=
os
.
path
.
join
(
'xoxo'
,
'lib'
,
'python'
+
sys
.
version
[:
3
],
'site-packages'
)
...
...
@@ -236,24 +248,12 @@ class HelperFunctionsTests(unittest.TestCase):
wanted
=
os
.
path
.
join
(
'xoxo'
,
'lib'
,
'site-python'
)
self
.
assertEqual
(
dirs
[
1
],
wanted
)
else
:
# other platforms
self
.
assertEqual
(
len
(
dirs
),
2
)
self
.
assertEqual
(
dirs
[
0
],
'xoxo'
)
wanted
=
os
.
path
.
join
(
'xoxo'
,
'lib'
,
'site-packages'
)
self
.
assertEqual
(
dirs
[
1
],
wanted
)
# let's try the specific Apple location
if
(
sys
.
platform
==
"darwin"
and
sysconfig
.
get_config_var
(
"PYTHONFRAMEWORK"
)):
site
.
PREFIXES
=
[
'Python.framework'
]
dirs
=
site
.
getsitepackages
()
self
.
assertEqual
(
len
(
dirs
),
4
)
wanted
=
os
.
path
.
join
(
'~'
,
'Library'
,
'Python'
,
sys
.
version
[:
3
],
'site-packages'
)
self
.
assertEqual
(
dirs
[
2
],
os
.
path
.
expanduser
(
wanted
))
wanted
=
os
.
path
.
join
(
'/Library'
,
'Python'
,
sys
.
version
[:
3
],
'site-packages'
)
self
.
assertEqual
(
dirs
[
3
],
wanted
)
class
PthFile
(
object
):
"""Helper class for handling testing of .pth files"""
...
...
Misc/NEWS
Dosyayı görüntüle @
2c8bf043
...
...
@@ -90,6 +90,8 @@ Core and Builtins
Library
-------
- Issue #10881: Fix test_site failures with OS X framework builds.
- Issue #964437 Make IDLE help window non-modal.
Patch by Guilherme Polo and Roger Serwy.
...
...
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