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
601652a3
Unverified
Commit
601652a3
authored
Mar 21, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add debug:info command
parent
e46d18c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
0 deletions
+58
-0
CHANGELOG.md
+4
-0
poetry/console/application.py
+2
-0
poetry/console/commands/debug/__init__.py
+1
-0
poetry/console/commands/debug/info.py
+51
-0
No files found.
CHANGELOG.md
View file @
601652a3
...
...
@@ -2,6 +2,10 @@
## [Unreleased]
### Added
-
Added a
`debug:info`
command to get information about current environment.
### Fixed
-
Fixed Python version retrieval inside virtualenvs.
...
...
poetry/console/application.py
View file @
601652a3
...
...
@@ -21,6 +21,7 @@ from .commands import RunCommand
from
.commands
import
ShowCommand
from
.commands
import
UpdateCommand
from
.commands.debug
import
DebugInfoCommand
from
.commands.debug
import
DebugResolveCommand
...
...
@@ -99,6 +100,7 @@ class Application(BaseApplication):
# Debug commands
commands
+=
[
DebugInfoCommand
(),
DebugResolveCommand
(),
]
...
...
poetry/console/commands/debug/__init__.py
View file @
601652a3
from
.info
import
DebugInfoCommand
from
.resolve
import
DebugResolveCommand
poetry/console/commands/debug/info.py
0 → 100644
View file @
601652a3
import
os
import
sys
from
..venv_command
import
VenvCommand
class
DebugInfoCommand
(
VenvCommand
):
"""
Shows debug information.
debug:info
"""
def
handle
(
self
):
poetry
=
self
.
poetry
package
=
poetry
.
package
venv
=
self
.
venv
poetry_python_version
=
'.'
.
join
(
str
(
s
)
for
s
in
sys
.
version_info
[:
3
])
self
.
output
.
title
(
'Poetry'
)
self
.
output
.
listing
([
'<info>Version</info>: <comment>{}</>'
.
format
(
poetry
.
VERSION
),
'<info>Python</info>: <comment>{}</>'
.
format
(
poetry_python_version
)
])
self
.
line
(
''
)
venv_python_version
=
'.'
.
join
(
str
(
s
)
for
s
in
venv
.
version_info
[:
3
])
self
.
output
.
title
(
'Virtualenv'
)
self
.
output
.
listing
([
'<info>Python</info>: <comment>{}</>'
.
format
(
venv_python_version
),
'<info>Implementation</info>: <comment>{}</>'
.
format
(
venv
.
python_implementation
),
'<info>Path</info>: <comment>{}</>'
.
format
(
venv
.
venv
if
venv
.
is_venv
()
else
'NA'
)
])
self
.
line
(
''
)
self
.
output
.
title
(
'System'
)
self
.
output
.
listing
([
'<info>Platform</info>: <comment>{}</>'
.
format
(
sys
.
platform
),
'<info>OS</info>: <comment>{}</>'
.
format
(
os
.
name
),
])
self
.
line
(
''
)
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