From 601add2805c394928b7dd9d2156d24508a9bddb6 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Fri, 15 Feb 2008 23:53:18 +0000 Subject: Fix ``resource_listdir('')`` always returning an empty list for zipped eggs. Fix missing import in sdist command when encountering unrecognized SVN entries format. (backports from trunk) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4060849 --- pkg_resources.py | 6 +++--- pkg_resources.txt | 3 +++ setuptools/command/sdist.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 78c96094..c5ebbb3d 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1188,7 +1188,9 @@ class NullProvider: ) def _fn(self, base, resource_name): - return os.path.join(base, *resource_name.split('/')) + if resource_name: + return os.path.join(base, *resource_name.split('/')) + return base def _get(self, path): if hasattr(self.loader, 'get_data'): @@ -1226,8 +1228,6 @@ class EggProvider(NullProvider): - - class DefaultProvider(EggProvider): """Provides access to package resources in the filesystem""" diff --git a/pkg_resources.txt b/pkg_resources.txt index ad660a77..7d8afd37 100755 --- a/pkg_resources.txt +++ b/pkg_resources.txt @@ -1692,6 +1692,9 @@ File/Path Utilities Release Notes/Change History ---------------------------- +0.6final + * Fix ``resource_listdir('')`` always returning an empty list for zipped eggs. + 0.6c7 * Fix package precedence problem where single-version eggs installed in ``site-packages`` would take precedence over ``.egg`` files (or directories) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 2b1d117e..40c5a7c4 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -1,5 +1,6 @@ from distutils.command.sdist import sdist as _sdist from distutils.util import convert_path +from distutils import log import os, re, sys, pkg_resources entities = [ @@ -38,7 +39,6 @@ def joinpath(prefix,suffix): - def walk_revctrl(dirname=''): """Find all files under revision control""" for ep in pkg_resources.iter_entry_points('setuptools.file_finders'): -- cgit v1.2.3