[Pytest-commit] Issue #216: Adding new option install_deps_command or install_option (hpk42/tox)

Nicolas Delaby issues-reply at bitbucket.org
Tue Feb 17 18:56:23 CET 2015


New issue 216: Adding new option install_deps_command or install_option
https://bitbucket.org/hpk42/tox/issue/216/adding-new-option-install_deps_command-or

Nicolas Delaby:

Hi,
## here is my problem:
I'm trying to install a library I want to test with a custom argument to pip.

To achieve this I'm using in my configuration file

```ini
install_command = pip install {opts} {packages} --install-option="--foo=bar"
```
It works great, but because this install command is also used to install the testing dependencies. 
They start to fail because `--foo` is not recognized.
```
Running setup.py install for py
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help


error: option --foo not recognized
```

## Suggested solution 1:
introduce a new option `install_deps_command`, that by default is using `install_command` value, to specify which command should be used to install the dependencies only.

## Suggested solution 2:
introduce a new option `install_option` to append `--install-option="--foo=bar"` to the `pip install {opts} {packages}` command string. that is used to install the project we test only (excluding dependencies).

example:
```ini
install_option = --foo=bar
```

I'm willing to make the patch to solve this issue.




More information about the pytest-commit mailing list