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
55fced3d
Kaydet (Commit)
55fced3d
authored
Haz 24, 2000
tarafından
Greg Ward
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More stylistic tweaks to the generic '--help-xxx' code.
üst
2ff78872
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
dist.py
Lib/distutils/dist.py
+15
-12
No files found.
Lib/distutils/dist.py
Dosyayı görüntüle @
55fced3d
...
@@ -443,13 +443,14 @@ class Distribution:
...
@@ -443,13 +443,14 @@ class Distribution:
type
(
cmd_class
.
help_options
)
is
ListType
):
type
(
cmd_class
.
help_options
)
is
ListType
):
help_options
=
fix_help_options
(
cmd_class
.
help_options
)
help_options
=
fix_help_options
(
cmd_class
.
help_options
)
else
:
else
:
help_optio
sn
=
[]
help_optio
ns
=
[]
# All commands support the global options too, just by adding
# All commands support the global options too, just by adding
# in 'global_options'.
# in 'global_options'.
parser
.
set_option_table
(
self
.
global_options
+
parser
.
set_option_table
(
self
.
global_options
+
cmd_class
.
user_options
+
help_options
)
cmd_class
.
user_options
+
help_options
)
parser
.
set_negative_aliases
(
negative_opt
)
parser
.
set_negative_aliases
(
negative_opt
)
(
args
,
opts
)
=
parser
.
getopt
(
args
[
1
:])
(
args
,
opts
)
=
parser
.
getopt
(
args
[
1
:])
if
hasattr
(
opts
,
'help'
)
and
opts
.
help
:
if
hasattr
(
opts
,
'help'
)
and
opts
.
help
:
...
@@ -459,19 +460,21 @@ class Distribution:
...
@@ -459,19 +460,21 @@ class Distribution:
if
(
hasattr
(
cmd_class
,
'help_options'
)
and
if
(
hasattr
(
cmd_class
,
'help_options'
)
and
type
(
cmd_class
.
help_options
)
is
ListType
):
type
(
cmd_class
.
help_options
)
is
ListType
):
help_option_found
=
0
help_option_found
=
0
for
help_option
in
cmd_class
.
help_options
:
for
(
help_option
,
short
,
desc
,
func
)
in
cmd_class
.
help_options
:
if
hasattr
(
opts
,
parser
.
get_attr_name
(
help_option
[
0
]
)):
if
hasattr
(
opts
,
parser
.
get_attr_name
(
help_option
)):
help_option_found
=
1
help_option_found
=
1
#print "showing help for option %s of command %s" % \
#print "showing help for option %s of command %s" % \
# (help_option[0],cmd_class)
# (help_option[0],cmd_class)
if
callable
(
help_option
[
3
]):
help_option
[
3
]()
if
callable
(
func
):
else
:
func
()
raise
DistutilsClassError
,
\
else
:
(
"command class
%
s must provide "
+
raise
DistutilsClassError
,
\
"a callable object for help_option '
%
s'"
)
%
\
(
"invalid help function
%
s for help option '
%
s': "
(
cmd_class
,
help_option
[
0
])
"must be a callable object (function, etc.)"
)
%
\
if
help_option_found
:
(
`func`
,
help_option
)
if
help_option_found
:
return
return
# Put the options from the command-line into their official
# Put the options from the command-line into their official
...
...
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