Skip to content

Commit

Permalink
Merge branch 'release/1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
jezdez committed Feb 16, 2012
2 parents 47f1b2c + 40ac381 commit ee554dd
Show file tree
Hide file tree
Showing 62 changed files with 1,543 additions and 776 deletions.
11 changes: 11 additions & 0 deletions AUTHORS.txt
@@ -1,6 +1,7 @@
Alex Grönholm Alex Grönholm
Alex Morega Alex Morega
Alexandre Conrad Alexandre Conrad
Antti Kaihola
Armin Ronacher Armin Ronacher
Brian Rosner Brian Rosner
Carl Meyer Carl Meyer
Expand All @@ -24,13 +25,23 @@ Kenneth Belitzky
Kumar McMillan Kumar McMillan
Luke Macken Luke Macken
Masklinn Masklinn
Marc Abramowitz
Marcus Smith
Matt Maker
Nowell Strite Nowell Strite
Oliver Tonnhofer Oliver Tonnhofer
Olivier Girardot
Patrick Jenkins Patrick Jenkins
Paul Nasrat Paul Nasrat
Paul Oswald
Paul van der Linden
Peter Waller Peter Waller
Piet Delport
Qiangning Hong
Rene Dudfield
Ronny Pfannschmidt Ronny Pfannschmidt
Simon Cross Simon Cross
Stavros Korokithakis
Thomas Johansson Thomas Johansson
Vinay Sajip Vinay Sajip
Vitaly Babiy Vitaly Babiy
Expand Down
3 changes: 2 additions & 1 deletion contrib/get-pip.py
Expand Up @@ -1106,6 +1106,7 @@
import tempfile import tempfile
import shutil import shutil



def unpack(sources): def unpack(sources):
temp_dir = tempfile.mkdtemp('-scratchdir', 'unpacker-') temp_dir = tempfile.mkdtemp('-scratchdir', 'unpacker-')
for package, content in sources.items(): for package, content in sources.items():
Expand All @@ -1122,7 +1123,7 @@ def unpack(sources):
return temp_dir return temp_dir


if __name__ == "__main__": if __name__ == "__main__":
if sys.version_info >= (3,0): if sys.version_info >= (3, 0):
exec("def do_exec(co, loc): exec(co, loc)\n") exec("def do_exec(co, loc): exec(co, loc)\n")
import pickle import pickle
sources = sources.encode("ascii") # ensure bytes sources = sources.encode("ascii") # ensure bytes
Expand Down
3 changes: 3 additions & 0 deletions contrib/packager/__init__.py
Expand Up @@ -8,6 +8,7 @@
import os import os
import fnmatch import fnmatch



def find_toplevel(name): def find_toplevel(name):
for syspath in sys.path: for syspath in sys.path:
lib = os.path.join(syspath, name) lib = os.path.join(syspath, name)
Expand All @@ -18,10 +19,12 @@ def find_toplevel(name):
return mod return mod
raise LookupError(name) raise LookupError(name)



def pkgname(toplevel, rootpath, path): def pkgname(toplevel, rootpath, path):
parts = path.split(os.sep)[len(rootpath.split(os.sep)):] parts = path.split(os.sep)[len(rootpath.split(os.sep)):]
return '.'.join([toplevel] + [os.path.splitext(x)[0] for x in parts]) return '.'.join([toplevel] + [os.path.splitext(x)[0] for x in parts])



def pkg_to_mapping(name): def pkg_to_mapping(name):
toplevel = find_toplevel(name) toplevel = find_toplevel(name)
if os.path.isfile(toplevel): if os.path.isfile(toplevel):
Expand Down
4 changes: 3 additions & 1 deletion contrib/packager/template.py
Expand Up @@ -10,6 +10,7 @@
import tempfile import tempfile
import shutil import shutil



def unpack(sources): def unpack(sources):
temp_dir = tempfile.mkdtemp('-scratchdir', 'unpacker-') temp_dir = tempfile.mkdtemp('-scratchdir', 'unpacker-')
for package, content in sources.items(): for package, content in sources.items():
Expand All @@ -25,8 +26,9 @@ def unpack(sources):
mod.close() mod.close()
return temp_dir return temp_dir



