-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First implementation of tox_to_nox for tox 4
- Loading branch information
1 parent
1fe4414
commit 61ffa52
Showing
5 changed files
with
115 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import nox | ||
|
||
{% for envname, envconfig in config.items()|sort: %} | ||
@nox.session({%- if envconfig.base_python %}python='{{envconfig.base_python}}'{%- endif %}) | ||
def {{fixname(envname)}}(session): | ||
{%- if envconfig.description != '' %} | ||
"""{{envconfig.description}}""" | ||
{%- endif %} | ||
{%- set envs = envconfig.get('set_env', {}) -%} | ||
{%- for key, value in envs.items()|sort: %} | ||
session.env['{{key}}'] = '{{value}}' | ||
{%- endfor %} | ||
|
||
{%- if envconfig.deps %} | ||
session.install({{envconfig.deps}}) | ||
{%- endif %} | ||
|
||
{%- if not envconfig.skip_install %} | ||
{%- if envconfig.use_develop %} | ||
session.install('-e', '.') | ||
{%- else %} | ||
session.install('.') | ||
{%- endif -%} | ||
{%- endif %} | ||
|
||
{%- if envconfig.change_dir %} | ||
session.chdir('{{envconfig.change_dir}}') | ||
{%- endif %} | ||
|
||
{%- for command in envconfig.commands %} | ||
session.run({{command}}) | ||
{%- endfor %} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters