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
95333e3a
Kaydet (Commit)
95333e3a
authored
Ara 14, 2010
tarafından
R. David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More comprehensive compileall cli tests, and fixes.
üst
e7fed672
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
compileall.py
Lib/compileall.py
+20
-14
test_compileall.py
Lib/test/test_compileall.py
+0
-0
No files found.
Lib/compileall.py
Dosyayı görüntüle @
95333e3a
...
@@ -181,24 +181,29 @@ def main():
...
@@ -181,24 +181,29 @@ def main():
'of the file'
))
'of the file'
))
parser
.
add_argument
(
'-i'
,
metavar
=
'FILE'
,
dest
=
'flist'
,
parser
.
add_argument
(
'-i'
,
metavar
=
'FILE'
,
dest
=
'flist'
,
help
=
'expand the list with the content of FILE.'
)
help
=
'expand the list with the content of FILE.'
)
parser
.
add_argument
(
'compile_dest'
,
metavar
=
'FILE|DIR'
,
nargs
=
'
?
'
)
parser
.
add_argument
(
'compile_dest'
,
metavar
=
'FILE|DIR'
,
nargs
=
'
*
'
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
if
(
args
.
ddir
and
args
.
compile_dest
!=
1
and
compile_dests
=
args
.
compile_dest
not
os
.
path
.
isdir
(
args
.
compile_dest
)):
raise
argparse
.
ArgumentError
(
if
(
args
.
ddir
and
(
len
(
compile_dests
)
!=
1
"-d destdir requires exactly one directory argument"
)
or
not
os
.
path
.
isdir
(
compile_dests
[
0
]))):
parser
.
exit
(
'-d destdir requires exactly one directory argument'
)
if
args
.
rx
:
if
args
.
rx
:
import
re
import
re
args
.
rx
=
re
.
compile
(
args
.
rx
)
args
.
rx
=
re
.
compile
(
args
.
rx
)
# if flist is provided then load it
# if flist is provided then load it
compile_dests
=
[
args
.
compile_dest
]
if
args
.
flist
:
if
args
.
flist
:
with
open
(
args
.
flist
)
as
f
:
try
:
files
=
f
.
read
()
.
split
()
with
(
sys
.
stdin
if
args
.
flist
==
'-'
else
open
(
args
.
flist
))
as
f
:
compile_dests
.
extend
(
files
)
for
line
in
f
:
compile_dests
.
append
(
line
.
strip
())
except
EnvironmentError
:
print
(
"Error reading file list {}"
.
format
(
args
.
flist
))
return
False
success
=
True
try
:
try
:
if
compile_dests
:
if
compile_dests
:
for
dest
in
compile_dests
:
for
dest
in
compile_dests
:
...
@@ -206,17 +211,18 @@ def main():
...
@@ -206,17 +211,18 @@ def main():
if
not
compile_dir
(
dest
,
args
.
maxlevels
,
args
.
ddir
,
if
not
compile_dir
(
dest
,
args
.
maxlevels
,
args
.
ddir
,
args
.
force
,
args
.
rx
,
args
.
quiet
,
args
.
force
,
args
.
rx
,
args
.
quiet
,
args
.
legacy
):
args
.
legacy
):
return
0
success
=
False
else
:
else
:
if
not
compile_file
(
dest
,
args
.
ddir
,
args
.
force
,
args
.
rx
,
if
not
compile_file
(
dest
,
args
.
ddir
,
args
.
force
,
args
.
rx
,
args
.
quiet
,
args
.
legacy
):
args
.
quiet
,
args
.
legacy
):
return
0
success
=
False
return
success
else
:
else
:
return
compile_path
(
legacy
=
args
.
legacy
)
return
compile_path
(
legacy
=
args
.
legacy
)
except
KeyboardInterrupt
:
except
KeyboardInterrupt
:
print
(
"
\n
[interrupted]"
)
print
(
"
\n
[interrupted]"
)
return
0
return
False
return
1
return
True
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
Lib/test/test_compileall.py
Dosyayı görüntüle @
95333e3a
This diff is collapsed.
Click to expand it.
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