modules.pip:
. `requirements` argument now properly supports requirements file
chaining by default--`no_chown` not required)
. `requirements` argument can be formed as a list
. `requirements` files can still be formed as a comma-delimited list
. both list structures support requirements file chaining
states.virtualenv_mod:
. had to give states.virtualenv.managed() a little bit of attention to
provide a cwd argument for modules.pip.installed(). This is done via
os.path.dirname(os.path.abspath(requirements)) if a requirements
argument is present
tests.integration.modules.pip:
. added:
test_requirements_as_list__sans_no_chown___absolute_file_path
test_requirements_as_list__sans_no_chown___non_absolute_file_path
test_chained_requirements__sans_no_chown___absolute_file_path
test_chained_requirements__sans_no_chown___non_absolute_file_path
. all tests passed before commit
Affected functions:
- `pip.install`
- `pip.installed`
- `virtualenv.managed`
When using `runas` in conjunction with a local-filesystem `requirements` file with these functions,
`pip.install` will create a temporary copy of the requirements file,
then change ownership of that file to the `runas` user.
The purpose of this is to avoid file permission errors when accessing the original requirements file.
However, this breaks when that file has a "-r otherfile.txt" line.
In these cases, set `no_chown` to `True`.
The original path to the requirements file will be kept,
and other requirements files included from the top-level file will be correctly found.
* In order to check if something went wrong while running the various pip commands using the command module, we need to know, at least, the return code, this way we can report the failure.
* `salt.modules.pip.uninstall()` now returns the `cmd.run_all` `dict` instead of a list of strings. **This breaks previous behaviour**.
* Added a test case for `salt.modules.pip.uninstall()` changes.
Defined "integration.run_tests()" function which can be used to execute
a particular integration test case. Existing bolerplate code in modules
and states tests is replaced with following lines:
if __name__ == '__main__':
from integration import run_tests
run_tests(TestCaseName)
Typical usecase could look like this:
python integration/modules/pip.py --no-clean -vv