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
1b046e43
Kaydet (Commit)
1b046e43
authored
Haz 18, 2002
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add implementation of _compile() and use default compile() method.
üst
6e08d22b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
84 deletions
+33
-84
cygwinccompiler.py
Lib/distutils/cygwinccompiler.py
+14
-31
emxccompiler.py
Lib/distutils/emxccompiler.py
+13
-35
unixccompiler.py
Lib/distutils/unixccompiler.py
+6
-18
No files found.
Lib/distutils/cygwinccompiler.py
Dosyayı görüntüle @
1b046e43
...
@@ -113,37 +113,20 @@ class CygwinCCompiler (UnixCCompiler):
...
@@ -113,37 +113,20 @@ class CygwinCCompiler (UnixCCompiler):
# __init__ ()
# __init__ ()
# not much different of the compile method in UnixCCompiler,
# but we have to insert some lines in the middle of it, so
def
_compile
(
self
,
obj
,
src
,
ext
,
cc_args
,
extra_postargs
,
pp_opts
):
# we put here a adapted version of it.
if
ext
==
'.rc'
or
ext
==
'.res'
:
# (If we would call compile() in the base class, it would do some
# gcc needs '.res' and '.rc' compiled to object files !!!
# initializations a second time, this is why all is done here.)
try
:
def
compile
(
self
,
sources
,
self
.
spawn
([
"windres"
,
"-i"
,
src
,
"-o"
,
obj
])
output_dir
=
None
,
macros
=
None
,
include_dirs
=
None
,
debug
=
0
,
except
DistutilsExecError
,
msg
:
extra_preargs
=
None
,
extra_postargs
=
None
,
depends
=
None
):
raise
CompileError
,
msg
else
:
# for other files use the C-compiler
macros
,
objects
,
extra_postargs
,
pp_opts
,
build
=
\
try
:
self
.
_setup_compile
(
output_dir
,
macros
,
include_dirs
,
sources
,
self
.
spawn
(
self
.
compiler_so
+
cc_args
+
[
src
,
'-o'
,
obj
]
+
depends
,
extra_postargs
)
extra_postargs
)
cc_args
=
self
.
_get_cc_args
(
pp_opts
,
debug
,
extra_preargs
)
except
DistutilsExecError
,
msg
:
raise
CompileError
,
msg
for
obj
,
(
src
,
ext
)
in
build
.
items
():
if
ext
==
'.rc'
or
ext
==
'.res'
:
# gcc needs '.res' and '.rc' compiled to object files !!!
try
:
self
.
spawn
([
"windres"
,
"-i"
,
src
,
"-o"
,
obj
])
except
DistutilsExecError
,
msg
:
raise
CompileError
,
msg
else
:
# for other files use the C-compiler
try
:
self
.
spawn
(
self
.
compiler_so
+
cc_args
+
[
src
,
'-o'
,
obj
]
+
extra_postargs
)
except
DistutilsExecError
,
msg
:
raise
CompileError
,
msg
# Return *all* object filenames, not just the ones we just built.
return
objects
def
link
(
self
,
def
link
(
self
,
target_desc
,
target_desc
,
...
...
Lib/distutils/emxccompiler.py
Dosyayı görüntüle @
1b046e43
...
@@ -76,41 +76,19 @@ class EMXCCompiler (UnixCCompiler):
...
@@ -76,41 +76,19 @@ class EMXCCompiler (UnixCCompiler):
# __init__ ()
# __init__ ()
# not much different of the compile method in UnixCCompiler,
def
_compile
(
self
,
obj
,
src
,
ext
,
cc_args
,
extra_postargs
):
# but we have to insert some lines in the middle of it, so
if
ext
==
'.rc'
:
# we put here a adapted version of it.
# gcc requires '.rc' compiled to binary ('.res') files !!!
# (If we would call compile() in the base class, it would do some
try
:
# initializations a second time, this is why all is done here.)
self
.
spawn
([
"rc"
,
"-r"
,
src
])
except
DistutilsExecError
,
msg
:
def
compile
(
self
,
sources
,
raise
CompileError
,
msg
output_dir
=
None
,
macros
=
None
,
include_dirs
=
None
,
debug
=
0
,
else
:
# for other files use the C-compiler
extra_preargs
=
None
,
extra_postargs
=
None
,
depends
=
None
):
try
:
self
.
spawn
(
self
.
compiler_so
+
cc_args
+
[
src
,
'-o'
,
obj
]
+
macros
,
objects
,
extra_postargs
,
pp_opts
,
build
=
\
extra_postargs
)
self
.
_setup_compile
(
output_dir
,
macros
,
include_dirs
,
sources
,
except
DistutilsExecError
,
msg
:
depends
,
extra_postargs
)
raise
CompileError
,
msg
cc_args
=
self
.
_get_cc_args
(
pp_opts
,
debug
,
extra_preargs
)
for
obj
,
(
src
,
ext
)
in
build
.
items
():
if
ext
==
'.rc'
:
# gcc requires '.rc' compiled to binary ('.res') files !!!
try
:
self
.
spawn
([
"rc"
,
"-r"
,
src
])
except
DistutilsExecError
,
msg
:
raise
CompileError
,
msg
else
:
# for other files use the C-compiler
try
:
self
.
spawn
(
self
.
compiler_so
+
cc_args
+
[
src
,
'-o'
,
obj
]
+
extra_postargs
)
except
DistutilsExecError
,
msg
:
raise
CompileError
,
msg
# Return *all* object filenames, not just the ones we just built.
return
objects
# compile ()
def
link
(
self
,
def
link
(
self
,
target_desc
,
target_desc
,
...
...
Lib/distutils/unixccompiler.py
Dosyayı görüntüle @
1b046e43
...
@@ -105,24 +105,12 @@ class UnixCCompiler(CCompiler):
...
@@ -105,24 +105,12 @@ class UnixCCompiler(CCompiler):
except
DistutilsExecError
,
msg
:
except
DistutilsExecError
,
msg
:
raise
CompileError
,
msg
raise
CompileError
,
msg
def
compile
(
self
,
sources
,
def
_compile
(
self
,
obj
,
src
,
ext
,
cc_args
,
extra_postargs
,
pp_opts
):
output_dir
=
None
,
macros
=
None
,
include_dirs
=
None
,
debug
=
0
,
try
:
extra_preargs
=
None
,
extra_postargs
=
None
,
depends
=
None
):
self
.
spawn
(
self
.
compiler_so
+
cc_args
+
[
src
,
'-o'
,
obj
]
+
extra_postargs
)
macros
,
objects
,
extra_postargs
,
pp_opts
,
build
=
\
except
DistutilsExecError
,
msg
:
self
.
_setup_compile
(
output_dir
,
macros
,
include_dirs
,
sources
,
raise
CompileError
,
msg
depends
,
extra_postargs
)
cc_args
=
self
.
_get_cc_args
(
pp_opts
,
debug
,
extra_preargs
)
for
obj
,
(
src
,
ext
)
in
build
.
items
():
try
:
self
.
spawn
(
self
.
compiler_so
+
cc_args
+
[
src
,
'-o'
,
obj
]
+
extra_postargs
)
except
DistutilsExecError
,
msg
:
raise
CompileError
,
msg
# Return *all* object filenames, not just the ones we just built.
return
objects
def
create_static_lib
(
self
,
objects
,
output_libname
,
def
create_static_lib
(
self
,
objects
,
output_libname
,
output_dir
=
None
,
debug
=
0
):
output_dir
=
None
,
debug
=
0
):
...
...
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