Skip to content

Commit

Permalink
Updated to upstream to make pull request build
Browse files Browse the repository at this point in the history
  • Loading branch information
TC01 committed Oct 19, 2012
2 parents cd679a1 + 74a4e65 commit b4a3133
Show file tree
Hide file tree
Showing 67 changed files with 1,615 additions and 277 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ build/*
pip-log.txt
pip.log
*.~
.tox

3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ python:
- 2.7
- 3.1
- 3.2
- pypy
before_install:
- sudo apt-get install subversion bzr mercurial
- echo -e "[web]\ncacerts = /etc/ssl/certs/ca-certificates.crt" >> ~/.hgrc
Expand All @@ -15,5 +16,7 @@ notifications:
branches:
only:
- develop
matrix:
allow_failures:
env:
- PIP_USE_MIRRORS=true
8 changes: 8 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
Alex Grönholm
Alex Morega
Alexandre Conrad
Andrey Bulgakov
Antti Kaihola
Armin Ronacher
Aziz Köksal
Ben Rosser
Brian Rosner
Carl Meyer
Chris McDonough
Christian Oudard
Clay McClure
Cody Soyland
Daniel Holth
Dave Abrahams
Donald Stufft
Francesco
Hugo Lopes Tavares
Ian Bicking
Expand All @@ -36,12 +41,15 @@ Nowell Strite
Oliver Tonnhofer
Olivier Girardot
Patrick Jenkins
Paul Moore
Paul Nasrat
Paul Oswald
Paul van der Linden
Peter Waller
Phil Whelan
Piet Delport
Qiangning Hong
Rafael Caricio
Rene Dudfield
Ronny Pfannschmidt
Rory McCann
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2008-2011 The pip developers (see AUTHORS.txt file)
Copyright (c) 2008-2012 The pip developers (see AUTHORS.txt file)

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pip
===

.. image:: https://secure.travis-ci.org/pypa/pip.png?branch=develop
:target: http://travis-ci.org/pypa/pip

For documentation, see http://www.pip-installer.org
17 changes: 12 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os
import os
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.append(os.path.abspath('.'))
sys.path.insert(0, os.path.abspath(os.pardir))
#sys.path.append(os.path.join(os.path.dirname(__file__), '../'))

# -- General configuration -----------------------------------------------------
Expand All @@ -40,15 +41,21 @@

# General information about the project.
project = 'pip'
copyright = '2008-2011, The pip developers'
copyright = '2008-2012, The pip developers'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
release = "1.1.post2"
version = '.'.join(release.split('.')[:2])
try:
from pip import __version__
# The short X.Y version.
version = '.'.join(__version__.split('.')[:2])
# The full version, including alpha/beta/rc tags.
release = __version__
except ImportError:
version = release = 'dev'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
6 changes: 3 additions & 3 deletions docs/contributing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ Before sending us a pull request, please, be sure all tests pass.
Supported Python versions
-------------------------

Pip supports Python versions 2.4, 2.5, 2.6, 2.7, 3.1, and 3.2, from a single
Pip supports Python versions 2.5, 2.6, 2.7, 3.1, and 3.2, from a single
codebase (without use of 2to3 translation). Untested contributions frequently
break Python 2.4 or 3.x compatibility. Please run the tests on at least 2.4 and
3.2 and report your results when sending a pull request.
break Python 3.x compatibility. Please run the tests on at least 3.2 and
report your results when sending a pull request.

Continuous Integration server
-----------------------------
Expand Down
60 changes: 54 additions & 6 deletions docs/news.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,49 @@ News
Changelog
=========

Next release (1.2) schedule
Next release (1.3) schedule
---------------------------

Beta and final releases planned for the second half of 2012.
Beta and final releases planned for the end of 2012.


develop (unreleased)
-------------------
--------------------

* --user/--upgrade install options now work together; thanks eevee.

* Added check in ``install --download`` to prevent re-downloading if the target
file already exists. Thanks Andrey Bulgakov.

* Added support for bare paths (including relative paths) as argument to
`--find-links`. Thanks Paul Moore for draft patch.

* Added support for --no-index in requirements files.

* Added "pip show" command to get information about an installed
package. Fixes #131. Thanks Kelsey Hightower and Rafael Caricio.

1.2.1 (2012-09-06)
------------------

* Fixed a regression introduced in 1.2 about raising an exception when
not finding any files to uninstall in the current environment. Thanks for
the fix, Marcus Smith.

1.2 (2012-09-01)
----------------

* **Dropped support for Python 2.4** The minimum supported Python version is
now Python 2.5.

* Fixed issue #605 - pypi mirror support broken on some DNS responses. Thanks
philwhin.

* Fixed issue #355 - pip uninstall removes files it didn't install. Thanks
pjdelport.

* Fixed issues #493, #494, #440, and #573 related to improving support for the
user installation scheme. Thanks Marcus Smith.

* Write failure log to temp file if default location is not writable. Thanks
andreigc.
Expand All @@ -38,9 +74,6 @@ develop (unreleased)
* Fixed issue #504 - allow package URLS to have querystrings. Thanks W.
Trevor King.

* Dropped support for Python 2.4. The minimum supported Python version is
now Python 2.5.

* Fixed issue #58 - pip freeze now falls back to non-editable format rather
than blowing up if it can't determine the origin repository of an editable.
Thanks Rory McCann.
Expand All @@ -57,6 +90,21 @@ develop (unreleased)
* Fixed issue #427 - clearer error message on a malformed VCS url. Thanks
Thomas Fenzl.

* Added support for using any of the built in guaranteed algorithms in
``hashlib`` as a checksum hash.

* Fixed issue #321 - Raise an exception if current working directory can't be
found or accessed.

* Fixed issue #82 - Removed special casing of the user directory and use the
Python default instead.

* Fixed #436 - Only warn about version conflicts if there is actually one.
This re-enables using ``==dev`` in requirements files.

* Moved tests to be run on Travis CI: http://travis-ci.org/pypa/pip

* Added a better help formatter.

1.1 (2012-02-16)
----------------
Expand Down
28 changes: 26 additions & 2 deletions docs/usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ local or remote::
.. _setuptools extras: http://peak.telecommunity.com/DevCenter/setuptools#declaring-extras-optional-features-with-their-own-dependencies


Edit mode
*********
Editable mode
*************

Packages normally_ install under ``site-packages``, but when you're
making changes, it makes more sense to run the package straight from the
Expand Down Expand Up @@ -106,6 +106,16 @@ within a :ref:`requirements file <requirements-files>` in addition to on the
command line directly.


Package Checksum Hashes
'''''''''''''''''''''''

:term:`PyPI` provides a md5 hash of a package by having the link to the
package include a #md5=<hash>. pip supports this, as well as any of the
guaranteed hashlib algorithms (sha1, sha224, sha384, sha256, sha512, md5).

The hash fragment is case sensitive (i.e. sha1 not SHA1).


Uninstall packages
------------------

Expand Down Expand Up @@ -137,9 +147,23 @@ packages. With the ``--index`` option you can search in a different
repository.


Checking installed package status
---------------------------------

To get info about an installed package, including its location and included
files, run ``pip show ProjectName``.


Bundles
-------

.. note::

Pip bundles are poorly supported, poorly tested, not widely used, and
unnecessary (the same goals can be achieved by distributing a directory of
sdists and using `--find-links` to reference it). The feature will likely be
removed in a future version of pip.

Another way to distribute a set of libraries is a bundle format (specific to
pip). This format is not stable at this time (there simply hasn't been
any feedback, nor a great deal of thought). A bundle file contains all the
Expand Down
17 changes: 11 additions & 6 deletions pip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
from pip.baseparser import parser
from pip.exceptions import InstallationError
from pip.log import logger
from pip.util import get_installed_distributions
from pip.vcs import git, mercurial, subversion, bazaar
from pip.util import get_installed_distributions, get_prog
from pip.vcs import git, mercurial, subversion, bazaar # noqa


# The version as used in the setup.py and the docs conf.py
__version__ = "1.2.1.post1"


def autocomplete():
Expand All @@ -26,7 +30,7 @@ def autocomplete():
cwords = os.environ['COMP_WORDS'].split()[1:]
cword = int(os.environ['COMP_CWORD'])
try:
current = cwords[cword-1]
current = cwords[cword - 1]
except IndexError:
current = ''
load_all_commands()
Expand Down Expand Up @@ -59,7 +63,7 @@ def autocomplete():
for opt in subcommand.parser.option_list
if opt.help != optparse.SUPPRESS_HELP]
# filter out previously specified options from available options
prev_opts = [x.split('=')[0] for x in cwords[1:cword-1]]
prev_opts = [x.split('=')[0] for x in cwords[1:cword - 1]]
options = [(x, v) for (x, v) in options if x not in prev_opts]
# filter options by current input
options = [(k, v) for k, v in options if k.startswith(current)]
Expand Down Expand Up @@ -87,7 +91,8 @@ def main(initial_args=None):
if options.help and not args:
args = ['help']
if not args:
parser.error('You must give a command (use "pip help" to see a list of commands)')
parser.error('You must give a command '
'(use "%s help" to see a list of commands)' % get_prog())
command = args[0].lower()
load_command(command)
if command not in command_dict:
Expand Down Expand Up @@ -184,7 +189,7 @@ def __str__(self):
req = self.req
if self.editable:
req = '-e %s' % req
return '\n'.join(list(self.comments)+[str(req)])+'\n'
return '\n'.join(list(self.comments) + [str(req)]) + '\n'


if __name__ == '__main__':
Expand Down
8 changes: 4 additions & 4 deletions __main__.py → pip/__main__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if __name__ == '__main__':
import sys
from . import main
import sys
from .runner import run

exit = main()
if __name__ == '__main__':
exit = run()
if exit:
sys.exit(exit)
13 changes: 13 additions & 0 deletions pip/backwardcompat.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
"""Stuff that differs in different Python versions"""

import os
import imp
import sys
import site

__all__ = ['WindowsError']

uses_pycache = hasattr(imp,'cache_from_source')

try:
WindowsError = WindowsError
except NameError:
class NeverUsedException(Exception):
"""this exception should never be raised"""
WindowsError = NeverUsedException


console_encoding = sys.__stdout__.encoding

if sys.version_info >= (3,):
Expand Down Expand Up @@ -97,3 +102,11 @@ def product(*args, **kwds):
result = [x+[y] for x in result for y in pool]
for prod in result:
yield tuple(prod)

def home_lib(home):
"""Return the lib dir under the 'home' installation scheme"""
if hasattr(sys, 'pypy_version_info'):
lib = 'site-packages'
else:
lib = os.path.join('lib', 'python')
return os.path.join(home, lib)
6 changes: 4 additions & 2 deletions pip/basecommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pkgutil import walk_packages
import socket
import sys
import tempfile
import traceback
import time

Expand All @@ -15,6 +16,7 @@
CommandError)
from pip.backwardcompat import StringIO
from pip.status_codes import SUCCESS, ERROR, UNKNOWN_ERROR, VIRTUALENV_NOT_FOUND
from pip.util import get_prog


__all__ = ['command_dict', 'Command', 'load_all_commands',
Expand All @@ -35,7 +37,7 @@ def __init__(self):
assert self.name
self.parser = ConfigOptionParser(
usage=self.usage,
prog='%s %s' % (sys.argv[0], self.name),
prog='%s %s' % (get_prog(), self.name),
version=parser.version,
formatter=UpdatingDefaultsHelpFormatter(),
name=self.name)
Expand Down Expand Up @@ -144,7 +146,7 @@ def main(self, args, initial_options):
temp = tempfile.NamedTemporaryFile(delete=False)
log_fn = temp.name
log_fp = open_logfile(log_fn, 'w')
logger.fatal('Storing complete log in %s' % log_fn)
logger.fatal('Storing complete log in %s' % log_fn)
log_fp.write(text)
log_fp.close()
return exit
Expand Down
Loading

0 comments on commit b4a3133

Please sign in to comment.