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
21d45356
Kaydet (Commit)
21d45356
authored
Ara 06, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Whitespace normalization.
üst
b94b849d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
48 additions
and
48 deletions
+48
-48
bdist.py
Lib/distutils/command/bdist.py
+2
-2
bdist_rpm.py
Lib/distutils/command/bdist_rpm.py
+11
-11
bdist_wininst.py
Lib/distutils/command/bdist_wininst.py
+1
-1
build_clib.py
Lib/distutils/command/build_clib.py
+2
-2
build_ext.py
Lib/distutils/command/build_ext.py
+10
-10
build_py.py
Lib/distutils/command/build_py.py
+3
-3
config.py
Lib/distutils/command/config.py
+2
-2
install.py
Lib/distutils/command/install.py
+5
-5
install_headers.py
Lib/distutils/command/install_headers.py
+1
-1
install_lib.py
Lib/distutils/command/install_lib.py
+6
-6
sdist.py
Lib/distutils/command/sdist.py
+5
-5
No files found.
Lib/distutils/command/bdist.py
Dosyayı görüntüle @
21d45356
...
...
@@ -17,7 +17,7 @@ from distutils.util import get_platform
def
show_formats
():
"""Print list of available formats (arguments to "--format" option).
"""
from
distutils.fancy_getopt
import
FancyGetopt
from
distutils.fancy_getopt
import
FancyGetopt
formats
=
[]
for
format
in
bdist
.
format_commands
:
formats
.
append
((
"formats="
+
format
,
None
,
...
...
@@ -104,7 +104,7 @@ class bdist (Command):
if
self
.
dist_dir
is
None
:
self
.
dist_dir
=
"dist"
# finalize_options()
...
...
Lib/distutils/command/bdist_rpm.py
Dosyayı görüntüle @
21d45356
...
...
@@ -101,7 +101,7 @@ class bdist_rpm (Command):
'no-rpm-opt-flags'
:
'use-rpm-opt-flags'
,
'rpm2-mode'
:
'rpm3-mode'
}
def
initialize_options
(
self
):
self
.
bdist_base
=
None
self
.
rpm_base
=
None
...
...
@@ -184,7 +184,7 @@ class bdist_rpm (Command):
self
.
ensure_string
(
'vendor'
,
"
%
s <
%
s>"
%
(
self
.
distribution
.
get_contact
(),
self
.
distribution
.
get_contact_email
()))
self
.
ensure_string
(
'packager'
)
self
.
ensure_string
(
'packager'
)
self
.
ensure_string_list
(
'doc_files'
)
if
type
(
self
.
doc_files
)
is
ListType
:
for
readme
in
(
'README'
,
'README.txt'
):
...
...
@@ -201,7 +201,7 @@ class bdist_rpm (Command):
self
.
changelog
=
self
.
_format_changelog
(
self
.
changelog
)
self
.
ensure_filename
(
'icon'
)
self
.
ensure_filename
(
'prep_script'
)
self
.
ensure_filename
(
'build_script'
)
self
.
ensure_filename
(
'install_script'
)
...
...
@@ -275,7 +275,7 @@ class bdist_rpm (Command):
else
:
raise
DistutilsFileError
,
\
"icon file '
%
s' does not exist"
%
self
.
icon
# build package
self
.
announce
(
'building RPMs'
)
...
...
@@ -368,17 +368,17 @@ class bdist_rpm (Command):
spec_file
.
append
(
'
%
s:
%
s'
%
(
field
,
string
.
join
(
val
)))
elif
val
is
not
None
:
spec_file
.
append
(
'
%
s:
%
s'
%
(
field
,
val
))
if
self
.
distribution
.
get_url
()
!=
'UNKNOWN'
:
spec_file
.
append
(
'Url: '
+
self
.
distribution
.
get_url
())
if
self
.
distribution_name
:
spec_file
.
append
(
'Distribution: '
+
self
.
distribution_name
)
spec_file
.
append
(
'Distribution: '
+
self
.
distribution_name
)
if
self
.
build_requires
:
spec_file
.
append
(
'BuildRequires: '
+
string
.
join
(
self
.
build_requires
))
spec_file
.
append
(
'BuildRequires: '
+
string
.
join
(
self
.
build_requires
))
if
self
.
icon
:
spec_file
.
append
(
'Icon: '
+
os
.
path
.
basename
(
self
.
icon
))
...
...
@@ -473,11 +473,11 @@ class bdist_rpm (Command):
new_changelog
.
append
(
line
)
else
:
new_changelog
.
append
(
' '
+
line
)
# strip trailing newline inserted by first changelog entry
if
not
new_changelog
[
0
]:
del
new_changelog
[
0
]
return
new_changelog
# _format_changelog()
...
...
Lib/distutils/command/bdist_wininst.py
Dosyayı görüntüle @
21d45356
...
...
@@ -196,7 +196,7 @@ class bdist_wininst (Command):
file
.
write
(
self
.
get_exe_bytes
())
if
bitmap
:
file
.
write
(
bitmapdata
)
file
.
write
(
cfgdata
)
header
=
struct
.
pack
(
"<iii"
,
0x1234567A
,
# tag
...
...
Lib/distutils/command/build_clib.py
Dosyayı görüntüle @
21d45356
...
...
@@ -156,7 +156,7 @@ class build_clib (Command):
"must be a string (the library name)"
if
'/'
in
lib
[
0
]
or
(
os
.
sep
!=
'/'
and
os
.
sep
in
lib
[
0
]):
raise
DistutilsSetupError
,
\
(
"bad library name '
%
s': "
+
(
"bad library name '
%
s': "
+
"may not contain directory separators"
)
%
\
lib
[
0
]
...
...
@@ -195,7 +195,7 @@ class build_clib (Command):
(
"in 'libraries' option (library '
%
s'), "
"'sources' must be present and must be "
"a list of source filenames"
)
%
lib_name
filenames
.
extend
(
sources
)
return
filenames
...
...
Lib/distutils/command/build_ext.py
Dosyayı görüntüle @
21d45356
...
...
@@ -28,7 +28,7 @@ def show_compilers ():
class
build_ext
(
Command
):
description
=
"build C/C++ extensions (compile/link to build directory)"
# XXX thoughts on how to deal with complex command-line options like
...
...
@@ -123,7 +123,7 @@ class build_ext (Command):
self
.
package
=
self
.
distribution
.
ext_package
self
.
extensions
=
self
.
distribution
.
ext_modules
# Make sure Python's include directories (for Python.h, pyconfig.h,
# etc.) are in the include search path.
...
...
@@ -181,7 +181,7 @@ class build_ext (Command):
# it has to be a list of 2-tuples. All the preprocessor symbols
# specified by the 'define' option will be set to '1'. Multiple
# symbols can be separated with commas.
if
self
.
define
:
defines
=
string
.
split
(
self
.
define
,
','
)
self
.
define
=
map
(
lambda
symbol
:
(
symbol
,
'1'
),
defines
)
...
...
@@ -193,7 +193,7 @@ class build_ext (Command):
self
.
undef
=
string
.
split
(
self
.
undef
,
','
)
# finalize_options ()
def
run
(
self
):
...
...
@@ -202,7 +202,7 @@ class build_ext (Command):
# 'self.extensions', as supplied by setup.py, is a list of
# Extension instances. See the documentation for Extension (in
# distutils.extension) for details.
#
#
# For backwards compatibility with Distutils 0.8.2 and earlier, we
# also allow the 'extensions' list to be a list of tuples:
# (ext_name, build_info)
...
...
@@ -271,7 +271,7 @@ class build_ext (Command):
if
type
(
extensions
)
is
not
ListType
:
raise
DistutilsSetupError
,
\
"'ext_modules' option must be a list of Extension instances"
for
i
in
range
(
len
(
extensions
)):
ext
=
extensions
[
i
]
if
isinstance
(
ext
,
Extension
):
...
...
@@ -280,7 +280,7 @@ class build_ext (Command):
(
ext_name
,
build_info
)
=
ext
self
.
warn
((
"old-style (ext_name, build_info) tuple found in "
"ext_modules for extension '
%
s'"
"ext_modules for extension '
%
s'"
"-- please convert to Extension instance"
%
ext_name
))
if
type
(
ext
)
is
not
TupleType
and
len
(
ext
)
!=
2
:
raise
DistutilsSetupError
,
\
...
...
@@ -465,12 +465,12 @@ class build_ext (Command):
self
.
compiler
.
link_shared_object
(
objects
,
ext_filename
,
objects
,
ext_filename
,
libraries
=
self
.
get_libraries
(
ext
),
library_dirs
=
ext
.
library_dirs
,
runtime_library_dirs
=
ext
.
runtime_library_dirs
,
extra_postargs
=
extra_args
,
export_symbols
=
self
.
get_export_symbols
(
ext
),
export_symbols
=
self
.
get_export_symbols
(
ext
),
debug
=
self
.
debug
,
build_temp
=
self
.
build_temp
)
...
...
@@ -549,7 +549,7 @@ class build_ext (Command):
"on platform '
%
s'"
)
%
os
.
name
# find_swig ()
# -- Name generators -----------------------------------------------
# (extension names, filenames, whatever)
...
...
Lib/distutils/command/build_py.py
Dosyayı görüntüle @
21d45356
...
...
@@ -106,7 +106,7 @@ class build_py (Command):
self
.
byte_compile
(
self
.
get_outputs
(
include_bytecode
=
0
))
# run ()
def
get_package_dir
(
self
,
package
):
"""Return the directory, relative to the top of the source
...
...
@@ -178,13 +178,13 @@ class build_py (Command):
# Either not in a package at all (__init__.py not expected), or
# __init__.py doesn't exist -- so don't return the filename.
return
# check_package ()
def
check_module
(
self
,
module
,
module_file
):
if
not
os
.
path
.
isfile
(
module_file
):
self
.
warn
(
"file
%
s (for module
%
s) not found"
%
self
.
warn
(
"file
%
s (for module
%
s) not found"
%
(
module_file
,
module
))
return
0
else
:
...
...
Lib/distutils/command/config.py
Dosyayı görüntüle @
21d45356
...
...
@@ -147,7 +147,7 @@ class config (Command):
headers
,
include_dirs
,
libraries
,
library_dirs
,
lang
):
(
src
,
obj
)
=
self
.
_compile
(
body
,
headers
,
include_dirs
,
lang
)
prog
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
src
))[
0
]
prog
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
src
))[
0
]
self
.
compiler
.
link_executable
([
obj
],
prog
,
libraries
=
libraries
,
library_dirs
=
library_dirs
)
...
...
@@ -263,7 +263,7 @@ class config (Command):
self
.
announce
(
ok
and
"success!"
or
"failure."
)
self
.
_clean
()
return
ok
def
try_run
(
self
,
body
,
headers
=
None
,
include_dirs
=
None
,
libraries
=
None
,
library_dirs
=
None
,
...
...
Lib/distutils/command/install.py
Dosyayı görüntüle @
21d45356
...
...
@@ -110,7 +110,7 @@ class install (Command):
(
'optimize='
,
'O'
,
"also compile with optimization: -O1 for
\"
python -O
\"
, "
"-O2 for
\"
python -OO
\"
, and -O0 to disable [default: -O0]"
),
# Miscellaneous control options
(
'force'
,
'f'
,
"force installation (overwrite any existing files)"
),
...
...
@@ -305,7 +305,7 @@ class install (Command):
self
.
install_lib
=
self
.
install_platlib
else
:
self
.
install_lib
=
self
.
install_purelib
# Convert directories from Unix /-separated syntax to the local
# convention.
...
...
@@ -353,7 +353,7 @@ class install (Command):
def
finalize_unix
(
self
):
if
self
.
install_base
is
not
None
or
self
.
install_platbase
is
not
None
:
if
((
self
.
install_lib
is
None
and
self
.
install_purelib
is
None
and
...
...
@@ -426,7 +426,7 @@ class install (Command):
def
expand_basedirs
(
self
):
self
.
_expand_attrs
([
'install_base'
,
'install_platbase'
,
'root'
])
'root'
])
def
expand_dirs
(
self
):
self
.
_expand_attrs
([
'install_purelib'
,
...
...
@@ -550,7 +550,7 @@ class install (Command):
if
self
.
path_file
and
self
.
install_path_file
:
outputs
.
append
(
os
.
path
.
join
(
self
.
install_libbase
,
self
.
path_file
+
".pth"
))
return
outputs
def
get_inputs
(
self
):
...
...
Lib/distutils/command/install_headers.py
Dosyayı görüntüle @
21d45356
...
...
@@ -32,7 +32,7 @@ class install_headers (Command):
self
.
set_undefined_options
(
'install'
,
(
'install_headers'
,
'install_dir'
),
(
'force'
,
'force'
))
def
run
(
self
):
headers
=
self
.
distribution
.
headers
...
...
Lib/distutils/command/install_lib.py
Dosyayı görüntüle @
21d45356
...
...
@@ -20,7 +20,7 @@ class install_lib (Command):
# 4) compile "level 1" .pyo only (--no-compile --optimize)
# 5) compile .pyc and "level 2" .pyo (--compile --optimize-more)
# 6) compile "level 2" .pyo only (--no-compile --optimize-more)
#
#
# The UI for this is two option, 'compile' and 'optimize'.
# 'compile' is strictly boolean, and only decides whether to
# generate .pyc files. 'optimize' is three-way (0, 1, or 2), and
...
...
@@ -38,7 +38,7 @@ class install_lib (Command):
"-O2 for
\"
python -OO
\"
, and -O0 to disable [default: -O0]"
),
(
'skip-build'
,
None
,
"skip the build steps"
),
]
boolean_options
=
[
'force'
,
'compile'
,
'skip-build'
]
negative_opt
=
{
'no-compile'
:
'compile'
}
...
...
@@ -82,7 +82,7 @@ class install_lib (Command):
# Make sure we have built everything we need first
self
.
build
()
# Install everything: simply dump the entire contents of the build
# directory to the installation directory (that's the beauty of
# having a build directory!)
...
...
@@ -104,7 +104,7 @@ class install_lib (Command):
self
.
run_command
(
'build_py'
)
if
self
.
distribution
.
has_ext_modules
():
self
.
run_command
(
'build_ext'
)
def
install
(
self
):
if
os
.
path
.
isdir
(
self
.
build_dir
):
outfiles
=
self
.
copy_tree
(
self
.
build_dir
,
self
.
install_dir
)
...
...
@@ -164,7 +164,7 @@ class install_lib (Command):
bytecode_files
.
append
(
py_file
+
"o"
)
return
bytecode_files
# -- External interface --------------------------------------------
# (called by outsiders)
...
...
@@ -199,7 +199,7 @@ class install_lib (Command):
filenames returned by 'get_outputs()'.
"""
inputs
=
[]
if
self
.
distribution
.
has_pure_modules
():
build_py
=
self
.
get_finalized_command
(
'build_py'
)
inputs
.
extend
(
build_py
.
get_outputs
())
...
...
Lib/distutils/command/sdist.py
Dosyayı görüntüle @
21d45356
...
...
@@ -131,7 +131,7 @@ class sdist (Command):
# 'filelist' contains the list of files that will make up the
# manifest
self
.
filelist
=
FileList
()
# Ensure that all required meta-data is given; warn if not (but
# don't die, it's not *that* serious!)
self
.
check_metadata
()
...
...
@@ -318,7 +318,7 @@ class sdist (Command):
self
.
filelist
.
extend
(
build_clib
.
get_source_files
())
# add_defaults ()
def
read_template
(
self
):
...
...
@@ -395,7 +395,7 @@ class sdist (Command):
self
.
filelist
.
append
(
line
)
# read_manifest ()
def
make_release_tree
(
self
,
base_dir
,
files
):
"""Create the directory tree that will become the source
...
...
@@ -419,7 +419,7 @@ class sdist (Command):
# that's out-of-date in 'base_dir'. (Usually, all files will be
# out-of-date, because by default we blow away 'base_dir' when
# we're done making the distribution archives.)
if
hasattr
(
os
,
'link'
):
# can make hard links on this system
link
=
'hard'
msg
=
"making hard links in
%
s..."
%
base_dir
...
...
@@ -439,7 +439,7 @@ class sdist (Command):
self
.
copy_file
(
file
,
dest
,
link
=
link
)
self
.
distribution
.
metadata
.
write_pkg_info
(
base_dir
)
# make_release_tree ()
def
make_distribution
(
self
):
...
...
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