Skip to content

Commit

Permalink
Merge branch 'develop' into fix-recursive-upgrades
Browse files Browse the repository at this point in the history
Conflicts:
	pip/req.py
  • Loading branch information
fdintino committed Nov 20, 2012
2 parents 7d86207 + 854574f commit 931e307
Show file tree
Hide file tree
Showing 66 changed files with 1,206 additions and 264 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -21,3 +21,5 @@ build/*
pip-log.txt
pip.log
*.~
.tox

4 changes: 4 additions & 0 deletions .travis.yml
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,8 @@ notifications:
branches:
only:
- develop
matrix:
allow_failures:
- python: 3.1
env:
- PIP_USE_MIRRORS=true
9 changes: 9 additions & 0 deletions AUTHORS.txt
@@ -1,11 +1,16 @@
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
Expand Down Expand Up @@ -36,12 +41,16 @@ Nowell Strite
Oliver Tonnhofer
Olivier Girardot
Patrick Jenkins
Paul Moore
Paul Nasrat
Paul Oswald
Paul van der Linden
Peter Waller
Phil Whelan
Piet Delport
Przemek Wrzos
Qiangning Hong
Rafael Caricio
Rene Dudfield
Ronny Pfannschmidt
Rory McCann
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
@@ -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
@@ -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
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
3 changes: 2 additions & 1 deletion docs/configuration.txt
Expand Up @@ -84,7 +84,8 @@ Location
The names and locations of the configuration files vary slightly across
platforms.

On Unix and Mac OS X the configuration file is: :file:`$HOME/.pip/pip.conf`
On Unix and Mac OS X the configuration file is:
:file:`$HOME/.config/pip/pip.conf`

And on Windows, the configuration file is: :file:`%HOME%\\pip\\pip.ini`

Expand Down
6 changes: 3 additions & 3 deletions docs/contributing.txt
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
64 changes: 55 additions & 9 deletions docs/news.txt
Expand Up @@ -5,13 +5,47 @@ 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.

* Added `--root` option for "pip install" to specify root directory. Behaves
like the same option in distutils but also plays nice with pip's egg-info.
(Issue #253)

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.
Expand All @@ -26,7 +60,10 @@ develop (unreleased)
Hsiaoming Yang and Markus Hametner.

* Use a temporary directory as the default build location outside of a
virtualenv. Fixes issues #339 and #381. Thanks TC01.
virtualenv. Fixes issues #339 and #381. Thanks Ben Rosser.

* Moved pip configuration data to ~/.config/pip, the XDG standard for config
files on Unix/Linux systems. Thanks Ben Rosser.

* Added support for specifying extras with local editables. Thanks Nick
Stenning.
Expand All @@ -41,9 +78,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 @@ -60,9 +94,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.
* 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
2 changes: 1 addition & 1 deletion docs/requirements.txt
Expand Up @@ -104,7 +104,7 @@ A line beginning with ``#`` is treated as a comment and ignored.
You can also request `extras`_ in the requirements file::
MyPackage==3.0 [PDF]
MyPackage[PDF]==3.0
.. _extras: http://peak.telecommunity.com/DevCenter/setuptools#declaring-extras-optional-features-with-their-own-dependencies
Expand Down
18 changes: 16 additions & 2 deletions docs/usage.txt
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 @@ -147,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
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
@@ -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)
12 changes: 12 additions & 0 deletions pip/backwardcompat.py
@@ -1,10 +1,14 @@
"""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:
Expand Down Expand Up @@ -98,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)

0 comments on commit 931e307

Please sign in to comment.