if __name__ == "__main__": if __name__ == "__main__":
if sys.version_info >= (3,0): if sys.version_info >= (3, 0):
exec("def do_exec(co, loc): exec(co, loc)\n") exec("def do_exec(co, loc): exec(co, loc)\n")
import pickle import pickle
sources = sources.encode("ascii") # ensure bytes sources = sources.encode("ascii") # ensure bytes
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -47,7 +47,7 @@
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
release = "1.0.2" release = "1.1"
version = '.'.join(release.split('.')[:2]) version = '.'.join(release.split('.')[:2])


# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
Expand Down
24 changes: 24 additions & 0 deletions docs/configuration.txt
Expand Up @@ -115,3 +115,27 @@ Just leave an empty space between the passsed values, e.g.::
is the same as calling:: is the same as calling::


pip install --find-links=http://mirror1.example.com --find-links=http://mirror2.example.com pip install --find-links=http://mirror1.example.com --find-links=http://mirror2.example.com

Configuration options
---------------------

Mirror support
**************

The `PyPI mirroring infrastructure <http://pypi.python.org/mirrors>`_ as
described in `PEP 381 <http://www.python.org/dev/peps/pep-0381/>`_ can be
used by passing the ``--use-mirrors`` option to the install command.
Alternatively, you can use the other ways to configure pip, e.g.::

$ export PIP_USE_MIRRORS=true

If enabled, pip will automatically query the DNS entry of the mirror index URL
to find the list of mirrors to use. In case you want to override this list,
please use the ``--mirrors`` option of the install command, or add to your pip
configuration file::

[install]
use-mirrors = true
mirrors =
http://d.pypi.python.org
http://b.pypi.python.org
61 changes: 58 additions & 3 deletions docs/how-to-contribute.txt → docs/contributing.txt
@@ -1,6 +1,6 @@
======================== =================
How To Contribute to Pip How to contribute
======================== =================




All kinds of contributions are welcome - code, tests, documentation, All kinds of contributions are welcome - code, tests, documentation,
Expand Down Expand Up @@ -75,6 +75,61 @@ you can learn how to set up a Hudson CI server like that in the






Running the Tests
=================

Pip uses some system tools - VCS related tools - in its tests, so you need to
intall them (Linux)::

sudo apt-get install subversion bzr git-core mercurial

Or downloading and installing `Subversion
<http://subversion.apache.org/packages.html>`_, `Bazaar
<http://wiki.bazaar.canonical.com/Download>`_, `Git
<http://git-scm.com/download>`_ and `Mercurial
<http://mercurial.selenic.com/downloads/>`_ manually.


After all requirements (system and python) are installed,
just run the following command::

$ python setup.py test

Running tests directly with Nose
--------------------------------

If you want to run only a selection of the tests, you'll need to run them
directly with nose instead. Create a virtualenv, and install required
packages::

pip install nose virtualenv scripttest mock

Run nosetests::

nosetests

Or select just a single test to run::

cd tests; nosetests test_upgrade.py:test_uninstall_rollback


Troubleshooting
---------------

Locale Warnings
There was a problem with locales configuration when running tests in a Hudson
CI Server that broke some tests. The problem was not with pip, but with
`locales` configuration. Hudson was not setting LANG environment variable
correctly, so the solution to fix it was changing default language to
en_US.UTF-8.
The following has been done in a Ubuntu Server 9.10 machine::

$ sudo locale-gen en_US en_US.UTF-8
$ sudo dpkg-reconfigure locales
$ sudo update-locale LANG=en_US.UTF-8



Contributing with Tests Contributing with Tests
======================= =======================


Expand Down
12 changes: 12 additions & 0 deletions docs/glossary.txt
@@ -0,0 +1,12 @@
========
Glossary
========

.. glossary::

PyPI
The `Python Package Index`_, formerly known as the Cheese Shop,
is a central catalog of Python packages. By default, when
installing packages,`pip` searches for them in PyPI.

.. _`Python Package Index`: http://pypi.python.org/pypi

0 comments on commit ee554dd

Please sign in to comment.