Commit 1bb64d07 authored by PJ Eby's avatar PJ Eby

Misc. bugs reported by Ian Bicking and Ashley Walsh.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041168
parent 54bb8e40
...@@ -227,7 +227,7 @@ def get_distribution(dist): ...@@ -227,7 +227,7 @@ def get_distribution(dist):
"""Return a current distribution object for a Requirement or string""" """Return a current distribution object for a Requirement or string"""
if isinstance(dist,basestring): dist = Requirement.parse(dist) if isinstance(dist,basestring): dist = Requirement.parse(dist)
if isinstance(dist,Requirement): dist = get_provider(dist) if isinstance(dist,Requirement): dist = get_provider(dist)
if not isintance(dist,Distribution): if not isinstance(dist,Distribution):
raise TypeError("Expected string, Requirement, or Distribution", dist) raise TypeError("Expected string, Requirement, or Distribution", dist)
return dist return dist
...@@ -1443,7 +1443,7 @@ def declare_namespace(packageName): ...@@ -1443,7 +1443,7 @@ def declare_namespace(packageName):
path, parent = sys.path, None path, parent = sys.path, None
if '.' in packageName: if '.' in packageName:
parent = '.'.join(package.split('.')[:-1]) parent = '.'.join(packageName.split('.')[:-1])
declare_namespace(parent) declare_namespace(parent)
__import__(parent) __import__(parent)
try: try:
......
...@@ -44,7 +44,7 @@ setup( ...@@ -44,7 +44,7 @@ setup(
entry_points = { entry_points = {
"distutils.commands" : [ "distutils.commands" : [
"%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals() "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals()
for cmd in SETUP_COMMANDS if cmd!="build_py" or sys.version>="2.4" for cmd in SETUP_COMMANDS if cmd!="build_py" or sys.version<"2.4"
], ],
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment