[Python-checkins] r43429 - sandbox/trunk/setuptools/EasyInstall.txt sandbox/trunk/setuptools/setuptools.txt

phillip.eby python-checkins at python.org
Thu Mar 30 01:09:17 CEST 2006


Author: phillip.eby
Date: Thu Mar 30 01:09:16 2006
New Revision: 43429

Modified:
   sandbox/trunk/setuptools/EasyInstall.txt
   sandbox/trunk/setuptools/setuptools.txt
Log:
More docs for .py#egg and ``dependency_links``


Modified: sandbox/trunk/setuptools/EasyInstall.txt
==============================================================================
--- sandbox/trunk/setuptools/EasyInstall.txt	(original)
+++ sandbox/trunk/setuptools/EasyInstall.txt	Thu Mar 30 01:09:16 2006
@@ -391,6 +391,19 @@
 published to the web, you can then make the eggs available for download, either
 in an intranet or to the internet at large.
 
+If someone distributes a package in the form of a single ``.py`` file, you can
+wrap it in an egg by tacking an ``#egg=name-version`` suffix on the file's URL.
+So, something like this::
+
+    easy_install -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo
+
+will install the package as an egg, and     
+
+    easy_install -zmaxd. \
+        -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo
+
+will create a ``.egg`` file in the current directory.
+
 
 Creating your own Package Index
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Modified: sandbox/trunk/setuptools/setuptools.txt
==============================================================================
--- sandbox/trunk/setuptools/setuptools.txt	(original)
+++ sandbox/trunk/setuptools/setuptools.txt	Thu Mar 30 01:09:16 2006
@@ -527,6 +527,45 @@
 using ``setup.py develop``.)
 
 
+Dependencies that aren't in PyPI
+--------------------------------
+
+If your project depends on packages that aren't registered in PyPI, you may
+still be able to depend on them, as long as they are available for download
+as an egg, in the standard distutils ``sdist`` format, or as a single ``.py``
+file.  You just need to add some URLs to the ``dependency_links`` argument to
+``setup()``.
+
+The URLs must be either:
+
+1. direct download URLs, or
+2. the URLs of web pages that contain direct download links
+
+In general, it's better to link to web pages, because it is usually less
+complex to update a web page than to release a new version of your project.
+You can also use a SourceForge ``showfiles.php`` link in the case where a
+package you depend on is distributed via SourceForge.
+
+If you depend on a package that's distributed as a single ``.py`` file, you
+must include an ``#egg=project-version`` suffix to the URL, to give a project
+name and version number.  (Be sure to escape any dashes in the name or version
+by replacing them with underscores.)  EasyInstall will recognize this suffix
+and automatically create a trivial ``setup.py`` to wrap the single ``.py`` file
+as an egg.
+
+The ``dependency_links`` option takes the form of a list of URL strings.  For
+example, the below will cause EasyInstall to search the specified page for
+eggs or source distributions, if the package's dependencies aren't already
+installed::
+
+    setup(
+        ...
+        dependency_links = [
+            "http://peak.telecommunity.com/snapshots/"
+        ],
+    )
+
+
 .. _Declaring Extras:
 
 


More information about the Python-checkins mailing list