[Python-checkins] python/nondist/sandbox/setuptools EasyInstall.txt, 1.20, 1.21 pkg_resources.py, 1.35, 1.36

pje@users.sourceforge.net pje at users.sourceforge.net
Wed Jul 6 05:46:18 CEST 2005


Update of /cvsroot/python/python/nondist/sandbox/setuptools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13765

Modified Files:
	EasyInstall.txt pkg_resources.py 
Log Message:
Added ``develop`` command to ``setuptools``-based packages.  This command
installs an ``.egg-link`` pointing to the package's source directory, and
script wrappers that ``execfile()`` the source versions of the package's
scripts.  This lets you put your development checkout(s) on sys.path 
without having to actually install them.  (To uninstall the link, use
use ``setup.py develop --uninstall``.)


Index: EasyInstall.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/EasyInstall.txt,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- EasyInstall.txt	6 Jul 2005 02:10:47 -0000	1.20
+++ EasyInstall.txt	6 Jul 2005 03:46:15 -0000	1.21
@@ -482,10 +482,17 @@
    time out or be missing a file.
 
 0.5a5
+ * Added ``develop`` command to ``setuptools``-based packages.  This command
+   installs an ``.egg-link`` pointing to the package's source directory, and
+   script wrappers that ``execfile()`` the source versions of the package's
+   scripts.  This lets you put your development checkout(s) on sys.path without
+   having to actually install them.  (To uninstall the link, use
+   use ``setup.py develop --uninstall``.)
+
  * Added ``egg_info`` command to ``setuptools``-based packages.  This command
    just creates or updates the "projectname.egg-info" directory, without
-   building an egg.  It's used by the ``bdist_egg`` and ``test`` commands now,
-   and will be used by the ``develop`` command later on.
+   building an egg.  (It's used by the ``bdist_egg``, ``test``, and ``develop``
+   commands.)
 
  * Enhanced the ``test`` command so that it doesn't install the package, but
    instead builds any C extensions in-place, updates the ``.egg-info``

Index: pkg_resources.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/pkg_resources.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- pkg_resources.py	27 Jun 2005 00:31:02 -0000	1.35
+++ pkg_resources.py	6 Jul 2005 03:46:16 -0000	1.36
@@ -984,10 +984,8 @@
 
 def find_nothing(importer,path_item):
     return ()
-
 register_finder(object,find_nothing)
 
-
 def find_on_path(importer,path_item):
     """Yield distributions accessible on a sys.path directory"""
     if not os.path.exists(path_item):
@@ -1004,25 +1002,27 @@
             # scan for .egg and .egg-info in directory
             for entry in os.listdir(path_item):
                 fullpath = os.path.join(path_item, entry)
-                if entry.lower().endswith('.egg'):
+                lower = entry.lower()
+                if lower.endswith('.egg'):
                     for dist in find_on_path(importer,fullpath):
                         yield dist
-                elif entry.lower().endswith('.egg-info'):
+                elif lower.endswith('.egg-info'):
                     if os.path.isdir(fullpath):
                         # development egg
                         metadata = PathMetadata(path_item, fullpath)
                         dist_name = os.path.splitext(entry)[0]
                         yield Distribution(path_item,metadata,name=dist_name)
-    elif path_item.lower().endswith('.egg'):
-        # packed egg
+                elif lower.endswith('.egg-link'):
+                    for line in file(fullpath):
+                        if not line.strip(): continue
+                        for item in find_distributions(line.rstrip()):
+                            yield item
+    elif path_item.lower().endswith('.egg'):    # packed egg
         metadata = EggMetadata(zipimport.zipimporter(path_item))
         yield Distribution.from_filename(path_item, metadata=metadata)
 
 register_finder(ImpWrapper,find_on_path)
 
-
-
-
 _namespace_handlers = {}
 _namespace_packages = {}
 



More information about the Python-checkins mailing list