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
2f88bfdf
Kaydet (Commit)
2f88bfdf
authored
May 08, 2010
tarafından
Ronald Oussoren
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #8084: ensure that the --user directory
conforms to platforms standars on OSX when using a python framework.
üst
9f8e0c11
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
7 deletions
+37
-7
site.py
Lib/site.py
+11
-6
sysconfig.py
Lib/sysconfig.py
+20
-1
NEWS
Misc/NEWS
+6
-0
No files found.
Lib/site.py
Dosyayı görüntüle @
2f88bfdf
...
...
@@ -243,6 +243,13 @@ def getusersitepackages():
from
sysconfig
import
get_path
import
os
if
sys
.
platform
==
'darwin'
:
from
sysconfig
import
get_config_var
if
get_config_var
(
'PYTHONFRAMEWORK'
):
USER_SITE
=
get_path
(
'purelib'
,
'osx_framework_user'
)
return
USER_SITE
USER_SITE
=
get_path
(
'purelib'
,
'
%
s_user'
%
os
.
name
)
return
USER_SITE
...
...
@@ -289,13 +296,11 @@ def getsitepackages():
if
sys
.
platform
==
"darwin"
:
# for framework builds *only* we add the standard Apple
# locations.
if
'Python.framework'
in
prefix
:
sitepackages
.
append
(
os
.
path
.
expanduser
(
os
.
path
.
join
(
"~"
,
"Library"
,
"Python"
,
sys
.
version
[:
3
],
"site-packages"
)))
from
sysconfig
import
get_config_var
framework
=
get_config_var
(
"PYTHONFRAMEWORK"
)
if
framework
and
"/
%
s.framework/"
%
(
framework
,)
in
prefix
:
sitepackages
.
append
(
os
.
path
.
join
(
"/Library"
,
"Python"
,
os
.
path
.
join
(
"/Library"
,
framework
,
sys
.
version
[:
3
],
"site-packages"
))
return
sitepackages
...
...
Lib/sysconfig.py
Dosyayı görüntüle @
2f88bfdf
...
...
@@ -73,6 +73,15 @@ _INSTALL_SCHEMES = {
'scripts'
:
'{userbase}/bin'
,
'data'
:
'{userbase}'
,
},
'osx_framework_user'
:
{
'stdlib'
:
'{userbase}/lib/python'
,
'platstdlib'
:
'{userbase}/lib/python'
,
'purelib'
:
'{userbase}/lib/python/site-packages'
,
'platlib'
:
'{userbase}/lib/python/site-packages'
,
'include'
:
'{userbase}/include'
,
'scripts'
:
'{userbase}/bin'
,
'data'
:
'{userbase}'
,
},
}
_SCHEME_KEYS
=
(
'stdlib'
,
'platstdlib'
,
'purelib'
,
'platlib'
,
'include'
,
...
...
@@ -157,6 +166,12 @@ def _getuserbase():
base
=
os
.
environ
.
get
(
"APPDATA"
)
or
"~"
return
env_base
if
env_base
else
joinuser
(
base
,
"Python"
)
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
(
"~"
,
".local"
)
...
...
@@ -398,7 +413,6 @@ def get_config_vars(*args):
_CONFIG_VARS
[
'py_version_nodot'
]
=
_PY_VERSION
[
0
]
+
_PY_VERSION
[
2
]
_CONFIG_VARS
[
'base'
]
=
_PREFIX
_CONFIG_VARS
[
'platbase'
]
=
_EXEC_PREFIX
_CONFIG_VARS
[
'userbase'
]
=
_getuserbase
()
_CONFIG_VARS
[
'projectbase'
]
=
_PROJECT_BASE
if
os
.
name
in
(
'nt'
,
'os2'
):
...
...
@@ -406,6 +420,11 @@ def get_config_vars(*args):
if
os
.
name
==
'posix'
:
_init_posix
(
_CONFIG_VARS
)
# Setting 'userbase' is done below the call to the
# init function to enable using 'get_config_var' in
# the init-function.
_CONFIG_VARS
[
'userbase'
]
=
_getuserbase
()
if
'srcdir'
not
in
_CONFIG_VARS
:
_CONFIG_VARS
[
'srcdir'
]
=
_PROJECT_BASE
...
...
Misc/NEWS
Dosyayı görüntüle @
2f88bfdf
...
...
@@ -38,6 +38,12 @@ Core and Builtins
- Issue #8404: Fixed set operations on dictionary views.
- Issue #8084: PEP 370 now conforms to system conventions for framework
builds on MacOS X. That is, "python setup.py install --user" will install
into "~/Library/Python/2.7" instead of "~/.local".
Library
-------
...
...
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