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
05adf073
Kaydet (Commit)
05adf073
authored
Şub 06, 2009
tarafından
Tarek Ziadé
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fixed #1520877: now distutils reads Read from the environment/Makefile
üst
aaf2e188
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
3 deletions
+31
-3
sysconfig.py
Lib/distutils/sysconfig.py
+6
-3
test_sysconfig.py
Lib/distutils/tests/test_sysconfig.py
+22
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/distutils/sysconfig.py
Dosyayı görüntüle @
05adf073
...
@@ -165,9 +165,9 @@ def customize_compiler(compiler):
...
@@ -165,9 +165,9 @@ def customize_compiler(compiler):
varies across Unices and is stored in Python's Makefile.
varies across Unices and is stored in Python's Makefile.
"""
"""
if
compiler
.
compiler_type
==
"unix"
:
if
compiler
.
compiler_type
==
"unix"
:
(
cc
,
cxx
,
opt
,
cflags
,
ccshared
,
ldshared
,
so_ext
)
=
\
(
cc
,
cxx
,
opt
,
cflags
,
ccshared
,
ldshared
,
so_ext
,
ar
)
=
\
get_config_vars
(
'CC'
,
'CXX'
,
'OPT'
,
'CFLAGS'
,
get_config_vars
(
'CC'
,
'CXX'
,
'OPT'
,
'CFLAGS'
,
'CCSHARED'
,
'LDSHARED'
,
'SO'
)
'CCSHARED'
,
'LDSHARED'
,
'SO'
,
'AR'
)
if
'CC'
in
os
.
environ
:
if
'CC'
in
os
.
environ
:
cc
=
os
.
environ
[
'CC'
]
cc
=
os
.
environ
[
'CC'
]
...
@@ -188,6 +188,8 @@ def customize_compiler(compiler):
...
@@ -188,6 +188,8 @@ def customize_compiler(compiler):
cpp
=
cpp
+
' '
+
os
.
environ
[
'CPPFLAGS'
]
cpp
=
cpp
+
' '
+
os
.
environ
[
'CPPFLAGS'
]
cflags
=
cflags
+
' '
+
os
.
environ
[
'CPPFLAGS'
]
cflags
=
cflags
+
' '
+
os
.
environ
[
'CPPFLAGS'
]
ldshared
=
ldshared
+
' '
+
os
.
environ
[
'CPPFLAGS'
]
ldshared
=
ldshared
+
' '
+
os
.
environ
[
'CPPFLAGS'
]
if
'AR'
in
os
.
environ
:
ar
=
os
.
environ
[
'AR'
]
cc_cmd
=
cc
+
' '
+
cflags
cc_cmd
=
cc
+
' '
+
cflags
compiler
.
set_executables
(
compiler
.
set_executables
(
...
@@ -196,7 +198,8 @@ def customize_compiler(compiler):
...
@@ -196,7 +198,8 @@ def customize_compiler(compiler):
compiler_so
=
cc_cmd
+
' '
+
ccshared
,
compiler_so
=
cc_cmd
+
' '
+
ccshared
,
compiler_cxx
=
cxx
,
compiler_cxx
=
cxx
,
linker_so
=
ldshared
,
linker_so
=
ldshared
,
linker_exe
=
cc
)
linker_exe
=
cc
,
archiver
=
ar
)
compiler
.
shared_lib_extension
=
so_ext
compiler
.
shared_lib_extension
=
so_ext
...
...
Lib/distutils/tests/test_sysconfig.py
Dosyayı görüntüle @
05adf073
...
@@ -8,6 +8,13 @@ from test.test_support import TESTFN
...
@@ -8,6 +8,13 @@ from test.test_support import TESTFN
class
SysconfigTestCase
(
unittest
.
TestCase
):
class
SysconfigTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
old_AR
=
os
.
environ
.
get
(
'AR'
)
def
tearDown
(
self
):
if
self
.
old_AR
is
not
None
:
os
.
environ
[
'AR'
]
=
self
.
old_AR
def
test_get_config_h_filename
(
self
):
def
test_get_config_h_filename
(
self
):
config_h
=
sysconfig
.
get_config_h_filename
()
config_h
=
sysconfig
.
get_config_h_filename
()
self
.
assert_
(
os
.
path
.
isfile
(
config_h
),
config_h
)
self
.
assert_
(
os
.
path
.
isfile
(
config_h
),
config_h
)
...
@@ -32,6 +39,21 @@ class SysconfigTestCase(unittest.TestCase):
...
@@ -32,6 +39,21 @@ class SysconfigTestCase(unittest.TestCase):
self
.
assert_
(
isinstance
(
cvars
,
dict
))
self
.
assert_
(
isinstance
(
cvars
,
dict
))
self
.
assert_
(
cvars
)
self
.
assert_
(
cvars
)
def
test_customize_compiler
(
self
):
os
.
environ
[
'AR'
]
=
'xxx'
# make sure AR gets caught
class
compiler
:
compiler_type
=
'unix'
def
set_executables
(
self
,
**
kw
):
self
.
exes
=
kw
comp
=
compiler
()
sysconfig
.
customize_compiler
(
comp
)
self
.
assertEquals
(
comp
.
exes
[
'archiver'
],
'xxx'
)
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
...
...
Misc/NEWS
Dosyayı görüntüle @
05adf073
...
@@ -149,6 +149,9 @@ Core and Builtins
...
@@ -149,6 +149,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #1520877: Now distutils.sysconfig reads $AR from the
environment/Makefile. Patch by Douglas Greiman.
- Issue #4285: Change sys.version_info to be a named tuple. Patch by
- Issue #4285: Change sys.version_info to be a named tuple. Patch by
Ross Light.
Ross Light.
...
...
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