File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11import os
22
3- from incipyt import commands , signals , tools
3+ from incipyt import commands , project , signals , tools
44
55
66class Venv (tools .Tool ):
77 """Scripts to add virtualenv to :class:`incipyt.project._Structure`."""
88
99 def add_to_structure (self ):
1010 """Add venv configuration to `project.structure`, do nothing."""
11- signals .vcs_ignore .emit (pattern = ".env /" )
11+ signals .vcs_ignore .emit (pattern = "{VIRTUAL_ENV_DIRECTORY} /" )
1212
1313 def pre (self , workon ):
1414 """Run `python -m venv .env`.
1515
1616 :param workon: Work-on folder.
1717 :type workon: :class:`pathlib.Path`
1818 """
19- env_path = workon / ".env"
19+ project .environ .setdefault ("VIRTUAL_ENV_DIRECTORY" , ".venv" )
20+ env_path = workon / project .environ ["VIRTUAL_ENV_DIRECTORY" ]
2021 commands .venv ([os .fspath (env_path )])
2122 commands .setenv_python_cmd (
2223 env_path .resolve () / ("Scripts" if os .name == "nt" else "bin" ) / "python"
You can’t perform that action at this time.
0 commit comments