Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
3ac58425
Commit
3ac58425
authored
Aug 31, 2016
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Closes #27904: Improved logging statements to defer formatting until needed.
parent
f3f736a7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
13 deletions
+12
-13
archive_util.py
archive_util.py
+1
-1
cmd.py
cmd.py
+1
-2
command/bdist_dumb.py
command/bdist_dumb.py
+1
-1
command/build_ext.py
command/build_ext.py
+3
-3
command/config.py
command/config.py
+1
-1
command/install.py
command/install.py
+1
-1
command/register.py
command/register.py
+3
-3
command/sdist.py
command/sdist.py
+1
-1
No files found.
archive_util.py
View file @
3ac58425
...
@@ -171,7 +171,7 @@ def make_zipfile(base_name, base_dir, verbose=0, dry_run=0):
...
@@ -171,7 +171,7 @@ def make_zipfile(base_name, base_dir, verbose=0, dry_run=0):
path
=
os
.
path
.
normpath
(
os
.
path
.
join
(
dirpath
,
name
))
path
=
os
.
path
.
normpath
(
os
.
path
.
join
(
dirpath
,
name
))
if
os
.
path
.
isfile
(
path
):
if
os
.
path
.
isfile
(
path
):
zip
.
write
(
path
,
path
)
zip
.
write
(
path
,
path
)
log
.
info
(
"adding '%s'"
%
path
)
log
.
info
(
"adding '%s'"
,
path
)
zip
.
close
()
zip
.
close
()
return
zip_filename
return
zip_filename
...
...
cmd.py
View file @
3ac58425
...
@@ -329,8 +329,7 @@ class Command:
...
@@ -329,8 +329,7 @@ class Command:
# -- External world manipulation -----------------------------------
# -- External world manipulation -----------------------------------
def
warn
(
self
,
msg
):
def
warn
(
self
,
msg
):
log
.
warn
(
"warning: %s: %s
\
n
"
%
log
.
warn
(
"warning: %s: %s
\
n
"
,
self
.
get_command_name
(),
msg
)
(
self
.
get_command_name
(),
msg
))
def
execute
(
self
,
func
,
args
,
msg
=
None
,
level
=
1
):
def
execute
(
self
,
func
,
args
,
msg
=
None
,
level
=
1
):
util
.
execute
(
func
,
args
,
msg
,
dry_run
=
self
.
dry_run
)
util
.
execute
(
func
,
args
,
msg
,
dry_run
=
self
.
dry_run
)
...
...
command/bdist_dumb.py
View file @
3ac58425
...
@@ -85,7 +85,7 @@ class bdist_dumb(Command):
...
@@ -85,7 +85,7 @@ class bdist_dumb(Command):
install
.
skip_build
=
self
.
skip_build
install
.
skip_build
=
self
.
skip_build
install
.
warn_dir
=
0
install
.
warn_dir
=
0
log
.
info
(
"installing to %s"
%
self
.
bdist_dir
)
log
.
info
(
"installing to %s"
,
self
.
bdist_dir
)
self
.
run_command
(
'install'
)
self
.
run_command
(
'install'
)
# And make an archive relative to the root of the
# And make an archive relative to the root of the
...
...
command/build_ext.py
View file @
3ac58425
...
@@ -363,9 +363,9 @@ class build_ext(Command):
...
@@ -363,9 +363,9 @@ class build_ext(Command):
ext_name
,
build_info
=
ext
ext_name
,
build_info
=
ext
log
.
warn
(
(
"old-style (ext_name, build_info) tuple found in "
log
.
warn
(
"old-style (ext_name, build_info) tuple found in "
"ext_modules for extension '%s'"
"ext_modules for extension '%s'"
"-- please convert to Extension instance"
%
ext_name
)
)
"-- please convert to Extension instance"
,
ext_name
)
if
not
(
isinstance
(
ext_name
,
str
)
and
if
not
(
isinstance
(
ext_name
,
str
)
and
extension_name_re
.
match
(
ext_name
)):
extension_name_re
.
match
(
ext_name
)):
...
...
command/config.py
View file @
3ac58425
...
@@ -337,7 +337,7 @@ def dump_file(filename, head=None):
...
@@ -337,7 +337,7 @@ def dump_file(filename, head=None):
If head is not None, will be dumped before the file content.
If head is not None, will be dumped before the file content.
"""
"""
if
head
is
None
:
if
head
is
None
:
log
.
info
(
'%s'
%
filename
)
log
.
info
(
'%s'
,
filename
)
else
:
else
:
log
.
info
(
head
)
log
.
info
(
head
)
file
=
open
(
filename
)
file
=
open
(
filename
)
...
...
command/install.py
View file @
3ac58425
...
@@ -385,7 +385,7 @@ class install(Command):
...
@@ -385,7 +385,7 @@ class install(Command):
else
:
else
:
opt_name
=
opt_name
.
translate
(
longopt_xlate
)
opt_name
=
opt_name
.
translate
(
longopt_xlate
)
val
=
getattr
(
self
,
opt_name
)
val
=
getattr
(
self
,
opt_name
)
log
.
debug
(
" %s: %s"
%
(
opt_name
,
val
)
)
log
.
debug
(
" %s: %s"
,
opt_name
,
val
)
def
finalize_unix
(
self
):
def
finalize_unix
(
self
):
"""Finalizes options for posix platforms."""
"""Finalizes options for posix platforms."""
...
...
command/register.py
View file @
3ac58425
...
@@ -94,7 +94,7 @@ class register(PyPIRCCommand):
...
@@ -94,7 +94,7 @@ class register(PyPIRCCommand):
'''
'''
# send the info to the server and report the result
# send the info to the server and report the result
(
code
,
result
)
=
self
.
post_to_server
(
self
.
build_post_data
(
'verify'
))
(
code
,
result
)
=
self
.
post_to_server
(
self
.
build_post_data
(
'verify'
))
log
.
info
(
'Server response (%s): %s'
%
(
code
,
result
)
)
log
.
info
(
'Server response (%s): %s'
,
code
,
result
)
def
send_metadata
(
self
):
def
send_metadata
(
self
):
''' Send the metadata to the package index server.
''' Send the metadata to the package index server.
...
@@ -205,7 +205,7 @@ Your selection [default 1]: ''', log.INFO)
...
@@ -205,7 +205,7 @@ Your selection [default 1]: ''', log.INFO)
data
[
'email'
]
=
input
(
' EMail: '
)
data
[
'email'
]
=
input
(
' EMail: '
)
code
,
result
=
self
.
post_to_server
(
data
)
code
,
result
=
self
.
post_to_server
(
data
)
if
code
!=
200
:
if
code
!=
200
:
log
.
info
(
'Server response (%s): %s'
%
(
code
,
result
)
)
log
.
info
(
'Server response (%s): %s'
,
code
,
result
)
else
:
else
:
log
.
info
(
'You will receive an email shortly.'
)
log
.
info
(
'You will receive an email shortly.'
)
log
.
info
((
'Follow the instructions in it to '
log
.
info
((
'Follow the instructions in it to '
...
@@ -216,7 +216,7 @@ Your selection [default 1]: ''', log.INFO)
...
@@ -216,7 +216,7 @@ Your selection [default 1]: ''', log.INFO)
while
not
data
[
'email'
]:
while
not
data
[
'email'
]:
data
[
'email'
]
=
input
(
'Your email address: '
)
data
[
'email'
]
=
input
(
'Your email address: '
)
code
,
result
=
self
.
post_to_server
(
data
)
code
,
result
=
self
.
post_to_server
(
data
)
log
.
info
(
'Server response (%s): %s'
%
(
code
,
result
)
)
log
.
info
(
'Server response (%s): %s'
,
code
,
result
)
def
build_post_data
(
self
,
action
):
def
build_post_data
(
self
,
action
):
# figure the data to send - the metadata plus some additional
# figure the data to send - the metadata plus some additional
...
...
command/sdist.py
View file @
3ac58425
...
@@ -412,7 +412,7 @@ class sdist(Command):
...
@@ -412,7 +412,7 @@ class sdist(Command):
log
.
info
(
msg
)
log
.
info
(
msg
)
for
file
in
files
:
for
file
in
files
:
if
not
os
.
path
.
isfile
(
file
):
if
not
os
.
path
.
isfile
(
file
):
log
.
warn
(
"'%s' not a regular file -- skipping"
%
file
)
log
.
warn
(
"'%s' not a regular file -- skipping"
,
file
)
else
:
else
:
dest
=
os
.
path
.
join
(
base_dir
,
file
)
dest
=
os
.
path
.
join
(
base_dir
,
file
)
self
.
copy_file
(
file
,
dest
,
link
=
link
)
self
.
copy_file
(
file
,
dest
,
link
=
link
)
...
...
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