Update click and cookiecutter dependencies
This commit is contained in:
parent
ca0fd2397e
commit
05ce46ccc4
2 changed files with 10 additions and 5 deletions
4
setup.py
4
setup.py
|
|
@ -35,7 +35,7 @@ INSTALL_REQUIRES = [
|
||||||
"requests>=2.7,<2.8",
|
"requests>=2.7,<2.8",
|
||||||
"semantic_version>=2.4.2,<2.5",
|
"semantic_version>=2.4.2,<2.5",
|
||||||
"psutil>=3.2.1,<3.3",
|
"psutil>=3.2.1,<3.3",
|
||||||
"Click>=5.1,<5.2",
|
"Click>=6.2,<6.3",
|
||||||
"awesome-slugify>=1.6.5,<1.7"
|
"awesome-slugify>=1.6.5,<1.7"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ EXTRA_REQUIRES = dict(
|
||||||
|
|
||||||
# Dependencies for developing OctoPrint plugins
|
# Dependencies for developing OctoPrint plugins
|
||||||
plugins=[
|
plugins=[
|
||||||
"cookiecutter"
|
"cookiecutter>=1.4,<1.5"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,12 @@ class OctoPrintDevelCommands(click.MultiCommand):
|
||||||
except ImportError:
|
except ImportError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
try:
|
||||||
|
# we depend on Cookiecutter >= 1.4
|
||||||
|
from cookiecutter.prompt import StrictEnvironment
|
||||||
|
except ImportError:
|
||||||
|
return None
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
|
|
@ -100,10 +106,9 @@ class OctoPrintDevelCommands(click.MultiCommand):
|
||||||
original_prompt_for_config = cookiecutter.main.prompt_for_config
|
original_prompt_for_config = cookiecutter.main.prompt_for_config
|
||||||
|
|
||||||
def custom_prompt_for_config(context, no_input=False):
|
def custom_prompt_for_config(context, no_input=False):
|
||||||
import cookiecutter.prompt
|
cookiecutter_dict = dict()
|
||||||
|
|
||||||
cookiecutter_dict = {}
|
env = StrictEnvironment()
|
||||||
env = cookiecutter.prompt.Environment()
|
|
||||||
|
|
||||||
for key, raw in context['cookiecutter'].items():
|
for key, raw in context['cookiecutter'].items():
|
||||||
if key in options:
|
if key in options:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue