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
d38e6f76
Kaydet (Commit)
d38e6f76
authored
Nis 10, 2000
tarafından
Greg Ward
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added optional 'prefix' arguments to 'get_python_inc()' and
'get_python_lib()'.
üst
cf6bea3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
sysconfig.py
Lib/distutils/sysconfig.py
+10
-4
No files found.
Lib/distutils/sysconfig.py
Dosyayı görüntüle @
d38e6f76
...
...
@@ -20,7 +20,7 @@ PREFIX = os.path.normpath(sys.prefix)
EXEC_PREFIX
=
os
.
path
.
normpath
(
sys
.
exec_prefix
)
def
get_python_inc
(
plat_specific
=
0
):
def
get_python_inc
(
plat_specific
=
0
,
prefix
=
None
):
"""Return the directory containing installed Python header files.
If 'plat_specific' is false (the default), this is the path to the
...
...
@@ -28,8 +28,11 @@ def get_python_inc(plat_specific=0):
otherwise, this is the path to platform-specific header files
(namely config.h).
If 'prefix' is supplied, use it instead of sys.prefix or
sys.exec_prefix -- i.e., ignore 'plat_specific'.
"""
prefix
=
(
plat_specific
and
EXEC_PREFIX
or
PREFIX
)
if
prefix
is
None
:
prefix
=
(
plat_specific
and
EXEC_PREFIX
or
PREFIX
)
if
os
.
name
==
"posix"
:
return
os
.
path
.
join
(
prefix
,
"include"
,
"python"
+
sys
.
version
[:
3
])
elif
os
.
name
==
"nt"
:
...
...
@@ -42,7 +45,7 @@ def get_python_inc(plat_specific=0):
"on platform '
%
s'"
)
%
os
.
name
def
get_python_lib
(
plat_specific
=
0
,
standard_lib
=
0
):
def
get_python_lib
(
plat_specific
=
0
,
standard_lib
=
0
,
prefix
=
None
):
"""Return the directory containing the Python library (standard or
site additions).
...
...
@@ -53,8 +56,11 @@ def get_python_lib(plat_specific=0, standard_lib=0):
containing standard Python library modules; otherwise, return the
directory for site-specific modules.
If 'prefix' is supplied, use it instead of sys.prefix or
sys.exec_prefix -- i.e., ignore 'plat_specific'.
"""
prefix
=
(
plat_specific
and
EXEC_PREFIX
or
PREFIX
)
if
prefix
is
None
:
prefix
=
(
plat_specific
and
EXEC_PREFIX
or
PREFIX
)
if
os
.
name
==
"posix"
:
libpython
=
os
.
path
.
join
(
prefix
,
...
...
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