Commit Graph

44 Commits (2be3418a8150ab1099e23e613919a7337e13934f)

Author SHA1 Message Date
Matt Clay 4554e8d769 Remove unnecessary shebangs and execute bits. 2017-02-22 18:13:46 -08:00
Vladimir Rutsky 18c86bc814 pip: fix example with egg specification (#20371)
pip: fix example with egg specification
2017-01-18 12:40:51 +00:00
Toshio Kuratomi 7319104552 Refreshed metadata for core modules 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati 8ae7d2dcc4 Unquote urls in YAML - packaging (#5793) 2016-12-08 11:25:34 -05:00
Sam Doran 2bb5ab9776 Change example syntax on pip module 2016-12-08 11:25:30 -05:00
Toshio Kuratomi 0d74ae3368 Need to locate a pip inside a venv when venv is specified
Alternative to #5359

Fixes #5347
2016-12-08 11:25:24 -05:00
Toshio Kuratomi ff6bac126e On Ubuntu16, virtualenv always tries to use python2 even when python2 is not installed.
Workaround that by mimicing the upstream virtualenv behaviour in code
(use the python version that was used to invoke virtualenv/the ansible
module)
2016-12-08 11:25:22 -05:00
Michael Scherer 9e3058c323 Make pip module use pip3 on python 3 2016-12-08 11:25:21 -05:00
Toshio Kuratomi 77975c232b Fix pip freeze workaround with virtualenv (#4951) 2016-12-08 11:25:12 -05:00
Toshio Kuratomi a8fbdcd80d pip list isn't available on pip less than 1.3 so make a fallback (#4947) 2016-12-08 11:25:12 -05:00
Toshio Kuratomi e2963c0e25 Fix parsing of pip output 2016-12-08 11:25:12 -05:00
Rob Cutmore 15b41d2718 Pip: use 'pip list' when available for package list (#4644)
* Pip: handle parsing different pip commands

* Pip: use 'pip list' when available

* Pip: explicitly check which command is used

* Pip: add error checking when fetching packages
2016-12-08 11:25:11 -05:00
Toshio Kuratomi 5bd9cdad5a We've decided that pythn 3.5 is the minimum python3 version (#4572) 2016-12-08 11:24:57 -05:00
Evan 7b66bdc1c4 pip: Fix uninitialized variable during check_mode (#4379)
During check_mode (`--check`), the variable change could be
used uninitialized, yielding this error:

`UnboundLocalError: local variable 'changed' referenced before assignment`

This changeset simply initializes it to False.
2016-12-08 11:24:49 -05:00
Brian Coca ad996f162b name was the issue, not pkg 2016-12-08 11:24:41 -05:00
Brian Coca d8e91f01b0 protect another portion against None name 2016-12-08 11:24:41 -05:00
Brian Coca 506e6ff2e2 another fix for None in name 2016-12-08 11:24:41 -05:00
Brian Coca c871f488eb avoid traceback when name is None 2016-12-08 11:24:41 -05:00
Brian Coca f874c29dff allow pip to take a list of names (#4056)
also simplified argspec by removing defaults
2016-12-08 11:24:41 -05:00
james-prior 68b9c2ffa7 Make explicit that virtualenv is created if needed for pip module. (#3731)
packaging/language/pip.py:
    virtualenv option:
        Mention that virtualenv is created if it does not exist.
            (Explicit is better than implicit.)
        Mention other relevant options.
    notes:
        initialized -> created
    Wrap long lines.
2016-12-08 11:24:31 -05:00
Raphaël Dubigny 71c50aed24 typo in pip module 2016-12-08 11:24:13 -05:00
Matt Martz b4bab770f6 pip module should call exit_json for absent as well (indentation error) 2016-12-08 11:24:10 -05:00
Stefano Mazzucco 04e9677ae0 'executable' and 'virtualenv' mutually exclusive
fixes https://github.com/ansible/ansible/issues/14415
2016-12-08 11:24:09 -05:00
Joel Thompson d8d8d7da64 Add umask option to pip module
On systems with restrictive umasks, the pip module won't allow you to
install pip packages that are usable by everyone on the system. This
commit adds a umask option to optionally override the umask on a
per-package basis.
2016-12-08 11:24:02 -05:00
Brian Coca e2062c44d9 made note about choice availability in ansible ver 2016-12-08 11:23:57 -05:00
Michael Scherer d321670b38 Add more precise documentation on the requirements parameter
Fix #427
2016-12-08 11:23:55 -05:00
stephane 40e7ed9518 Add support for pip force-reinstall
The pip command allows a user to force reinstallation,
but the module doesn't currently support it. Add
"force-reinstall" as a possible state.
2016-12-08 11:23:54 -05:00
Daniele Varrazzo a057431a78 Detect unchanged pip runs when using a vcs url in name
Should fix bug #1645
2016-12-08 11:23:51 -05:00
Daniele Varrazzo 53e1310a7f Use 'pip freeze' output to detect changes with requirement specified
If the requirements contains a repos url it will always report 'Successfully
installed'; there is no difference in the output to tell apart if
anything new was pulled. Use freeze to detect if the environment changed
in any way.

Should fix ansible/ansible#1705
2016-12-08 11:23:51 -05:00
Felix Engelmann abca0327b9 re-implements #226
in optional (editable) way
with backward compatibility
2016-12-08 11:23:46 -05:00
Brian Coca 2d7b1bd1c4 added comment explaining chdir defaults 2016-12-08 11:23:39 -05:00
Brian Coca d34f89a6fe default chdir to tmpdir to avoid virtualenv issues 2016-12-08 11:23:39 -05:00
Brian Coca 68e7945767 make chdir a path so it resolves shell aliases also removed this_dir logic as it is not needed, chdir is None by default and run_command can handle that. 2016-12-08 11:23:39 -05:00
Yuhui Huang 621b396bd9 Checking pip uninstall output in both stdout and stderr 2016-12-08 11:23:24 -05:00
Brian Coca 723a48ca73 added versionadded to new option in pip module 2016-12-08 11:23:23 -05:00
Wouter Bolsterlee 3d7e3e3c3d Add a virtualenv_python argument to the pip module
This allows specifying the Python version to use when creating the
virtualenv. See issue #586.
2016-12-08 11:23:23 -05:00
Wouter Bolsterlee 5a0157a4f2 A few coding style cleanups 2016-12-08 11:23:22 -05:00
Wouter Bolsterlee e8a0b8b8ae Fix typo in `version_added` field. 2016-12-08 11:23:22 -05:00
Jim Patterson 4185ffc43e Correct check mode for pip in virtualenv.
Fix #412.  Check mode was always returning changed=True for pip
when the target was in a virtualenv.  The code now uses the normal
tests for determining if change status.
2016-12-08 11:23:11 -05:00
Greg DeKoenigsberg eb881d7d5d Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
Florian Apolloner f07096bfe5 Added os.path.expanduser when searching for pip executable. 2016-12-08 11:22:51 -05:00
giovtorres 1f034a6573 Added pip example installing from local tarball 2016-12-08 11:22:41 -05:00
Toshio Kuratomi 52bcf4a195 Don't fial if virtualenv is not installed and we do not need to initialize the virtualenv
Fixes #688
2016-12-08 11:22:39 -05:00
Michael DeHaan 5d814d9fb2 Some more module categorization. 2016-12-08 11:22:25 -05:00