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
2e550b3d
Kaydet (Commit)
2e550b3d
authored
Mar 30, 2006
tarafından
Phillip J. Eby
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Implementation for patch request #1457316: support --identity option
for setup.py "upload" command.
üst
3c3346da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
dist.tex
Doc/dist/dist.tex
+15
-2
upload.py
Lib/distutils/command/upload.py
+10
-1
No files found.
Doc/dist/dist.tex
Dosyayı görüntüle @
2e550b3d
...
...
@@ -1754,8 +1754,21 @@ built using an earlier invocation of \file{setup.py}, but that only
distributions named on the command line for the invocation including
the
\command
{
upload
}
command are uploaded.
The
\command
{
upload
}
command uses the username and password stored in
the file
\file
{
\$
HOME/.pypirc
}
, see section~
\ref
{
pypirc
}
.
The
\command
{
upload
}
command uses the username, password, and repository
URL from the
\file
{
\$
HOME/.pypirc
}
file (see section~
\ref
{
pypirc
}
for
more on this file).
You can use the
\programopt
{
--sign
}
option to tell
\command
{
upload
}
to
sign each uploaded file using GPG (GNU Privacy Guard). The
\program
{
gpg
}
program must be available for execution on the system
\envvar
{
PATH
}
. You can also specify which key to use for signing
using the
\programopt
{
--identity=
\var
{
name
}}
option.
Other
\command
{
upload
}
options include
\programopt
{
--repository=
\var
{
url
}}
(which lets you override the
repository setting from
\file
{
\$
HOME/.pypirc
}
), and
\programopt
{
--show-response
}
(which displays the full response text
from the PyPI server for help in debugging upload problems).
\chapter
{
Examples
}
\label
{
examples
}
...
...
Lib/distutils/command/upload.py
Dosyayı görüntüle @
2e550b3d
...
...
@@ -29,6 +29,7 @@ class upload(Command):
'display full response text from server'
),
(
'sign'
,
's'
,
'sign files to upload using gpg'
),
(
'identity='
,
'i'
,
'GPG identity used to sign files'
),
]
boolean_options
=
[
'show-response'
,
'sign'
]
...
...
@@ -38,8 +39,13 @@ class upload(Command):
self
.
repository
=
''
self
.
show_response
=
0
self
.
sign
=
False
self
.
identity
=
None
def
finalize_options
(
self
):
if
self
.
identity
and
not
self
.
sign
:
raise
DistutilsOptionError
(
"Must use --sign for --identity to have meaning"
)
if
os
.
environ
.
has_key
(
'HOME'
):
rc
=
os
.
path
.
join
(
os
.
environ
[
'HOME'
],
'.pypirc'
)
if
os
.
path
.
exists
(
rc
):
...
...
@@ -67,7 +73,10 @@ class upload(Command):
def
upload_file
(
self
,
command
,
pyversion
,
filename
):
# Sign if requested
if
self
.
sign
:
spawn
((
"gpg"
,
"--detach-sign"
,
"-a"
,
filename
),
gpg_args
=
[
"gpg"
,
"--detach-sign"
,
"-a"
,
filename
]
if
self
.
identity
:
gpg_args
[
2
:
2
]
=
[
"--local-user"
,
self
.
identity
]
spawn
(
gpg_args
,
dry_run
=
self
.
dry_run
)
# Fill in the data - send all the meta-data in case we need to
...
...
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