[Python-checkins] python/nondist/sandbox/setuptools EasyInstall.txt, 1.35, 1.36 pkg_resources.py, 1.38, 1.39 setup.py, 1.25, 1.26 setuptools.txt, 1.8, 1.9

pje@users.sourceforge.net pje at users.sourceforge.net
Tue Jul 12 07:31:38 CEST 2005


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

Modified Files:
	EasyInstall.txt pkg_resources.py setup.py setuptools.txt 
Log Message:
Fix bugs and implement features reported/requested by folks on the
Distutils-SIG.


Index: EasyInstall.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/EasyInstall.txt,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- EasyInstall.txt	11 Jul 2005 04:21:56 -0000	1.35
+++ EasyInstall.txt	12 Jul 2005 05:31:36 -0000	1.36
@@ -495,15 +495,18 @@
     the PEAK downloads page, but ignore the other download links on that page.
     If all requested packages can be found using links on the specified
     download pages, the Python Package Index will *not* be consulted.  You can
-    use ``file:`` URLs to reference a local filename.
+    use a ``file:`` URL to reference a local HTML file containing links, or you
+    can just use the name of a directory containing "distribution files"
+    (source archives, eggs, Windows installers, etc.), and EasyInstall will
+    then be aware of the files available there.
 
-    You may specify multiple URLs with this option, separated by whitespace.
-    Note that on the command line, you will probably have to surround the URLs
-    with quotes, so that they are recognized as a single option value.  You can
-    also specify URLs in a configuration file; see `Configuration Files`_,
-    above; but note that this means the specified pages will be downloaded
-    every time you use EasyInstall (unless overridden on the command line) and
-    thus may make startup slower.
+    You may specify multiple URLs or directories with this option, separated by
+    whitespace.  Note that on the command line, you will probably have to
+    surround the URL list with quotes, so that it is recognized as a single
+    option value.  You can also specify URLs in a configuration file; see
+    `Configuration Files`_, above; but note that this means the specified pages
+    will be downloaded every time you use EasyInstall (unless overridden on the
+    command line) and thus may make startup slower.
 
 ``--delete-conflicting, -D`` (New in 0.5a9)
     If you are replacing a package that was previously installed *without*
@@ -593,6 +596,13 @@
    in Exemaker.  So, don't use Exemaker to wrap ``easy_install.py``, or at any
    rate don't expect it to work with all packages.
 
+0.5a10
+ * Put the ``easy_install`` module back in as a module, as it's needed for
+ ``python -m`` to run it!
+
+ * Allow ``--find-links/-f`` to accept local directories or filenames as well
+   as URLs.
+
 0.5a9
  * EasyInstall now automatically detects when an "unmanaged" package or
    module is going to be on ``sys.path`` ahead of a package you're installing,

Index: pkg_resources.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/pkg_resources.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- pkg_resources.py	8 Jul 2005 04:45:57 -0000	1.38
+++ pkg_resources.py	12 Jul 2005 05:31:36 -0000	1.39
@@ -69,17 +69,17 @@
 
 def get_provider(moduleName):
     """Return an IResourceProvider for the named module"""
-    module = sys.modules[moduleName]
+    try:
+        module = sys.modules[moduleName]
+    except KeyError:
+        __import__(moduleName)
+        module = sys.modules[moduleName]
     loader = getattr(module, '__loader__', None)
     return _find_adapter(_provider_factories, loader)(module)
 
 
 
 
-
-
-
-
 def get_platform():
     """Return this platform's string for platform-specific distributions
 
@@ -984,6 +984,7 @@
 
 def find_nothing(importer,path_item):
     return ()
+
 register_finder(object,find_nothing)
 
 def find_on_path(importer,path_item):
@@ -1004,7 +1005,7 @@
                 fullpath = os.path.join(path_item, entry)
                 lower = entry.lower()
                 if lower.endswith('.egg'):
-                    for dist in find_on_path(importer,fullpath):
+                    for dist in find_distributions(fullpath):
                         yield dist
                 elif lower.endswith('.egg-info'):
                     if os.path.isdir(fullpath):
@@ -1017,12 +1018,11 @@
                         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 = {}
 

Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setup.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- setup.py	11 Jul 2005 04:21:57 -0000	1.25
+++ setup.py	12 Jul 2005 05:31:36 -0000	1.26
@@ -33,7 +33,7 @@
     test_suite = 'setuptools.tests.test_suite',
 
     packages = find_packages(),
-    py_modules = ['pkg_resources'],
+    py_modules = ['pkg_resources', 'easy_install'],
     scripts = ['easy_install.py'],
     zip_safe = True,
 

Index: setuptools.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools.txt,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- setuptools.txt	11 Jul 2005 04:21:57 -0000	1.8
+++ setuptools.txt	12 Jul 2005 05:31:36 -0000	1.9
@@ -1334,6 +1334,17 @@
 Release Notes/Change History
 ----------------------------
 
+0.5a10
+ * Fix a problem with ``pkg_resources`` being confused by non-existent eggs on
+   ``sys.path`` (e.g. if a user deletes an egg without removing it from the
+   ``easy-install.pth`` file.
+
+ * Fix a problem with "basket" support in ``pkg_resources``, where egg-finding
+   never actually went inside ``.egg`` files.
+
+ * Made ``pkg_resources`` import the module you request resources from, if it's
+   not already imported.
+
 0.5a9
  * Include ``svn:externals`` directories in source distributions as well as
    normal subversion-controlled files and directories.



More information about the Python-checkins mailing list