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
282e2c36
Kaydet (Commit)
282e2c36
authored
Ock 03, 2003
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[Patch #658094] PEP 301 implementation
Add 'classifiers' keyword to DistributionMetadata
üst
9a3129c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
dist.py
Lib/distutils/dist.py
+12
-1
No files found.
Lib/distutils/dist.py
Dosyayı görüntüle @
282e2c36
...
...
@@ -93,6 +93,8 @@ class Distribution:
"print the long package description"
),
(
'platforms'
,
None
,
"print the list of platforms"
),
(
'classifiers'
,
None
,
"print the list of classifiers"
),
(
'keywords'
,
None
,
"print the list of keywords"
),
]
...
...
@@ -634,6 +636,8 @@ class Distribution:
value
=
getattr
(
self
.
metadata
,
"get_"
+
opt
)()
if
opt
in
[
'keywords'
,
'platforms'
]:
print
string
.
join
(
value
,
','
)
elif
opt
==
'classifiers'
:
print
string
.
join
(
value
,
'
\n
'
)
else
:
print
value
any_display_options
=
1
...
...
@@ -962,7 +966,7 @@ class DistributionMetadata:
"maintainer"
,
"maintainer_email"
,
"url"
,
"license"
,
"description"
,
"long_description"
,
"keywords"
,
"platforms"
,
"fullname"
,
"contact"
,
"contact_email"
,
"licence"
)
"contact_email"
,
"licence"
,
"classifiers"
)
def
__init__
(
self
):
self
.
name
=
None
...
...
@@ -977,6 +981,7 @@ class DistributionMetadata:
self
.
long_description
=
None
self
.
keywords
=
None
self
.
platforms
=
None
self
.
classifiers
=
None
def
write_pkg_info
(
self
,
base_dir
):
"""Write the PKG-INFO file into the release tree.
...
...
@@ -1003,6 +1008,9 @@ class DistributionMetadata:
for
platform
in
self
.
get_platforms
():
pkg_info
.
write
(
'Platform:
%
s
\n
'
%
platform
)
for
classifier
in
self
.
get_classifiers
():
pkg_info
.
write
(
'Classifier:
%
s
\n
'
%
classifier
)
pkg_info
.
close
()
# write_pkg_info ()
...
...
@@ -1059,6 +1067,9 @@ class DistributionMetadata:
def
get_platforms
(
self
):
return
self
.
platforms
or
[
"UNKNOWN"
]
def
get_classifiers
(
self
):
return
self
.
classifiers
or
[]
# class DistributionMetadata
...
...
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