Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
5484122c
Unverified
Commit
5484122c
authored
Jul 24, 2020
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display logging messages from poetry-core when building
parent
2ba36c82
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
12 deletions
+21
-12
poetry.lock
+0
-0
poetry/console/commands/build.py
+1
-0
poetry/console/config/application_config.py
+5
-0
poetry/console/logging/formatters/__init__.py
+1
-0
poetry/console/logging/formatters/builder_formatter.py
+12
-4
poetry/console/logging/io_handler.py
+1
-7
pyproject.toml
+1
-1
No files found.
poetry.lock
View file @
5484122c
This diff is collapsed.
Click to expand it.
poetry/console/commands/build.py
View file @
5484122c
...
...
@@ -13,6 +13,7 @@ class BuildCommand(EnvCommand):
]
loggers
=
[
"poetry.core.masonry.builders.builder"
,
"poetry.core.masonry.builders.sdist"
,
"poetry.core.masonry.builders.wheel"
,
]
...
...
poetry/console/config/application_config.py
View file @
5484122c
...
...
@@ -90,6 +90,11 @@ class ApplicationConfig(BaseApplicationConfig):
logger
.
handlers
=
[
handler
]
level
=
logging
.
WARNING
# The builders loggers are special and we can actually
# start at the INFO level.
if
logger
.
name
.
startswith
(
"poetry.core.masonry.builders"
):
level
=
logging
.
INFO
if
io
.
is_debug
():
level
=
logging
.
DEBUG
elif
io
.
is_very_verbose
()
or
io
.
is_verbose
():
...
...
poetry/console/logging/formatters/__init__.py
View file @
5484122c
...
...
@@ -2,6 +2,7 @@ from .builder_formatter import BuilderLogFormatter
FORMATTERS
=
{
"poetry.core.masonry.builders.builder"
:
BuilderLogFormatter
(),
"poetry.core.masonry.builders.sdist"
:
BuilderLogFormatter
(),
"poetry.core.masonry.builders.wheel"
:
BuilderLogFormatter
(),
}
poetry/console/logging/formatters/builder_formatter.py
View file @
5484122c
...
...
@@ -5,9 +5,17 @@ from .formatter import Formatter
class
BuilderLogFormatter
(
Formatter
):
def
format
(
self
,
msg
):
# type: (str) -> str
if
msg
.
startswith
(
" - Building "
)
or
msg
.
startswith
(
" - Built "
):
msg
=
re
.
sub
(
r" - (Buil(?:t|ing)) (.+)"
,
" -
\\
1 <c2>
\\
2</c2>"
,
msg
)
elif
msg
.
startswith
(
" - Adding: "
):
msg
=
re
.
sub
(
r" - Adding: (.+)"
,
" - Adding: <b>
\\
1</b>"
,
msg
)
if
msg
.
startswith
(
"Building "
):
msg
=
re
.
sub
(
"Building (.+)"
,
" - Building <info>
\\
1</info>"
,
msg
)
elif
msg
.
startswith
(
"Built "
):
msg
=
re
.
sub
(
"Built (.+)"
,
" - Built <success>
\\
1</success>"
,
msg
)
elif
msg
.
startswith
(
"Adding: "
):
msg
=
re
.
sub
(
"Adding: (.+)"
,
" - Adding: <b>
\\
1</b>"
,
msg
)
elif
msg
.
startswith
(
"Executing build script: "
):
msg
=
re
.
sub
(
"Executing build script: (.+)"
,
" - Executing build script: <b>
\\
1</b>"
,
msg
,
)
return
msg
poetry/console/logging/io_handler.py
View file @
5484122c
...
...
@@ -5,13 +5,7 @@ class IOHandler(logging.Handler):
def
__init__
(
self
,
io
):
self
.
_io
=
io
level
=
logging
.
WARNING
if
io
.
is_debug
():
level
=
logging
.
DEBUG
elif
io
.
is_very_verbose
()
or
io
.
is_verbose
():
level
=
logging
.
INFO
super
(
IOHandler
,
self
)
.
__init__
(
level
)
super
(
IOHandler
,
self
)
.
__init__
()
def
emit
(
self
,
record
):
try
:
...
...
pyproject.toml
View file @
5484122c
...
...
@@ -24,7 +24,7 @@ classifiers = [
[tool.poetry.dependencies]
python
=
"~2.7 || ^3.5"
poetry-core
=
"^1.0.0a
8
"
poetry-core
=
"^1.0.0a
9
"
cleo
=
"^0.8.1"
clikit
=
"^0.6.2"
crashtest
=
{
version
=
"^0.3.0"
,
python
=
"^3.6"
}
...
...
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