Platform Specification custom environment
Hi All, First of all I am a newb so please be gentle. I want to add a platform specific command to commands_pre. I followed the example so my tox.ini looks something like the following: ``` [tox] minversion = 2.0 envlist = full-{linux,macos,mswin}, nightly-{linux,macos,mswin} skipsdist = True [testenv] # environment will be skipped if regular expression does not match against the sys.platform string platform = linux: linux macos: darwin mswin: win32 commands_pre = linux: -bash -c 'some command here' [testenv:myspecificenv] commands = {[testenv]commands} -k myspecificenv ... ... The issue is that tox is being invoked with tox -e myspecificenv And this doesn't pick up the platform and this doesn't run the platform specific pre command. I am probably looking at this wrong so please help. Thanks, Sergio.
I'd recommend submitting an issue under https://github.com/tox-dev/tox with an example project to demonstrate this. I'm not 100% that one can do platform filtering on the pre section, did you try to move to the main commands and see if it works like that? On Thu, Jan 9, 2020 at 11:09 AM Sergio Soldado <sergio.soldado@foundry.com> wrote:
Hi All,
First of all I am a newb so please be gentle. I want to add a platform specific command to commands_pre. I followed the example so my tox.ini looks something like the following:
``` [tox] minversion = 2.0 envlist = full-{linux,macos,mswin}, nightly-{linux,macos,mswin} skipsdist = True
[testenv] # environment will be skipped if regular expression does not match against the sys.platform string platform = linux: linux macos: darwin mswin: win32
commands_pre = linux: -bash -c 'some command here'
[testenv:myspecificenv] commands = {[testenv]commands} -k myspecificenv ... ...
The issue is that tox is being invoked with
tox -e myspecificenv
And this doesn't pick up the platform and this doesn't run the platform specific pre command.
I am probably looking at this wrong so please help.
Thanks, Sergio.
_______________________________________________ tox-dev mailing list -- tox-dev@python.org To unsubscribe send an email to tox-dev-leave@python.org https://mail.python.org/mailman3/lists/tox-dev.python.org/
Thank you. When I run tox -e FULL or just "tox" it seems to work fine. I will submit an issue. On Thu, 9 Jan 2020 at 11:27, Bernát Gábor <gaborjbernat@gmail.com> wrote:
I'd recommend submitting an issue under https://github.com/tox-dev/tox with an example project to demonstrate this. I'm not 100% that one can do platform filtering on the pre section, did you try to move to the main commands and see if it works like that?
On Thu, Jan 9, 2020 at 11:09 AM Sergio Soldado <sergio.soldado@foundry.com> wrote:
Hi All,
First of all I am a newb so please be gentle. I want to add a platform specific command to commands_pre. I followed the example so my tox.ini looks something like the following:
``` [tox] minversion = 2.0 envlist = full-{linux,macos,mswin}, nightly-{linux,macos,mswin} skipsdist = True
[testenv] # environment will be skipped if regular expression does not match against the sys.platform string platform = linux: linux macos: darwin mswin: win32
commands_pre = linux: -bash -c 'some command here'
[testenv:myspecificenv] commands = {[testenv]commands} -k myspecificenv ... ...
The issue is that tox is being invoked with
tox -e myspecificenv
And this doesn't pick up the platform and this doesn't run the platform specific pre command.
I am probably looking at this wrong so please help.
Thanks, Sergio.
_______________________________________________ tox-dev mailing list -- tox-dev@python.org To unsubscribe send an email to tox-dev-leave@python.org https://mail.python.org/mailman3/lists/tox-dev.python.org/
participants (2)
-
Bernát Gábor
-
Sergio Soldado