mirror of https://github.com/pypa/pip
[svn r20975] Rename occurrance of pyinstall to pip
This commit is contained in:
parent
c2000d7de6
commit
97c152c463
|
@ -34,7 +34,7 @@ source_suffix = '.txt'
|
|||
master_doc = 'index'
|
||||
|
||||
# General substitutions.
|
||||
project = 'pyinstall'
|
||||
project = 'pip'
|
||||
copyright = '2008, The Open Planning Project'
|
||||
|
||||
# The default replacements for |version| and |release|, also used in various
|
||||
|
@ -107,7 +107,7 @@ html_last_updated_fmt = '%b %d, %Y'
|
|||
#html_copy_source = True
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'pyinstalldocs'
|
||||
htmlhelp_basename = 'pipdocs'
|
||||
|
||||
|
||||
# Options for LaTeX output
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
pyinstall
|
||||
=========
|
||||
pip
|
||||
===
|
||||
|
||||
.. toctree::
|
||||
|
||||
|
@ -13,12 +13,12 @@ pyinstall
|
|||
Introduction
|
||||
------------
|
||||
|
||||
pyinstall is a replacement for `easy_install
|
||||
pip is a replacement for `easy_install
|
||||
<http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
|
||||
same techniques for finding packages, so packages that were made
|
||||
easy_installable should be pyinstallable as well.
|
||||
easy_installable should be pipable as well.
|
||||
|
||||
pyinstall is meant to improve on easy_install. Some of the improvements:
|
||||
pip is meant to improve on easy_install. Some of the improvements:
|
||||
|
||||
* All packages are downloaded before installation. Partially-completed
|
||||
installation doesn't occur as a result.
|
||||
|
@ -26,7 +26,7 @@ pyinstall is meant to improve on easy_install. Some of the improvements:
|
|||
* Care is taken to present useful output on the console.
|
||||
|
||||
* The reasons for actions are kept track of. For instance, if a package is
|
||||
being installed, pyinstall keeps track of why that package was required.
|
||||
being installed, pip keeps track of why that package was required.
|
||||
|
||||
* Error messages should be useful.
|
||||
|
||||
|
@ -38,21 +38,21 @@ pyinstall is meant to improve on easy_install. Some of the improvements:
|
|||
|
||||
* Maybe features like native support for other version control systems, or
|
||||
uninstallation, will get added. (They might get added to easy_install, but I
|
||||
think the chance for pyinstall is higher.)
|
||||
think the chance for pip is higher.)
|
||||
|
||||
Also, pyinstall will eventually be merged directly with poacheggs, making it
|
||||
Also, pip will eventually be merged directly with poacheggs, making it
|
||||
simple to define fixed sets of requirements and reliably reproduce a set of
|
||||
packages.
|
||||
|
||||
pyinstall is complementary with `virtualenv
|
||||
pip is complementary with `virtualenv
|
||||
<http://pypi.python.org/pypi/virtualenv>`_, and it is encouraged that you use
|
||||
virtualenv to isolate your installation.
|
||||
|
||||
Community
|
||||
---------
|
||||
|
||||
The homepage for pyinstall is temporarily located `on PyPI
|
||||
<http://pypi.python.org/pypi/pyinstall>`_ -- a more proper homepage
|
||||
The homepage for pip is temporarily located `on PyPI
|
||||
<http://pypi.python.org/pypi/pip>`_ -- a more proper homepage
|
||||
will follow. Bugs can go on the `poacheggs Trac instance
|
||||
<http://trac.openplans.org/poacheggs/>`_ (probably that will change
|
||||
too). Discussion should happen on the `virtualenv email group
|
||||
|
@ -61,7 +61,7 @@ too). Discussion should happen on the `virtualenv email group
|
|||
Differences From easy_install
|
||||
-----------------------------
|
||||
|
||||
pyinstall cannot install some packages. Specifically:
|
||||
pip cannot install some packages. Specifically:
|
||||
|
||||
* It cannot install from eggs. It only installs from source. (Maybe this will
|
||||
be changed sometime, but it's low priority.)
|
||||
|
@ -92,12 +92,12 @@ have to install a bunch of other optional pieces? Most of all, will you be able
|
|||
to do it again?
|
||||
|
||||
If you've ever tried to setup an application on a new system, or with slightly
|
||||
updated pieces, and had it fail, pyinstall requirements are for you. If you
|
||||
haven't had this problem then you will eventually, so pyinstall requirements are
|
||||
updated pieces, and had it fail, pip requirements are for you. If you
|
||||
haven't had this problem then you will eventually, so pip requirements are
|
||||
for you too -- requirements make explicit, repeatable installation of packages.
|
||||
|
||||
So what are requirements files? They are very simple: lists of packages to
|
||||
install. Instead of running something like ``pyinstall MyApp`` and getting
|
||||
install. Instead of running something like ``pip MyApp`` and getting
|
||||
whatever libraries come along, you can create a requirements file something like::
|
||||
|
||||
MyApp
|
||||
|
@ -112,12 +112,12 @@ tools that MyApp doesn't strictly require.
|
|||
|
||||
You can also include "editable" packages -- packages that are checked out from
|
||||
subversion (in the future other VCS will be supported). These are just like
|
||||
using the ``-e`` option to pyinstall. They look like::
|
||||
using the ``-e`` option to pip. They look like::
|
||||
|
||||
-e svn+http://myrepo/svn/MyApp#egg=MyApp
|
||||
|
||||
You have to start the URL with ``svn+`` (eventually you'll be able to use
|
||||
``hg+`` etc), and you have to include ``#egg=Package`` so pyinstall knows what
|
||||
``hg+`` etc), and you have to include ``#egg=Package`` so pip knows what
|
||||
to expect at that URL. You can also include ``@rev`` in the URL, e.g., ``@275``
|
||||
to check out revision 275.
|
||||
|
||||
|
@ -130,7 +130,7 @@ tell you what all the exact versions are.
|
|||
|
||||
To create a new requirements file from a known working environment, use::
|
||||
|
||||
$ pyinstall.py --freeze=stable-req.txt
|
||||
$ pip freeze -o stable-req.txt
|
||||
|
||||
This will write a listing of *all* installed libraries to ``stable-req.txt``
|
||||
with exact versions for every library. You may want to edit the file down after
|
||||
|
@ -140,7 +140,7 @@ stable starting point for constructing your requirements file.
|
|||
You can also give it an existing requirements file, and it will use that as a
|
||||
sort of template for the new file. So if you do::
|
||||
|
||||
$ pyinstall.py --freeze=stable-req.txt -r devel-req.txt
|
||||
$ pip freeze -o stable-req.txt -r devel-req.txt
|
||||
|
||||
it will keep the packages listed in ``devel-req.txt`` in order and preserve
|
||||
comments.
|
||||
|
@ -149,44 +149,44 @@ Bundles
|
|||
-------
|
||||
|
||||
Another way to distribute a set of libraries is a bundle format (specific to
|
||||
pyinstall). This format is not stable at this time (there simply hasn't been
|
||||
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
|
||||
source for your package, and you can have pyinstall install then all together.
|
||||
source for your package, and you can have pip install then all together.
|
||||
Once you have the bundle file further network access won't be necessary. To
|
||||
build a bundle file, do::
|
||||
|
||||
$ pyinstall.py --bundle=MyApp.pybundle MyApp
|
||||
$ pip install bundle=MyApp.pybundle MyApp
|
||||
|
||||
(Using a `requirements file`_ would be wise.) Then someone else can get the
|
||||
file ``MyApp.pybundle`` and run::
|
||||
|
||||
$ pyinstall.py MyApp.pybundle
|
||||
$ pip install MyApp.pybundle
|
||||
|
||||
This is *not* a binary format. This only packages source. If you have binary
|
||||
packages, then the person who installs the files will have to have a compiler,
|
||||
any necessary headers installed, etc. Binary packages are hard, this is
|
||||
relatively easy.
|
||||
|
||||
Using pyinstall With virtualenv
|
||||
-------------------------------
|
||||
Using pip With virtualenv
|
||||
-------------------------
|
||||
|
||||
pyinstall is most nutritious when used with `virtualenv
|
||||
<http://pypi.python.org/pypi/virtualenv>`_. One of the reasons pyinstall
|
||||
pip is most nutritious when used with `virtualenv
|
||||
<http://pypi.python.org/pypi/virtualenv>`_. One of the reasons pip
|
||||
doesn't install "multi-version" eggs is that virtualenv removes much of the need
|
||||
for it.
|
||||
|
||||
pyinstall does not have to be installed to use it, you can run ``python
|
||||
pyinstall.py`` and it will work. This is intended to avoid the bootstrapping
|
||||
problem of installation. You can also run pyinstall inside any virtualenv
|
||||
pip does not have to be installed to use it, you can run ``python
|
||||
pip`` and it will work. This is intended to avoid the bootstrapping
|
||||
problem of installation. You can also run pip inside any virtualenv
|
||||
environment, like::
|
||||
|
||||
$ virtualenv new-env/
|
||||
... creates new-env/ ...
|
||||
$ pyinstall.py -E new-env/ MyPackage
|
||||
$ pip install -E new-env/ MyPackage
|
||||
|
||||
This is exactly equivalent to::
|
||||
|
||||
$ ./new-env/bin/python pyinstall.py MyPackage
|
||||
$ ./new-env/bin/python pip install MyPackage
|
||||
|
||||
Except, if you have ``virtualenv`` installed and the path ``new-env/``
|
||||
doesn't exist, then a new virtualenv will be created.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
News for pyinstall
|
||||
News for pip
|
||||
==================
|
||||
|
||||
0.1.4
|
||||
|
@ -23,7 +23,7 @@ News for pyinstall
|
|||
``mypackage/`` are the same directory.
|
||||
|
||||
* Added support for an environmental variable
|
||||
``$PYINSTALL_DOWNLOAD_CACHE`` which will cache package downloads, so
|
||||
``$PIP_DOWNLOAD_CACHE`` which will cache package downloads, so
|
||||
future installations won't require large downloads. Network access
|
||||
is still required, but just some downloads will be avoided when
|
||||
using this.
|
||||
|
@ -53,7 +53,7 @@ News for pyinstall
|
|||
0.1.1
|
||||
-----
|
||||
|
||||
* Fixed a NameError exception when running pyinstall outside of a
|
||||
* Fixed a NameError exception when running pip outside of a
|
||||
virtualenv environment.
|
||||
|
||||
* Added HTTP proxy support (from Prabhu Ramachandran)
|
||||
|
|
|
@ -144,7 +144,7 @@ parser.add_option(
|
|||
'-E', '--environment',
|
||||
dest='venv',
|
||||
metavar='DIR',
|
||||
help='virtualenv environment to run pyinstall in (either give the '
|
||||
help='virtualenv environment to run pip in (either give the '
|
||||
'interpreter or the environment base directory)')
|
||||
|
||||
parser.add_option(
|
||||
|
@ -321,7 +321,7 @@ def main(initial_args=None):
|
|||
if log_fp is not None:
|
||||
log_fp.close()
|
||||
if exit:
|
||||
log_fn = './pyinstall-log.txt'
|
||||
log_fn = './pip-log.txt'
|
||||
text = '\n'.join(complete_log)
|
||||
logger.fatal('Storing complete log in %s' % log_fn)
|
||||
log_fp = open_logfile_append(log_fn)
|
||||
|
@ -650,7 +650,7 @@ class InstallRequirement(object):
|
|||
if self._temp_build_dir is not None:
|
||||
return self._temp_build_dir
|
||||
if self.req is None:
|
||||
self._temp_build_dir = tempfile.mkdtemp('-build', 'pyinstall-')
|
||||
self._temp_build_dir = tempfile.mkdtemp('-build', 'pip-')
|
||||
return self._temp_build_dir
|
||||
if self.editable:
|
||||
name = self.name.lower()
|
||||
|
@ -690,10 +690,10 @@ class InstallRequirement(object):
|
|||
if self.editable:
|
||||
egg_base_option = []
|
||||
else:
|
||||
egg_info_dir = os.path.join(self.source_dir, 'pyinstall-egg-info')
|
||||
egg_info_dir = os.path.join(self.source_dir, 'pip-egg-info')
|
||||
if not os.path.exists(egg_info_dir):
|
||||
os.makedirs(egg_info_dir)
|
||||
egg_base_option = ['--egg-base', 'pyinstall-egg-info']
|
||||
egg_base_option = ['--egg-base', 'pip-egg-info']
|
||||
call_subprocess(
|
||||
[sys.executable, '-c', script, 'egg_info'] + egg_base_option,
|
||||
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False,
|
||||
|
@ -740,7 +740,7 @@ execfile(__file__)
|
|||
if self.editable:
|
||||
base = self.source_dir
|
||||
else:
|
||||
base = os.path.join(self.source_dir, 'pyinstall-egg-info')
|
||||
base = os.path.join(self.source_dir, 'pip-egg-info')
|
||||
filenames = os.listdir(base)
|
||||
if self.editable:
|
||||
filenames = [f for f in filenames if f.endswith('.egg-info')]
|
||||
|
@ -800,7 +800,7 @@ execfile(__file__)
|
|||
assert self.source_dir
|
||||
if self.comes_from == 'command line':
|
||||
# We don't check the versions of things explicitly installed.
|
||||
# This makes, e.g., "pyinstall Package==dev" possible
|
||||
# This makes, e.g., "pip Package==dev" possible
|
||||
return
|
||||
version = self.installed_version
|
||||
if version not in self.req:
|
||||
|
@ -962,7 +962,8 @@ execfile(__file__)
|
|||
if not base:
|
||||
## FIXME: this doesn't seem right:
|
||||
return False
|
||||
self._is_bundle = os.path.exists(os.path.join(base, 'pyinstall-manifest.txt'))
|
||||
self._is_bundle = (os.path.exists(os.path.join(base, 'pip-manifest.txt'))
|
||||
or os.path.exists(os.path.join(base, 'pyinstall-manifest.txt')))
|
||||
return self._is_bundle
|
||||
|
||||
def bundle_requirements(self):
|
||||
|
@ -1015,11 +1016,11 @@ execfile(__file__)
|
|||
@property
|
||||
def delete_marker_filename(self):
|
||||
assert self.source_dir
|
||||
return os.path.join(self.source_dir, 'pyinstall-delete-this-directory.txt')
|
||||
return os.path.join(self.source_dir, 'pip-delete-this-directory.txt')
|
||||
|
||||
DELETE_MARKER_MESSAGE = '''\
|
||||
This file is placed here by pyinstall to indicate the source was put
|
||||
here by pyinstall.
|
||||
This file is placed here by pip to indicate the source was put
|
||||
here by pip.
|
||||
|
||||
Once this package is successfully installed this source code will be
|
||||
deleted (unless you remove this file).
|
||||
|
@ -1176,8 +1177,8 @@ class RequirementSet(object):
|
|||
md5_hash = link.md5_hash
|
||||
target_url = link.url.split('#', 1)[0]
|
||||
target_file = None
|
||||
if os.environ.get('PYINSTALL_DOWNLOAD_CACHE'):
|
||||
target_file = os.path.join(os.environ['PYINSTALL_DOWNLOAD_CACHE'],
|
||||
if os.environ.get('PIP_DOWNLOAD_CACHE'):
|
||||
target_file = os.path.join(os.environ['PIP_DOWNLOAD_CACHE'],
|
||||
urllib.quote(target_url, ''))
|
||||
if (target_file and os.path.exists(target_file)
|
||||
and os.path.exists(target_file+'.content-type')):
|
||||
|
@ -1420,7 +1421,7 @@ class RequirementSet(object):
|
|||
name = os.path.join(dirpath, 'svn-checkout.txt')
|
||||
name = self._clean_zip_name(name, dir)
|
||||
zip.writestr(basename + '/' + name, _svn_checkout_text(svn_url, svn_rev))
|
||||
zip.writestr('pyinstall-manifest.txt', self.bundle_requirements())
|
||||
zip.writestr('pip-manifest.txt', self.bundle_requirements())
|
||||
zip.close()
|
||||
# Unlike installation, this will always delete the build directories
|
||||
logger.info('Removing temporary build dir %s and source dir %s'
|
||||
|
@ -1431,9 +1432,9 @@ class RequirementSet(object):
|
|||
|
||||
|
||||
BUNDLE_HEADER = '''\
|
||||
# This is a pyinstall bundle file, that contains many source packages
|
||||
# This is a pip bundle file, that contains many source packages
|
||||
# that can be installed as a group. You can install this like:
|
||||
# pyinstall this_file.zip
|
||||
# pip this_file.zip
|
||||
# The rest of the file contains a list of all the packages included:
|
||||
'''
|
||||
|
||||
|
@ -1720,7 +1721,7 @@ def write_freeze(filename, requirement, find_links, find_tags=False):
|
|||
f.write('-f %s\n' % link)
|
||||
installations = {}
|
||||
for dist in pkg_resources.working_set:
|
||||
if dist.key in ('setuptools', 'pyinstall', 'python'):
|
||||
if dist.key in ('setuptools', 'pip', 'python'):
|
||||
## FIXME: also skip virtualenv?
|
||||
continue
|
||||
req = FrozenRequirement.from_dist(dist, dependency_links, find_tags=find_tags)
|
||||
|
@ -1753,7 +1754,7 @@ def write_freeze(filename, requirement, find_links, find_tags=False):
|
|||
continue
|
||||
f.write(str(installations[line_req.name]))
|
||||
del installations[line_req.name]
|
||||
f.write('## The following requirements were added by pyinstall --freeze:\n')
|
||||
f.write('## The following requirements were added by pip --freeze:\n')
|
||||
for installation in sorted(installations.values(), key=lambda x: x.name):
|
||||
f.write(str(installation))
|
||||
if filename != '-':
|
|
@ -5,5 +5,5 @@ sphinx-build -E -b html docs/ docs/_build || exit 1
|
|||
if [ "$1" = "publish" ] ; then
|
||||
cd docs/_build
|
||||
echo "Uploading files..."
|
||||
tar czvf - . | ssh flow.openplans.org 'ssh acura.openplans.org "cd /www/pyinstall.openplans.org/; tar xzvf -"'
|
||||
tar czvf - . | ssh flow.openplans.org 'ssh acura.openplans.org "cd /www/pip.openplans.org/; tar xzvf -"'
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env python
|
||||
import pip
|
||||
pip.main()
|
14
setup.py
14
setup.py
|
@ -9,17 +9,17 @@ version = '0.1.5'
|
|||
doc_dir = os.path.join(os.path.dirname(__file__), 'docs')
|
||||
index_filename = os.path.join(doc_dir, 'index.txt')
|
||||
long_description = """\
|
||||
The main website for pyinstall is `pyinstall.openplans.org
|
||||
<http://pyinstall.openplans.org>`_
|
||||
The main website for pip is `pip.openplans.org
|
||||
<http://pip.openplans.org>`_
|
||||
|
||||
"""
|
||||
long_description = long_description + open(index_filename).read().split('split here', 1)[1]
|
||||
|
||||
|
||||
|
||||
setup(name='pyinstall',
|
||||
setup(name='pip',
|
||||
version=version,
|
||||
description="Installer for Python packages",
|
||||
description="pip installs packages. Python packages. An easy_install replacement",
|
||||
long_description=long_description,
|
||||
classifiers=[
|
||||
'Development Status :: 4 - Beta',
|
||||
|
@ -31,11 +31,11 @@ setup(name='pyinstall',
|
|||
keywords='easy_install distutils setuptools egg virtualenv',
|
||||
author='The Open Planning Project',
|
||||
author_email='python-virtualenv@groups.google.com',
|
||||
url='http://pyinstall.openplans.org',
|
||||
url='http://pip.openplans.org',
|
||||
license='MIT',
|
||||
py_modules=['pyinstall'],
|
||||
py_modules=['pip'],
|
||||
## FIXME: is this the best way? (Works with distutils, but
|
||||
## don't we really require setuptools anyway?)
|
||||
scripts=['pyinstall.py'],
|
||||
scripts=['scripts/pip'],
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import os
|
|||
import subprocess
|
||||
import shutil
|
||||
|
||||
pyinstall_fn = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'pyinstall.py')
|
||||
pip_fn = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'pip.py')
|
||||
|
||||
def all_projects():
|
||||
data = urllib2.urlopen('http://pypi.python.org/pypi/').read()
|
||||
|
@ -16,7 +16,7 @@ def main(args=None):
|
|||
if args is None:
|
||||
args = sys.argv[1:]
|
||||
if not args:
|
||||
print 'Usage: test_all_pyinstall.py <output-dir>'
|
||||
print 'Usage: test_all_pip.py <output-dir>'
|
||||
sys.exit(1)
|
||||
output = args[0]
|
||||
if not os.path.exists(output):
|
||||
|
@ -45,7 +45,7 @@ def test_packages(output, pending_fn):
|
|||
assert not code, "virtualenv failed"
|
||||
print 'Trying installation of %s' % dest_dir
|
||||
code = subprocess.call([os.path.join(dest_dir, 'bin', 'python'),
|
||||
pyinstall_fn, package])
|
||||
pip_fn, package])
|
||||
if code:
|
||||
print 'Installation of %s failed' % package
|
||||
print 'Now checking easy_install...'
|
|
@ -21,9 +21,9 @@ def reset_env():
|
|||
env.run('%s/bin/easy_install' % env.base_path, 'http://peak.telecommunity.com/snapshots/setuptools-0.7a1dev-r66388.tar.gz')
|
||||
env.run('mkdir', 'src')
|
||||
|
||||
def run_pyinstall(*args, **kw):
|
||||
def run_pip(*args, **kw):
|
||||
import sys
|
||||
args = ('python', '../../pyinstall.py', '-E', env.base_path) + args
|
||||
args = ('python', '../../pip', '-E', env.base_path) + args
|
||||
#print >> sys.__stdout__, 'running', ' '.join(args)
|
||||
if options.show_error:
|
||||
kw['expect_error'] = True
|
||||
|
@ -47,7 +47,7 @@ parser.add_option('--first', action='store_true',
|
|||
parser.add_option('--diff', action='store_true',
|
||||
help='Show diffs in doctest failures')
|
||||
parser.add_option('--show-error', action='store_true',
|
||||
help='Show the errors (use expect_error=True in run_pyinstall)')
|
||||
help='Show the errors (use expect_error=True in run_pip)')
|
||||
parser.add_option('-v', action='store_true',
|
||||
help='Be verbose')
|
||||
|
Loading…
Reference in New Issue