1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

125 commits

Author SHA1 Message Date
Dan Savilonis 9a9d7acefe Add option --no-check-certificate to skip ssl cert verification 2014-04-24 01:46:33 -04:00
Donald Stufft 5a76a47d3b Fix code to handle the latest flake8 2014-03-26 18:24:19 -04:00
Bruno Renié 244b399f1f Fix #1424 -- add support for SSL client certificate 2014-03-07 13:41:15 +01:00
Roman Bogorodskiy f29dd1ad32 Introduce 'retry' option
Add a 'retry' option which allows to configure how many
retries pip should make before giving up on HTTP request.

When the retries count is specified by user, its value is
passed to HTTPAdapter from requests which handles all
the underlying operations.
2014-02-04 00:37:05 +04:00
Donald Stufft 2743768b7b Fix the style of the code base to better match pep8 2014-01-27 14:11:29 -05:00
Donald Stufft 30204be35b Remove uses of sys.exc_info()[1]
Using sys.exc_info()[1] is a hack that was used to use a shared
source approach to Python 3.x support that also included versions
of Python that didn't include the except ... as exc: construction.
Pip no longer supports any of these versions of Python so we can
remove it.
2014-01-27 08:02:10 -05:00
Donald Stufft 993a1bfa1b Refactor virtual env requirement to use the pip.locations func 2013-12-27 01:46:46 -05:00
Marcus Smith 4bfffbc589 better message for the failure log 2013-11-06 00:34:41 -08:00
Donald Stufft ff2854a855 Use requests instead of urllib2 2013-09-24 23:32:03 -04:00
Marcus Smith 237a8ae577 --log file object getting closed prematurely (Issue #219) 2013-09-19 19:00:29 -07:00
Marcus Smith 15910f573e define options once, but don't globally instantiate 2013-09-16 22:21:15 -07:00
Marcus Smith 5245e62bcf don't pass around options we're not using anymore 2013-09-15 21:28:19 -07:00
Georgi Valkov c6495a46e3 remove basecommand.merge_options()
This patch removes the error prone step of merging the baseparsers'
options (the 'Generic Options') with those of the subparser. In fact,
commands are already capable of parsing all options present in the
'Generic Options' option group. The option parsing logic is as follows:

Given a command line such as:
  '--timeout 5 install --user pkg'
pip.parseopt() returns command 'install' with arguments:
  '--timeout 5 --user pkg'
pip.main() executes the above as:
  commands['install'](parser).main('--timeout 5 --user pkg', options)
2013-09-15 21:28:18 -07:00
Marcus Smith 35ac774ec5 multi-values use space seperators in environment variables. 2013-09-15 18:09:36 -07:00
Lincoln de Sousa 9584608aac Cmds {install,wheel} should return proper error code
The `pip` executable was returning a successful status code (`0`) when
trying to install new packages with existing previous build directories.
2013-08-25 19:42:25 -04:00
Donald Stufft ce79c72247 Render logging output with colors if they are supported 2013-08-04 23:48:36 -04:00
Marcus Smith 6e2bfe8323 remove python 2.5 logic 2013-04-17 22:50:22 -07:00
Marcus Smith d6bb9a54e7 add TODO about options passing 2013-02-18 19:38:26 -08:00
Marcus Smith 4a4a141c21 from --allow-no-ssl to --insecure 2013-02-17 22:43:17 -08:00
Marcus Smith 559d77addc from --cert-path to --cert 2013-02-17 22:17:59 -08:00
Marcus Smith e3f1ce825b proper list indents 2013-02-17 22:00:57 -08:00
Marcus Smith 22bf924b52 merge with develop 2013-02-16 14:17:22 -08:00
Jannis Leidel 8a4458bf56 Fixed a whole bunch of cosmetic problems, mostly to adhere to PEP8. 2013-02-16 19:02:41 +01:00
Jannis Leidel 7db3d03e1a Moved the command description into the command class docstring to follow Python best practices. 2013-02-16 19:00:29 +01:00
Marcus Smith 83d8b3756b only show --allow-no-ssl when no ssl 2013-02-10 01:30:24 -08:00
Marcus Smith 84964064a3 --cert-path and --no-ssl options 2013-02-06 23:27:53 -08:00
Marcus Smith ab9ea197bd improved docs and cli help 2013-01-18 13:25:15 -08:00
Georgi Valkov 4ec46922ff fix '-h,--help' option for commands 2012-12-11 12:39:57 +02:00
Georgi Valkov 7193bf919a set option group title to '$CommandName Options' 2012-12-10 14:34:29 +02:00
Georgi Valkov b34feacbf9 add the Command.gen_opts option group
Note that commands still have to add the option group to the parser
once they populate it with options (self.parser.add_option_group).
2012-12-10 03:22:28 +02:00
Georgi Valkov 8def93c181 add missing import and remove default help option 2012-12-10 03:06:05 +02:00
Georgi Valkov 46a21751b8 add the base_parser argument to all Command instances 2012-11-10 15:34:53 +02:00
Georgi Valkov 7427eca00b remove global command instances
Rework the way commands are defined, loaded and ran in pip:

 - Commands are instantiated on demand in pip.main().

 - A command 'registry' - mapping of command names to command classes in
   pip.commands.__init__.

 - Remove deferred command module loading.
2012-11-10 15:30:16 +02:00
Rafael Caricio 44470d1bd0 Remove blank spaces in the end of the line. 2012-09-07 16:01:34 -04:00
Garry Polley 0d27d5aa0a Fixing import error for tempfile
A change was made to add extra logging whenever pip log files cannot be added. 

Here is the changeset that caused the issue:  8ebc7a3160 (pip)/basecommand.py
2012-09-05 15:55:34 -05:00
Jannis Leidel 1525a63b57 Added a get_prog util to correctly show the name of the program when using python -m pip.
Also show the full path in the missing command error message.
2012-09-01 20:36:31 +02:00
unknown 8ebc7a3160 Updated basecommand.py such that writing to the log file doesn't fail. If
permission is denied for writing in the specified log file the message
will be written to a temporary one.
2012-06-16 18:28:13 +03:00
Carl Meyer 4b68fa2cf5 Remove backwards-compatibility shims for Python 2.4. 2012-06-06 08:21:16 -06:00
Paul Nasrat 35027f278b Fix pep8 CI build.
Tested locally:
=====================================================
================== Running pep8 =====================

Searching for pep8
Reading http://pypi.python.org/simple/pep8/
Reading http://github.com/cburroughs/pep8.py/tree/master
Reading http://github.com/jcrocholl/pep8
Best match: pep8 0.6.1
Processing pep8-0.6.1-py2.7.egg
pep8 0.6.1 is already the active version in easy-install.pth
Installing pep8 script to
/Users/pnasrat/Development/pip/pip_virtualenv/bin

Using
/Users/pnasrat/Development/pip/pip_virtualenv/lib/python2.7/site-packages/pep8-0.6.1-py2.7.egg
Processing dependencies for pep8
Finished processing dependencies for pep8

==================== Ended pep8 =====================
=====================================================
2012-01-30 06:26:12 +00:00
Jannis Leidel afaa58d024 Minor name nitpicking and a fix for subcommands. 2012-01-20 14:38:34 +01:00
Jannis Leidel b77a7c4f5f Merge branch 'scripting' of https://github.com/pvanderlinden/pip into pvanderlinden-scripting 2012-01-20 14:16:11 +01:00
Hugo Lopes Tavares a3c42a3bcc Fix issue #22 - pip search should set and return a userful shell status code 2011-12-29 16:25:46 -02:00
Carl Meyer 1134ca2552 Removed unused argument to commands. 2011-12-12 02:02:01 -07:00
Hugo Lopes Tavares 615e724de2 Move status codes to a module and import from there 2011-12-04 18:50:34 -02:00
Paul van der Linden 8d67101b6e path exists action 2011-10-04 16:10:46 +02:00
Paul van der Linden ac94f606c0 fix no-input 2011-10-04 16:08:35 +02:00
Hugo Lopes Tavares 0ece434f81 Changed magic status code numbers to named ones 2011-08-02 14:03:35 -04:00
Hugo Lopes Tavares 9575e62b93 Moved SUCCESS and ERROR to basecommand.py, and added a FIXME, explaining why there is a integer check for status (return from self.run) 2011-08-02 13:54:18 -04:00
Hugo Lopes Tavares 8e8ef0e34a Changed SearchCommand.run to return SUCCESS or NO_MATCHES_FOUND (0 and 23) for found packages, and not found packages. Changed BaseCommand to check if run returned int, and if so, it is the exit status code [dummy change, just to no break everything right now; the other commands should be changed too!]. Removed SearchCommandError because it was not used 2011-08-02 13:16:18 -04:00
Alex Morega a58839e194 "search" command reports error via exception 2011-07-20 22:14:56 +03:00
Carl Meyer 7327177dbb Removed some unused imports. 2011-05-18 10:27:15 -05:00
Carl Meyer 87dd1579a2 Removed broken and no-longer-useful -E and PIP_RESPECT_VIRTUALENV options. 2011-05-18 10:27:14 -05:00
Paul Nasrat 2860dc7d41 Fix whitespace, etc for pep8 compliance
Reran tests after changes on 2.4, 2.6, 3.2 all pass.

=====================================================
================== Running pep8 =====================

Searching for pep8
Reading http://pypi.python.org/simple/pep8/
Reading http://github.com/cburroughs/pep8.py/tree/master
Reading http://github.com/jcrocholl/pep8
Best match: pep8 0.6.1
Processing pep8-0.6.1-py2.6.egg
pep8 0.6.1 is already the active version in easy-install.pth
Installing pep8 script to /Users/pnasrat/Development/pip/pip_virtualenv/bin

Using /Users/pnasrat/Development/pip/pip_virtualenv/lib/python2.6/site-packages/pep8-0.6.1-py2.6.egg
Processing dependencies for pep8
Finished processing dependencies for pep8

==================== Ended pep8 =====================
=====================================================
2011-05-04 08:44:02 +01:00
Paul Nasrat bb1d9fe772 Handle KeyboardInterrupt in basecommand
Manually tested:

python pip/runner.py install --no-install django
Downloading/unpacking django
  Downloading Django-1.3.tar.gz (6.5Mb): 2.6Mb downloaded
Operation cancelled by user
Storing complete log in /Users/pnasrat/.pip/pip.log
2011-04-17 02:26:00 +08:00
Vinay Sajip 680b5dfda0 Port to Python3 2011-03-15 15:49:48 -04:00
Hugo Lopes Tavares dc765845c0 removed unused imports and unused vars 2011-02-12 00:47:31 -02:00
Jannis Leidel 4d33521822 Added option to disable prompting for input. Also added ability to interactively ask for username and/or password in case a request requires authentication. 2010-08-31 13:08:57 +02:00
Jannis Leidel ee2949a97c Added an URL opening helper that handles proxies and basic auth. 2010-08-30 23:53:33 +02:00
Jannis Leidel e91f167dfd Moved pkgutil to its own file to keep the backwardcompat module a little cleaner. 2010-07-26 19:31:49 +02:00
Jannis Leidel 94dfe26d36 Fixed using pkgutil for Python 2.4 by adding pkgutil itself to the backwardcompat module. 2010-07-26 18:53:59 +02:00
Jannis Leidel 0cb87df5cd Made version control and commands loading use pkgutil. 2010-07-26 04:54:16 +02:00
Hugo Lopes Tavares ab3ea6ec51 removed unused vars and imports 2010-06-03 21:58:16 -03:00
Hugo Lopes Tavares d06c98dc6f merged changes related to PEP 8 from hltbra's fork 2010-06-02 23:25:26 -03:00
Carl Meyer 147bc21b8d remove redundant logfile directory creation 2010-05-25 17:40:55 -04:00
Dave Abrahams 0702303788 Make sure logfile directory exists before writing a log there 2010-04-26 03:53:17 -04:00
Alexandre Conrad 1397f923a5 Resolve dirname given a log filename like 'foo.log'. Fixes #90. 2010-04-19 11:28:33 +02:00
Alexandre Conrad cc3dfad6ce handle missing VCS with an error message rather than traceback, fixes #50 2010-04-15 16:14:31 +02:00
Alexandre Conrad 7b3ea5a9f9 create log file's base directory if it doesn't exist 2010-04-09 18:12:44 +02:00
Jannis Leidel b74665237c Overwrite the local log file in ~/.pip/pip.log instead of appending to prevent huge log files. For a verbose log file use the --log option explicitely (which will be appended to). 2010-03-11 00:41:42 +01:00
Jannis Leidel 20c45c1d71 Be a little quieter when using an already activated virtualenv to be able to have clean freeze entries. 2010-03-11 00:17:50 +01:00
Jannis Leidel 5925f8ee52 Expand ~ in the logfile path. 2010-03-10 23:41:41 +01:00
Carl Meyer 96bb90d434 move logging setup earlier in main() to avoid raw prints; fixes #75 2010-03-09 16:31:03 -05:00
Carl Meyer efa48ecb32 avoid raw ImportError on nonexistent command 2009-12-04 13:43:46 -05:00
Ian Bicking 84dbd5e139 fix imports; extend command set a bit 2009-11-20 12:19:47 -06:00
Ian Bicking 47d9c03c06 Extracted the Command class (and helpers); fix -E now that pip is a package; extracted some virtualenv stuff; extracted exceptions; tweak tests 2009-11-20 02:47:28 -06:00