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
d7c5cee2
Kaydet (Commit)
d7c5cee2
authored
Haz 15, 2009
tarafından
Tarek Ziadé
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
code cleanup
üst
9f7baec5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
upload.py
Lib/distutils/command/upload.py
+9
-13
No files found.
Lib/distutils/command/upload.py
Dosyayı görüntüle @
d7c5cee2
"""distutils.command.upload
Implements the Distutils 'upload' subcommand (upload package to PyPI)."""
from
distutils.errors
import
*
from
distutils.core
import
PyPIRCCommand
from
distutils.spawn
import
spawn
from
distutils
import
log
import
sys
import
os
import
socket
...
...
@@ -15,12 +10,12 @@ import base64
import
urlparse
import
cStringIO
as
StringIO
from
ConfigParser
import
ConfigParser
from
hashlib
import
md5
# this keeps compatibility for 2.3 and 2.4
if
sys
.
version
<
"2.5"
:
from
md5
import
md5
else
:
from
hashlib
import
md5
from
distutils.errors
import
*
from
distutils.core
import
PyPIRCCommand
from
distutils.spawn
import
spawn
from
distutils
import
log
class
upload
(
PyPIRCCommand
):
...
...
@@ -125,7 +120,8 @@ class upload(PyPIRCCommand):
open
(
filename
+
".asc"
)
.
read
())
# set up the authentication
auth
=
"Basic "
+
base64
.
encodestring
(
self
.
username
+
":"
+
self
.
password
)
.
strip
()
auth
=
"Basic "
+
base64
.
encodestring
(
self
.
username
+
":"
+
self
.
password
)
.
strip
()
# Build up the MIME payload for the POST data
boundary
=
'--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
...
...
@@ -134,10 +130,10 @@ class upload(PyPIRCCommand):
body
=
StringIO
.
StringIO
()
for
key
,
value
in
data
.
items
():
# handle multiple entries for the same name
if
type
(
value
)
!=
type
([]
):
if
not
isinstance
(
value
,
list
):
value
=
[
value
]
for
value
in
value
:
if
type
(
value
)
is
tuple
:
if
isinstance
(
value
,
tuple
)
:
fn
=
';filename="
%
s"'
%
value
[
0
]
value
=
value
[
1
]
else
:
...
...
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