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
e0c8c2fd
Kaydet (Commit)
e0c8c2fd
authored
Haz 08, 2000
tarafından
Greg Ward
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Docstring reformatting binge.
üst
f1fe1037
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
27 deletions
+22
-27
sdist.py
Lib/distutils/command/sdist.py
+22
-27
No files found.
Lib/distutils/command/sdist.py
Dosyayı görüntüle @
e0c8c2fd
...
@@ -68,8 +68,6 @@ class sdist (Command):
...
@@ -68,8 +68,6 @@ class sdist (Command):
default_format
=
{
'posix'
:
'gztar'
,
default_format
=
{
'posix'
:
'gztar'
,
'nt'
:
'zip'
}
'nt'
:
'zip'
}
exclude_re
=
re
.
compile
(
r'\s*!\s*(\S+)'
)
# for manifest lines
def
initialize_options
(
self
):
def
initialize_options
(
self
):
# 'template' and 'manifest' are, respectively, the names of
# 'template' and 'manifest' are, respectively, the names of
...
@@ -165,13 +163,11 @@ class sdist (Command):
...
@@ -165,13 +163,11 @@ class sdist (Command):
def
get_file_list
(
self
):
def
get_file_list
(
self
):
"""Figure out the list of files to include in the source
"""Figure out the list of files to include in the source
distribution, and put it in 'self.files'. This might
distribution, and put it in 'self.files'. This might involve
involve reading the manifest template (and writing the
reading the manifest template (and writing the manifest), or just
manifest), or just reading the manifest, or just using
reading the manifest, or just using the default file set -- it all
the default file set -- it all depends on the user's
depends on the user's options and the state of the filesystem.
options and the state of the filesystem."""
"""
template_exists
=
os
.
path
.
isfile
(
self
.
template
)
template_exists
=
os
.
path
.
isfile
(
self
.
template
)
if
template_exists
:
if
template_exists
:
template_newer
=
newer
(
self
.
template
,
self
.
manifest
)
template_newer
=
newer
(
self
.
template
,
self
.
manifest
)
...
@@ -261,10 +257,9 @@ class sdist (Command):
...
@@ -261,10 +257,9 @@ class sdist (Command):
def
search_dir
(
self
,
dir
,
pattern
=
None
):
def
search_dir
(
self
,
dir
,
pattern
=
None
):
"""Recursively find files under 'dir' matching 'pattern' (a string
"""Recursively find files under 'dir' matching 'pattern' (a string
containing a Unix-style glob pattern). If 'pattern' is None,
containing a Unix-style glob pattern). If 'pattern' is None, find
find all files under 'dir'. Return the list of found
all files under 'dir'. Return the list of found filenames.
filenames."""
"""
allfiles
=
findall
(
dir
)
allfiles
=
findall
(
dir
)
if
pattern
is
None
:
if
pattern
is
None
:
return
allfiles
return
allfiles
...
@@ -291,9 +286,9 @@ class sdist (Command):
...
@@ -291,9 +286,9 @@ class sdist (Command):
def
recursive_exclude_pattern
(
self
,
dir
,
pattern
=
None
):
def
recursive_exclude_pattern
(
self
,
dir
,
pattern
=
None
):
"""Remove filenames from 'self.files' that are under 'dir'
"""Remove filenames from 'self.files' that are under 'dir'
and
and whose basenames match 'pattern'."""
whose basenames match 'pattern'.
"""
self
.
debug_print
(
"recursive_exclude_pattern: dir=
%
s, pattern=
%
s"
%
self
.
debug_print
(
"recursive_exclude_pattern: dir=
%
s, pattern=
%
s"
%
(
dir
,
pattern
))
(
dir
,
pattern
))
if
pattern
is
None
:
if
pattern
is
None
:
...
@@ -312,9 +307,9 @@ class sdist (Command):
...
@@ -312,9 +307,9 @@ class sdist (Command):
def
read_template
(
self
):
def
read_template
(
self
):
"""Read and parse the manifest template file named by
"""Read and parse the manifest template file named by
'self.template' (usually "MANIFEST.in"). Process all file
'self.template' (usually "MANIFEST.in"). Process all file
specifications (include and exclude) in the manifest template
specifications (include and exclude) in the manifest template and
and add the resulting filenames to 'self.files'."""
add the resulting filenames to 'self.files'.
"""
assert
self
.
files
is
not
None
and
type
(
self
.
files
)
is
ListType
assert
self
.
files
is
not
None
and
type
(
self
.
files
)
is
ListType
self
.
announce
(
"reading manifest template '
%
s'"
%
self
.
template
)
self
.
announce
(
"reading manifest template '
%
s'"
%
self
.
template
)
...
@@ -533,10 +528,10 @@ class sdist (Command):
...
@@ -533,10 +528,10 @@ class sdist (Command):
def
write_manifest
(
self
):
def
write_manifest
(
self
):
"""Write the file list in 'self.files' (presumably as filled in
"""Write the file list in 'self.files' (presumably as filled in
by
by 'find_defaults()' and 'read_template()') to the manifest file
'find_defaults()' and 'read_template()') to the manifest file named
named by 'self.manifest'."""
by 'self.manifest'.
"""
self
.
execute
(
write_file
,
self
.
execute
(
write_file
,
(
self
.
manifest
,
self
.
files
),
(
self
.
manifest
,
self
.
files
),
"writing manifest file '
%
s'"
%
self
.
manifest
)
"writing manifest file '
%
s'"
%
self
.
manifest
)
...
@@ -545,10 +540,10 @@ class sdist (Command):
...
@@ -545,10 +540,10 @@ class sdist (Command):
def
read_manifest
(
self
):
def
read_manifest
(
self
):
"""Read the manifest file (named by 'self.manifest') and use
"""Read the manifest file (named by 'self.manifest') and use
it to
it to fill in 'self.files', the list of files to includ
e
fill in 'self.files', the list of files to include in the sourc
e
in the source distribution."""
distribution.
"""
self
.
announce
(
"reading manifest file '
%
s'"
%
self
.
manifest
)
self
.
announce
(
"reading manifest file '
%
s'"
%
self
.
manifest
)
manifest
=
open
(
self
.
manifest
)
manifest
=
open
(
self
.
manifest
)
while
1
:
while
1
:
...
...
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