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
51bd2283
Unverified
Commit
51bd2283
authored
May 16, 2019
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated commands
parent
f83b55a4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
75 deletions
+0
-75
poetry/console/commands/develop.py
+0
-19
poetry/console/commands/script.py
+0
-56
No files found.
poetry/console/commands/develop.py
deleted
100644 → 0
View file @
f83b55a4
from
.env_command
import
EnvCommand
class
DevelopCommand
(
EnvCommand
):
"""
Installs the current project in development mode. (<error>Deprecated</error>)
develop
"""
help
=
"""
\
The <info>develop</> command is deprecated. Please use <info>install</info> instead.
"""
def
handle
(
self
):
self
.
line
(
"<warning>develop is deprecated use install instead.</warning>"
)
self
.
line
(
""
)
return
self
.
call
(
"install"
)
poetry/console/commands/script.py
deleted
100644 → 0
View file @
f83b55a4
from
.env_command
import
EnvCommand
class
ScriptCommand
(
EnvCommand
):
"""
Executes a script defined in <comment>pyproject.toml</comment>. (<error>Deprecated</error>)
script
{ script-name : The name of the script to execute }
{ args?* : The command and arguments/options to pass to the script. }
"""
help
=
"""The <info>script</> command is deprecated. Please use <info>run</info> instead.
"""
def
handle
(
self
):
self
.
line
(
"<warning>script is deprecated use run instead.</warning>"
)
self
.
line
(
""
)
script
=
self
.
argument
(
"script-name"
)
argv
=
[
script
]
+
self
.
argument
(
"args"
)
scripts
=
self
.
poetry
.
local_config
.
get
(
"scripts"
)
if
not
scripts
:
raise
RuntimeError
(
"No scripts defined in pyproject.toml"
)
if
script
not
in
scripts
:
raise
ValueError
(
"Script {} is not defined"
.
format
(
script
))
module
,
callable_
=
scripts
[
script
]
.
split
(
":"
)
src_in_sys_path
=
"sys.path.append('src'); "
if
self
.
_module
.
is_in_src
()
else
""
cmd
=
[
"python"
,
"-c"
]
cmd
+=
[
'"import sys; '
"from importlib import import_module; "
"sys.argv = {!r}; {}"
"import_module('{}').{}()
\"
"
.
format
(
argv
,
src_in_sys_path
,
module
,
callable_
)
]
self
.
env
.
run
(
*
cmd
,
shell
=
True
,
call
=
True
)
@property
def
_module
(
self
):
from
...masonry.utils.module
import
Module
poetry
=
self
.
poetry
package
=
poetry
.
package
path
=
poetry
.
file
.
parent
module
=
Module
(
package
.
name
,
path
.
as_posix
())
return
module
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