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
1b3a9af5
Kaydet (Commit)
1b3a9af5
authored
Ock 17, 2000
tarafından
Greg Ward
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added missing import.
Fixed 'make_release_tree()' to copy files if 'os.link()' doesn't exist.
üst
cbeca7b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
dist.py
Lib/distutils/command/dist.py
+23
-8
No files found.
Lib/distutils/command/dist.py
Dosyayı görüntüle @
1b3a9af5
...
...
@@ -13,6 +13,7 @@ from glob import glob
from
shutil
import
rmtree
from
distutils.core
import
Command
from
distutils.text_file
import
TextFile
from
distutils.errors
import
DistutilsExecError
# Possible modes of operation:
...
...
@@ -388,16 +389,30 @@ class Dist (Command):
for
dir
in
need_dirs
:
self
.
mkpath
(
dir
)
# And walk over the list of files, making a hard link for
# each one that doesn't already exist in its corresponding
# location under 'base_dir'
# And walk over the list of files, either making a hard link (if
# os.link exists) to each one that doesn't already exist in its
# corresponding location under 'base_dir', or copying each file
# 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.)
self
.
announce
(
"making hard links in
%
s..."
%
base_dir
)
try
:
link
=
os
.
link
msg
=
"making hard links in
%
s..."
%
base_dir
except
AttributeError
:
link
=
0
msg
=
"copying files to
%
s..."
%
base_dir
self
.
announce
(
msg
)
for
file
in
files
:
dest
=
os
.
path
.
join
(
base_dir
,
file
)
if
not
os
.
path
.
exists
(
dest
):
self
.
execute
(
os
.
link
,
(
file
,
dest
),
"linking
%
s ->
%
s"
%
(
file
,
dest
))
if
link
:
if
not
os
.
path
.
exists
(
dest
):
self
.
execute
(
os
.
link
,
(
file
,
dest
),
"linking
%
s ->
%
s"
%
(
file
,
dest
))
else
:
self
.
copy_file
(
file
,
dest
)
# make_release_tree ()
...
...
@@ -453,7 +468,7 @@ class Dist (Command):
import
zipfile
except
ImportError
:
raise
DistutilsExecError
,
\
(
"unable to create zip file '
%
s.zip':"
+
(
"unable to create zip file '
%
s.zip':
"
+
"could neither find a standalone zip utility nor "
+
"import the 'zipfile' module"
)
%
base_dir
...
...
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