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
be20be13
Kaydet (Commit)
be20be13
authored
May 21, 2011
tarafından
Tarek Ziade
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use the same line terminator everywhere
üst
fb2473fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
install_distinfo.py
Lib/packaging/command/install_distinfo.py
+2
-2
database.py
Lib/packaging/database.py
+4
-2
test_database.py
Lib/packaging/tests/test_database.py
+5
-2
No files found.
Lib/packaging/command/install_distinfo.py
Dosyayı görüntüle @
be20be13
...
@@ -110,7 +110,7 @@ class install_distinfo(Command):
...
@@ -110,7 +110,7 @@ class install_distinfo(Command):
logger
.
info
(
'creating
%
s'
,
resources_path
)
logger
.
info
(
'creating
%
s'
,
resources_path
)
with
open
(
resources_path
,
'wb'
)
as
f
:
with
open
(
resources_path
,
'wb'
)
as
f
:
writer
=
csv
.
writer
(
f
,
delimiter
=
','
,
writer
=
csv
.
writer
(
f
,
delimiter
=
','
,
lineterminator
=
os
.
linesep
,
lineterminator
=
'
\n
'
,
quotechar
=
'"'
)
quotechar
=
'"'
)
for
tuple
in
install_data
.
get_resources_out
():
for
tuple
in
install_data
.
get_resources_out
():
writer
.
writerow
(
tuple
)
writer
.
writerow
(
tuple
)
...
@@ -122,7 +122,7 @@ class install_distinfo(Command):
...
@@ -122,7 +122,7 @@ class install_distinfo(Command):
logger
.
info
(
'creating
%
s'
,
record_path
)
logger
.
info
(
'creating
%
s'
,
record_path
)
with
open
(
record_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
with
open
(
record_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
writer
=
csv
.
writer
(
f
,
delimiter
=
','
,
writer
=
csv
.
writer
(
f
,
delimiter
=
','
,
lineterminator
=
os
.
linesep
,
lineterminator
=
'
\n
'
,
quotechar
=
'"'
)
quotechar
=
'"'
)
install
=
self
.
get_finalized_command
(
'install_dist'
)
install
=
self
.
get_finalized_command
(
'install_dist'
)
...
...
Lib/packaging/database.py
Dosyayı görüntüle @
be20be13
...
@@ -159,7 +159,8 @@ class Distribution:
...
@@ -159,7 +159,8 @@ class Distribution:
def
_get_records
(
self
,
local
=
False
):
def
_get_records
(
self
,
local
=
False
):
with
self
.
get_distinfo_file
(
'RECORD'
)
as
record
:
with
self
.
get_distinfo_file
(
'RECORD'
)
as
record
:
record_reader
=
csv
.
reader
(
record
,
delimiter
=
','
)
record_reader
=
csv
.
reader
(
record
,
delimiter
=
','
,
lineterminator
=
'
\n
'
)
# XXX needs an explaining comment
# XXX needs an explaining comment
for
row
in
record_reader
:
for
row
in
record_reader
:
path
,
checksum
,
size
=
(
row
[:]
+
path
,
checksum
,
size
=
(
row
[:]
+
...
@@ -171,7 +172,8 @@ class Distribution:
...
@@ -171,7 +172,8 @@ class Distribution:
def
get_resource_path
(
self
,
relative_path
):
def
get_resource_path
(
self
,
relative_path
):
with
self
.
get_distinfo_file
(
'RESOURCES'
)
as
resources_file
:
with
self
.
get_distinfo_file
(
'RESOURCES'
)
as
resources_file
:
resources_reader
=
csv
.
reader
(
resources_file
,
delimiter
=
','
)
resources_reader
=
csv
.
reader
(
resources_file
,
delimiter
=
','
,
lineterminator
=
'
\n
'
)
for
relative
,
destination
in
resources_reader
:
for
relative
,
destination
in
resources_reader
:
if
relative
==
relative_path
:
if
relative
==
relative_path
:
return
destination
return
destination
...
...
Lib/packaging/tests/test_database.py
Dosyayı görüntüle @
be20be13
...
@@ -111,7 +111,8 @@ class TestDistribution(CommonDistributionTests, unittest.TestCase):
...
@@ -111,7 +111,8 @@ class TestDistribution(CommonDistributionTests, unittest.TestCase):
record_file
=
os
.
path
.
join
(
distinfo_dir
,
'RECORD'
)
record_file
=
os
.
path
.
join
(
distinfo_dir
,
'RECORD'
)
with
open
(
record_file
,
'w'
)
as
file
:
with
open
(
record_file
,
'w'
)
as
file
:
record_writer
=
csv
.
writer
(
record_writer
=
csv
.
writer
(
file
,
delimiter
=
','
,
quoting
=
csv
.
QUOTE_NONE
)
file
,
delimiter
=
','
,
quoting
=
csv
.
QUOTE_NONE
,
lineterminator
=
'
\n
'
)
dist_location
=
distinfo_dir
.
replace
(
'.dist-info'
,
''
)
dist_location
=
distinfo_dir
.
replace
(
'.dist-info'
,
''
)
...
@@ -125,9 +126,11 @@ class TestDistribution(CommonDistributionTests, unittest.TestCase):
...
@@ -125,9 +126,11 @@ class TestDistribution(CommonDistributionTests, unittest.TestCase):
record_writer
.
writerow
([
relpath
(
record_file
,
sys
.
prefix
)])
record_writer
.
writerow
([
relpath
(
record_file
,
sys
.
prefix
)])
with
open
(
record_file
)
as
file
:
with
open
(
record_file
)
as
file
:
record_reader
=
csv
.
reader
(
file
)
record_reader
=
csv
.
reader
(
file
,
lineterminator
=
'
\n
'
)
record_data
=
{}
record_data
=
{}
for
row
in
record_reader
:
for
row
in
record_reader
:
if
row
==
[]:
continue
path
,
md5_
,
size
=
(
row
[:]
+
path
,
md5_
,
size
=
(
row
[:]
+
[
None
for
i
in
range
(
len
(
row
),
3
)])
[
None
for
i
in
range
(
len
(
row
),
3
)])
record_data
[
path
]
=
md5_
,
size
record_data
[
path
]
=
md5_
,
size
...
...
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