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
cf99a348
Kaydet (Commit)
cf99a348
authored
Eki 14, 2016
tarafından
Jason R. Coombs
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make cs_path_exists a protected, static method
üst
22dd73a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
sdist.py
Lib/distutils/command/sdist.py
+19
-19
No files found.
Lib/distutils/command/sdist.py
Dosyayı görüntüle @
cf99a348
...
...
@@ -33,23 +33,6 @@ def show_formats():
"List of available source distribution formats:"
)
def
cs_path_exists
(
fspath
):
"""
Case-sensitive path existence check
>>> cs_path_exists(__file__)
True
>>> cs_path_exists(__file__.upper())
False
"""
if
not
os
.
path
.
exists
(
fspath
):
return
False
# make absolute so we always have a directory
abspath
=
os
.
path
.
abspath
(
fspath
)
directory
,
filename
=
os
.
path
.
split
(
abspath
)
return
filename
in
os
.
listdir
(
directory
)
class
sdist
(
Command
):
description
=
"create a source distribution (tarball, zip file, etc.)"
...
...
@@ -246,6 +229,23 @@ class sdist(Command):
self
.
_add_defaults_c_libs
()
self
.
_add_defaults_scripts
()
@staticmethod
def
_cs_path_exists
(
fspath
):
"""
Case-sensitive path existence check
>>> sdist._cs_path_exists(__file__)
True
>>> sdist._cs_path_exists(__file__.upper())
False
"""
if
not
os
.
path
.
exists
(
fspath
):
return
False
# make absolute so we always have a directory
abspath
=
os
.
path
.
abspath
(
fspath
)
directory
,
filename
=
os
.
path
.
split
(
abspath
)
return
filename
in
os
.
listdir
(
directory
)
def
_add_defaults_standards
(
self
):
standards
=
[
self
.
READMES
,
self
.
distribution
.
script_name
]
for
fn
in
standards
:
...
...
@@ -253,7 +253,7 @@ class sdist(Command):
alts
=
fn
got_it
=
False
for
fn
in
alts
:
if
cs_path_exists
(
fn
):
if
self
.
_
cs_path_exists
(
fn
):
got_it
=
True
self
.
filelist
.
append
(
fn
)
break
...
...
@@ -262,7 +262,7 @@ class sdist(Command):
self
.
warn
(
"standard file not found: should have one of "
+
', '
.
join
(
alts
))
else
:
if
cs_path_exists
(
fn
):
if
self
.
_
cs_path_exists
(
fn
):
self
.
filelist
.
append
(
fn
)
else
:
self
.
warn
(
"standard file '
%
s' not found"
%
fn
)
...
...
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