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
8474f290
Kaydet (Commit)
8474f290
authored
Haz 10, 2011
tarafından
Éric Araujo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
setup.cfg: Document that description-file can contain more than one file
üst
3605030c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
setupcfg.rst
Doc/packaging/setupcfg.rst
+1
-0
config.py
Lib/packaging/config.py
+5
-8
test_config.py
Lib/packaging/tests/test_config.py
+1
-1
No files found.
Doc/packaging/setupcfg.rst
Dosyayı görüntüle @
8474f290
...
...
@@ -285,6 +285,7 @@ One extra field not present in PEP 345 is supported:
description-file
Path to a text file that will be used to fill the ``description`` field.
Multiple values are accepted; they must be separated by whitespace.
``description-file`` and ``description`` are mutually exclusive. *optional*
...
...
Lib/packaging/config.py
Dosyayı görüntüle @
8474f290
...
...
@@ -163,21 +163,18 @@ class Config:
"mutually exclusive"
)
raise
PackagingOptionError
(
msg
)
if
isinstance
(
value
,
list
):
filenames
=
value
else
:
filenames
=
value
.
split
()
filenames
=
value
.
split
()
# concatenate
each
files
value
=
''
# concatenate
all
files
value
=
[]
for
filename
in
filenames
:
# will raise if file not found
with
open
(
filename
)
as
description_file
:
value
+=
description_file
.
read
()
.
strip
()
+
'
\n
'
value
.
append
(
description_file
.
read
()
.
strip
())
# add filename as a required file
if
filename
not
in
metadata
.
requires_files
:
metadata
.
requires_files
.
append
(
filename
)
value
=
value
.
strip
()
value
=
'
\n
'
.
join
(
value
)
.
strip
()
key
=
'description'
if
metadata
.
is_metadata_field
(
key
):
...
...
Lib/packaging/tests/test_config.py
Dosyayı görüntüle @
8474f290
...
...
@@ -327,7 +327,7 @@ class ConfigTestCase(support.TempdirManager,
self
.
assertIn
(
'could not import setup_hook'
,
logs
[
0
])
def
test_metadata_requires_description_files_missing
(
self
):
self
.
write_setup
({
'description-file'
:
'README
\n
README2'
})
self
.
write_setup
({
'description-file'
:
'README README2'
})
self
.
write_file
(
'README'
,
'yeah'
)
self
.
write_file
(
'README2'
,
'yeah'
)
os
.
mkdir
(
'src'
)
...
...
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