Permalink
Browse files

[svn r20974] Renaming pyinstall to pip

  • Loading branch information...
ianb committed Oct 15, 2008
0 parents commit c2000d7de68ef955a85cf8f5f6e78d4f25c10103
Showing with 3,384 additions and 0 deletions.
  1. +133 −0 docs/conf.py
  2. +192 −0 docs/index.txt
  3. +67 −0 docs/news.txt
  4. +51 −0 docs/requirement-format.txt
  5. +2,538 −0 pyinstall.py
  6. +9 −0 regen-docs
  7. +3 −0 setup.cfg
  8. +41 −0 setup.py
  9. +90 −0 tests/test_all_pyinstall.py
  10. +41 −0 tests/test_basic.txt
  11. +62 −0 tests/test_freeze.txt
  12. +43 −0 tests/test_proxy.txt
  13. +76 −0 tests/test_pyinstall.py
  14. +38 −0 tests/test_requirements.txt
@@ -0,0 +1,133 @@
+# -*- coding: utf-8 -*-
+#
+# Paste documentation build configuration file, created by
+# sphinx-quickstart on Tue Apr 22 22:08:49 2008.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# The contents of this file are pickled, so don't put values in the namespace
+# that aren't pickleable (module imports are okay, they're removed automatically).
+#
+# All configuration values have a default value; values that are commented out
+# serve to show the default value.
+
+import sys
+
+# If your extensions are in another directory, add it here.
+#sys.path.append('some/directory')
+
+# General configuration
+# ---------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+#extensions = ['sphinx.ext.autodoc']
+extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.txt'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General substitutions.
+project = 'pyinstall'
+copyright = '2008, The Open Planning Project'
+
+# The default replacements for |version| and |release|, also used in various
+# other places throughout the built documents.
+#
+# The short X.Y version.
+version = '0.1.3'
+# The full version, including alpha/beta/rc tags.
+release = '0.1.3'
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+unused_docs = []
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+
+# Options for HTML output
+# -----------------------
+
+# The style sheet to use for HTML and HTML Help pages. A file of that name
+# must exist either in Sphinx' static/ path, or in one of the custom paths
+# given in html_static_path.
+html_style = 'default.css'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Content template for the index page.
+#html_index = ''
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_use_modindex = True
+
+# If true, the reST sources are included in the HTML build as _sources/<name>.
+#html_copy_source = True
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'pyinstalldocs'
+
+
+# Options for LaTeX output
+# ------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, document class [howto/manual]).
+#latex_documents = []
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
@@ -0,0 +1,192 @@
+pyinstall
+=========
+
+.. toctree::
+
+ news
+ requirement-format
+
+.. comment: split here
+
+.. contents::
+
+Introduction
+------------
+
+pyinstall 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.
+
+pyinstall 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.
+
+* 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.
+
+* Error messages should be useful.
+
+* The code is relatively concise and cohesive, making it easier to use
+ programmatically.
+
+* Packages don't have to be installed as egg archives, they can be installed
+ flat (while keeping the egg metadata).
+
+* 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.)
+
+Also, pyinstall 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
+<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
+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
+<http://groups.google.com/group/python-virtualenv?hl=en>`_.
+
+Differences From easy_install
+-----------------------------
+
+pyinstall 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.)
+
+* It doesn't understand Setuptools extras (like ``package[test]``). This should
+ be added eventually.
+
+* It is incompatible with some packages that customize distutils or setuptools
+ in their ``setup.py`` files.
+
+* Maybe it doesn't work on Windows. At least, the author doesn't test on
+ Windows often.
+
+* It also has some extra features. Extra features the author thinks are great.
+
+.. _`requirements file`:
+
+Requirements Files
+------------------
+
+When installing software, and Python packages in particular, it's common that
+you get a lot of libraries installed. You just did ``easy_install MyPackage``
+and you get a dozen packages. Each of these packages has its own version.
+
+Maybe you ran that installation and it works. Great! Will it keep working?
+Did you have to provide special options to get it to find everything? Did you
+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
+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
+whatever libraries come along, you can create a requirements file something like::
+
+ MyApp
+ Framework==0.9.4
+ Library>=0.2
+
+Then, regardless of what MyApp lists in ``setup.py``, you'll get a specific
+version of Framework and at least the 0.2 version of Library. (You might think
+you could list these specific versions in ``setup.py`` -- try it and you'll
+quickly see why that doesn't work.) You can add optional libraries and support
+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::
+
+ -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
+to expect at that URL. You can also include ``@rev`` in the URL, e.g., ``@275``
+to check out revision 275.
+
+Freezing Requirements
+---------------------
+
+So you have a working set of packages, and you want to be able to install them
+elsewhere. `Requirements files`_ let you install exact versions, but it won't
+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
+
+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
+generating (e.g., to eliminate unnecessary libraries), but it'll give you a
+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
+
+it will keep the packages listed in ``devel-req.txt`` in order and preserve
+comments.
+
+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
+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.
+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
+
+(Using a `requirements file`_ would be wise.) Then someone else can get the
+file ``MyApp.pybundle`` and run::
+
+ $ pyinstall.py 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
+-------------------------------
+
+pyinstall is most nutritious when used with `virtualenv
+<http://pypi.python.org/pypi/virtualenv>`_. One of the reasons pyinstall
+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
+environment, like::
+
+ $ virtualenv new-env/
+ ... creates new-env/ ...
+ $ pyinstall.py -E new-env/ MyPackage
+
+This is exactly equivalent to::
+
+ $ ./new-env/bin/python pyinstall.py MyPackage
+
+Except, if you have ``virtualenv`` installed and the path ``new-env/``
+doesn't exist, then a new virtualenv will be created.
@@ -0,0 +1,67 @@
+News for pyinstall
+==================
+
+0.1.4
+-----
+
+* Added an option ``--install-option`` to pass options to pass
+ arguments to ``setup.py install``
+
+* ``.svn/`` directories are no longer included in bundles, as these
+ directories are specific to a version of svn -- if you build a
+ bundle on a system with svn 1.5, you can't use the checkout on a
+ system with svn 1.4. Instead a file ``svn-checkout.txt`` is
+ included that notes the original location and revision, and the
+ command you can use to turn it back into an svn checkout. (Probably
+ unpacking the bundle should, maybe optionally, recreate this
+ information -- but that is not currently implemented, and it would
+ require network access.)
+
+* Avoid ambiguities over project name case, where for instance
+ MyPackage and mypackage would be considered different packages.
+ This in particular caused problems on Macs, where ``MyPackage/`` and
+ ``mypackage/`` are the same directory.
+
+* Added support for an environmental variable
+ ``$PYINSTALL_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.
+
+0.1.3
+-----
+
+* Always use ``svn checkout`` (not ``export``) so that
+ ``tag_svn_revision`` settings give the revision of the package.
+
+* Don't update checkouts that came from ``.pybundle`` files.
+
+0.1.2
+-----
+
+* Improve error text when there are errors fetching HTML pages when
+ seeking packages.
+
+* Improve bundles: include empty directories, make them work with
+ editable packages.
+
+* If you use ``-E env`` and the environment ``env/`` doesn't exist, a
+ new virtual environment will be created.
+
+* Fix ``dependency_links`` for finding packages.
+
+0.1.1
+-----
+
+* Fixed a NameError exception when running pyinstall outside of a
+ virtualenv environment.
+
+* Added HTTP proxy support (from Prabhu Ramachandran)
+
+* Fixed use of ``hashlib.md5`` on python2.5+ (also from Prabhu
+ Ramachandran)
+
+0.1
+---
+
+* Initial release
Oops, something went wrong.

0 comments on commit c2000d7

Please sign in to comment.