Commit Graph

37 Commits (8147cf9915e6b9474800a0322f20b69b1d79d90f)

Author SHA1 Message Date
mavimo e5fe7f1afc Double quoted version_added in documentation 12 years ago
Ricky Elrod 669bb36bce Fix broken virtualenv link in pip documentation. 12 years ago
David Hughes 566aea86b1 Run pip command from the system's temp directory 12 years ago
David Hughes c75d5e18fd Expand any user home variable in pip module's virtualenv parameter 12 years ago
Michael DeHaan 0ca35d04a8 Let the pip module return output. 12 years ago
Dag Wieers d4bb57d42d Fix the documentation booleans so they use "yes" and "no"
Both modules seboolean and zfs have not been adapted since they defer from the default (either by having a 'null' or special state, or prefering "on"/"off" for state indication.
12 years ago
Stephen Fromm 568f7892cd Update various modules for check_mode
This updates the following modules to support check_mode:
* apt_key
* apt_repository
* easy_install
* pip - will always report changed due to the way it handles state
* seboolean
* selinux
* slurp - since nothing changes, it just adds that it supports
  check_mode
* subversion - reports changed when checking out new repo and
  when updating.
* supervisorctl
* svr4pkg

See issue #2114.
12 years ago
Daniel Hokka Zakrisson 1dadd70d9f Remove choices=BOOLEANS as it is no longer needed 12 years ago
Daniel Hokka Zakrisson 0150f18a3b Use argument type checking to convert to boolean 12 years ago
Michael DeHaan 055e678701 mark when various new flags were added to the pip & easy_install modules 12 years ago
Jeroen Hoekx 638b11292a Easy_install and pip module support a virtualenv_command parameter.
This allows flexible selection of the Python version to use while
creating the virtualenv.
12 years ago
Blair Zajac 9256763e13 library/pip: add support for virtualenv's --system-site-packages. 12 years ago
Stephen Fromm e4964f42e0 Update modules to use run_command in module_common.py
This updates apt, apt_repository, command, cron, easy_install, facter,
fireball, git, group, mount, ohai, pip, service, setup, subversion,
supervisorctl, svr4pkg, user, and yum to take advantage of run_command
in module_common.py.
12 years ago
Norman J. Harman Jr 900289f83d pip module improvements
- Do not silently ignore malformed pip requirements files.
- Properly reports changed when removing packages.
- "latest" i.e. --upgrade is *not* incompatible with requirements files.
- Less branchy, simpler logic.
- Removed pointless variable "initializations", Python doesn't need that.
  Other code simplifications.
- Fun fact; pip install is (kind of) case insensitive, pip freeze is not.
  So, 'sqlalchemy' will be reported as installed by install, but missing
  by freeze.

The perhaps controversial change and the one that led to finding /
fixing above issues...

Instead of adding command parameters 'index', and 'find', and 'mirrors',
and etc.  Added 'extra_args' which are passed onto pip.

The use case for --index-url is having a private pypi repo, like
http://pypi.python.org/pypi/localshop, to which you publish private
packages.  I'm sure most every pip option has a use case for someone.
extra_args handles all those. Can reserve ansible command parameters for
the most common.

Tested with pip 1.1.
12 years ago
Stephen Fromm 4cdd93a6e4 Further tweak how to find pip in virtualenv on centos/redhat/fedora
In a virtualenv, pip is called just pip.  This fixes the pip module to
search for the virtualenv pip first before trying the pip-python and
python-pip variants.  Without this, pip module would not install to the
virtualenv when that parameter is provided.
12 years ago
Stephen Fromm 8070dedecc Make use of mirrors in pip module configurable with use_mirrors option
Older versions of pip (anything less than 1.0?) do not support
--use-mirrors flag.  This makes it configurable.  Default is yes.
12 years ago
Stephen Fromm 648240ae36 Fix pip module to check if requirements already installed
This updates _is_package_installed() to accept a requirements file
as an argument.  This is used later in main() to check if python libs
specified in a requirements file are already installed.  I updated
main() to consolidate the handling of install/uninstall in a single
block.  This should help if someone wants to remove packages specified
by a requirements file.
12 years ago
Ton Kersten 02df02801b Corrected for fallthrough 12 years ago
Ton Kersten f4d60b95dc Added pip-python to the search for CentOS 6 compatibility 12 years ago
Jan-Piet Mens d184f72aa9 DOCUMENTATION strings 12 years ago
Michael DeHaan 6f6559670f chmod -x for all module files in source checkout 12 years ago
Jan-Piet Mens d069c57974 Reformat code: examples consistently
- added terse syntax to modules.rst
 - added description of special variables to template module
12 years ago
Maxim Burgerhout c482104cda Test for python-pip as well as pip
On Red Hat, CentOS and Fedora systems, the pip binary will be called python-pip
instead of pip. This commit makes the pip module also check for python-pip.

The reason we check for python-pip *first*, is to have ansible fail on not
finding 'pip' and reporting *that*. This is consistent with current behaviour
and will not confuse users of Debian et al., where the 'python-pip' binary
never exists.

Tested on Fedora 18 and Ubuntu 12.04.
12 years ago
Jan-Piet Mens c78a0a4a49 Jumbo DOCUMENTATION patch 12 years ago
Marco Vito Moscaritolo 1637a05846 Fixed error in author name 12 years ago
Marco Vito Moscaritolo f47530b044 Added DOCUMENTATION to pip module. 12 years ago
Stephen Fromm 1222cf8de9 Add option required=(True|False) to get_bin_path and update modules
Added required as optional argument to get_bin_path(). It defaults to
false.  Updated following modules to use required=True when calling
get_bin_path():  apt_repository, easy_install, group, pip,
supervisorctl, and user.
Also removed _find_supervisorctl() from supervisorctl module and updated
_is_running() to not need it.
12 years ago
Stephen Fromm f0da6b191a Migrate remaining modules to use get_bin_path in module_common.py
* Migraed easy_install, pip, service, setup, and user.
* Updated fail_json message in apt_repository
* Fixed easy_install to not hardcode location of virtualenv in
  /usr/local/bin/.
* Made handling of virtualenv more consistent between easy_install and
  pip.
12 years ago
Michael DeHaan b9880e38b8 Merge pull request #900 from lorin/pip-venv-bug
Retrieve pip path after creating virtualenv
12 years ago
Lorin Hochstein 449ab0635b Retrieve pip path after creating virtualenv
Retrieve the pip path after creating a non-existent virtualenv.
Prevents the problem of using the wrong pip if virtualenv doesn't
exist yet.
12 years ago
Lorin Hochstein ac672f8331 Return both stdout and stderr on pip failures.
pip failure message sometimes (always?) go to standard out. Return
both standard out and standard error when there's a failure.
12 years ago
Michael DeHaan 3b81df1e67 Add module common code to allow it to be easier to indicate whether arguments are mutually exclusive, required in conjunction, or whether one of a list of arguments is required. This simplifies writing Python modules. 12 years ago
Sébastien Bocahu ca5642ca26 Fix variable scope 12 years ago
Sundar Raman 01efd46599 Further syntax fix work on Python2.4
The `val if something else something-else` syntax does not work prior to 2.5.
12 years ago
Sundar Raman a221c9ed65 Fix syntax to work on Python2.4
The `val if something else something-else` syntax does not work prior to 2.5
12 years ago
Matt Wright a5ec3233d5 Updates per ansible/ansible#796 12 years ago
Matt Wright 311e90473d add pip module 12 years ago