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
ecbe2a91
Kaydet (Commit)
ecbe2a91
authored
Eki 17, 2012
tarafından
Trent Nelson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #15298: refactor previous fix from 66959d419369.
üst
016884cb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
sysconfig.py
Lib/sysconfig.py
+17
-12
No files found.
Lib/sysconfig.py
Dosyayı görüntüle @
ecbe2a91
...
@@ -396,24 +396,29 @@ def _generate_posix_vars():
...
@@ -396,24 +396,29 @@ def _generate_posix_vars():
# `make pybuilddir.txt` target -- which is a precursor to the
# `make pybuilddir.txt` target -- which is a precursor to the
# _sysconfigdata.py module being constructed. Unfortunately,
# _sysconfigdata.py module being constructed. Unfortunately,
# get_config_vars() eventually calls _init_posix(), which attempts
# get_config_vars() eventually calls _init_posix(), which attempts
# to import _sysconfigdata, which we won't have built yet. So,
# to import _sysconfigdata, which we won't have built yet. In order
# write out _sysconfigdata.py to the current directory first,
# for _init_posix() to work, if we're on Darwin, just mock up the
# then call get_platform() to get the pybuilddir, then move it.
# _sysconfigdata module manually and populate it with the build vars.
destfile
=
'_sysconfigdata.py'
# This is more than sufficient for ensuring the subsequent call to
with
open
(
destfile
,
'w'
,
encoding
=
'utf8'
)
as
f
:
# get_platform() succeeds.
f
.
write
(
'# system configuration generated and used by'
name
=
'_sysconfigdata'
' the sysconfig module
\n
'
)
if
'darwin'
in
sys
.
platform
:
f
.
write
(
'build_time_vars = '
)
import
imp
pprint
.
pprint
(
vars
,
stream
=
f
)
module
=
imp
.
new_module
(
name
)
module
.
build_time_vars
=
vars
sys
.
modules
[
name
]
=
module
pybuilddir
=
'build/lib.
%
s-
%
s'
%
(
get_platform
(),
sys
.
version
[:
3
])
pybuilddir
=
'build/lib.
%
s-
%
s'
%
(
get_platform
(),
sys
.
version
[:
3
])
if
hasattr
(
sys
,
"gettotalrefcount"
):
if
hasattr
(
sys
,
"gettotalrefcount"
):
pybuilddir
+=
'-pydebug'
pybuilddir
+=
'-pydebug'
os
.
makedirs
(
pybuilddir
,
exist_ok
=
True
)
os
.
makedirs
(
pybuilddir
,
exist_ok
=
True
)
target
=
os
.
path
.
join
(
pybuilddir
,
destfile
)
destfile
=
os
.
path
.
join
(
pybuilddir
,
name
+
'.py'
)
# Relocate _sysconfigdata.py into its final home.
with
open
(
destfile
,
'w'
,
encoding
=
'utf8'
)
as
f
:
os
.
rename
(
destfile
,
target
)
f
.
write
(
'# system configuration generated and used by'
' the sysconfig module
\n
'
)
f
.
write
(
'build_time_vars = '
)
pprint
.
pprint
(
vars
,
stream
=
f
)
# Create file used for sys.path fixup -- see Modules/getpath.c
# Create file used for sys.path fixup -- see Modules/getpath.c
with
open
(
'pybuilddir.txt'
,
'w'
,
encoding
=
'ascii'
)
as
f
:
with
open
(
'pybuilddir.txt'
,
'w'
,
encoding
=
'ascii'
)
as
f
:
...
...
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