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
b04a0570
Kaydet (Commit)
b04a0570
authored
May 06, 2009
tarafından
Tarek Ziadé
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
pep8-fied build_clib module : it is now similar to the one in 3.x
üst
d2bb1a53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
28 deletions
+5
-28
build_clib.py
Lib/distutils/command/build_clib.py
+5
-28
No files found.
Lib/distutils/command/build_clib.py
Dosyayı görüntüle @
b04a0570
...
...
@@ -17,7 +17,6 @@ __revision__ = "$Id$"
# cut 'n paste. Sigh.
import
os
,
string
from
types
import
*
from
distutils.core
import
Command
from
distutils.errors
import
*
from
distutils.sysconfig
import
customize_compiler
...
...
@@ -52,7 +51,7 @@ class build_clib (Command):
"list available compilers"
,
show_compilers
),
]
def
initialize_options
(
self
):
def
initialize_options
(
self
):
self
.
build_clib
=
None
self
.
build_temp
=
None
...
...
@@ -67,11 +66,8 @@ class build_clib (Command):
self
.
force
=
0
self
.
compiler
=
None
# initialize_options()
def
finalize_options
(
self
):
def
finalize_options
(
self
):
# This might be confusing: both build-clib and build-temp default
# to build-temp as defined by the "build" command. This is because
# I think that C libraries are really just temporary build
...
...
@@ -97,11 +93,7 @@ class build_clib (Command):
# XXX same as for build_ext -- what about 'self.define' and
# 'self.undef' ?
# finalize_options()
def
run
(
self
):
def
run
(
self
):
if
not
self
.
libraries
:
return
...
...
@@ -124,8 +116,6 @@ class build_clib (Command):
self
.
build_libraries
(
self
.
libraries
)
# run()
def
check_library_list
(
self
,
libraries
):
"""Ensure that the list of libraries is valid.
...
...
@@ -163,10 +153,9 @@ class build_clib (Command):
"second element of each tuple in 'libraries' "
+
\
"must be a dictionary (build info)"
def
get_library_names
(
self
):
def
get_library_names
(
self
):
# Assume the library list is valid -- 'check_library_list()' is
# called from 'finalize_options()', so it should be!
if
not
self
.
libraries
:
return
None
...
...
@@ -175,10 +164,8 @@ class build_clib (Command):
lib_names
.
append
(
lib_name
)
return
lib_names
# get_library_names ()
def
get_source_files
(
self
):
def
get_source_files
(
self
):
self
.
check_library_list
(
self
.
libraries
)
filenames
=
[]
for
(
lib_name
,
build_info
)
in
self
.
libraries
:
...
...
@@ -191,13 +178,9 @@ class build_clib (Command):
"a list of source filenames"
)
%
lib_name
filenames
.
extend
(
sources
)
return
filenames
# get_source_files ()
def
build_libraries
(
self
,
libraries
):
for
(
lib_name
,
build_info
)
in
libraries
:
sources
=
build_info
.
get
(
'sources'
)
if
sources
is
None
or
type
(
sources
)
not
in
(
ListType
,
TupleType
):
...
...
@@ -226,9 +209,3 @@ class build_clib (Command):
self
.
compiler
.
create_static_lib
(
objects
,
lib_name
,
output_dir
=
self
.
build_clib
,
debug
=
self
.
debug
)
# for libraries
# build_libraries ()
# class build_lib
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