Commit 1cd926fa authored by Jason R. Coombs's avatar Jason R. Coombs

Issue #32: Fixed TypeError in get_resource_stream on zipped eggs

parent ed30b72b
...@@ -28,7 +28,7 @@ except NameError: ...@@ -28,7 +28,7 @@ except NameError:
try: try:
basestring basestring
next = lambda o: o.next() next = lambda o: o.next()
from cStringIO import StringIO from cStringIO import StringIO as BytesIO
def exec_(code, globs=None, locs=None): def exec_(code, globs=None, locs=None):
if globs is None: if globs is None:
frame = sys._getframe(1) frame = sys._getframe(1)
...@@ -41,7 +41,7 @@ try: ...@@ -41,7 +41,7 @@ try:
exec("""exec code in globs, locs""") exec("""exec code in globs, locs""")
except NameError: except NameError:
basestring = str basestring = str
from io import StringIO from io import BytesIO
exec_ = eval("exec") exec_ = eval("exec")
def execfile(fn, globs=None, locs=None): def execfile(fn, globs=None, locs=None):
if globs is None: if globs is None:
...@@ -1402,7 +1402,7 @@ class NullProvider: ...@@ -1402,7 +1402,7 @@ class NullProvider:
return self._fn(self.module_path, resource_name) return self._fn(self.module_path, resource_name)
def get_resource_stream(self, manager, resource_name): def get_resource_stream(self, manager, resource_name):
return StringIO(self.get_resource_string(manager, resource_name)) return BytesIO(self.get_resource_string(manager, resource_name))
def get_resource_string(self, manager, resource_name): def get_resource_string(self, manager, resource_name):
return self._get(self._fn(self.module_path, resource_name)) return self._get(self._fn(self.module_path, resource_name))
......
[console_scripts]
easy_install = setuptools.command.easy_install:main
easy_install-3.3 = setuptools.command.easy_install:main
[distutils.setup_keywords]
namespace_packages = setuptools.dist:check_nsp
use_2to3_exclude_fixers = setuptools.dist:assert_string_list
package_data = setuptools.dist:check_package_data
use_2to3 = setuptools.dist:assert_bool
install_requires = setuptools.dist:check_requirements
entry_points = setuptools.dist:check_entry_points
convert_2to3_doctests = setuptools.dist:assert_string_list
dependency_links = setuptools.dist:assert_string_list
test_suite = setuptools.dist:check_test_suite
test_loader = setuptools.dist:check_importable
tests_require = setuptools.dist:check_requirements
packages = setuptools.dist:check_packages
use_2to3_fixers = setuptools.dist:assert_string_list
extras_require = setuptools.dist:check_extras
include_package_data = setuptools.dist:assert_bool
eager_resources = setuptools.dist:assert_string_list
exclude_package_data = setuptools.dist:check_package_data
zip_safe = setuptools.dist:assert_bool
[distutils.commands] [distutils.commands]
bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst build_py = setuptools.command.build_py:build_py
test = setuptools.command.test:test
easy_install = setuptools.command.easy_install:easy_install
install_egg_info = setuptools.command.install_egg_info:install_egg_info install_egg_info = setuptools.command.install_egg_info:install_egg_info
upload_docs = setuptools.command.upload_docs:upload_docs
setopt = setuptools.command.setopt:setopt
install = setuptools.command.install:install
bdist_egg = setuptools.command.bdist_egg:bdist_egg
alias = setuptools.command.alias:alias
saveopts = setuptools.command.saveopts:saveopts
sdist = setuptools.command.sdist:sdist
rotate = setuptools.command.rotate:rotate
develop = setuptools.command.develop:develop
install_lib = setuptools.command.install_lib:install_lib
register = setuptools.command.register:register register = setuptools.command.register:register
build_py = setuptools.command.build_py:build_py
install_scripts = setuptools.command.install_scripts:install_scripts install_scripts = setuptools.command.install_scripts:install_scripts
alias = setuptools.command.alias:alias
saveopts = setuptools.command.saveopts:saveopts
bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm
install = setuptools.command.install:install
setopt = setuptools.command.setopt:setopt
easy_install = setuptools.command.easy_install:easy_install
egg_info = setuptools.command.egg_info:egg_info egg_info = setuptools.command.egg_info:egg_info
build_ext = setuptools.command.build_ext:build_ext build_ext = setuptools.command.build_ext:build_ext
sdist = setuptools.command.sdist:sdist
[setuptools.file_finders] develop = setuptools.command.develop:develop
svn_cvs = setuptools.command.sdist:_default_revctrl bdist_egg = setuptools.command.bdist_egg:bdist_egg
upload_docs = setuptools.command.upload_docs:upload_docs
bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst
install_lib = setuptools.command.install_lib:install_lib
test = setuptools.command.test:test
rotate = setuptools.command.rotate:rotate
[egg_info.writers] [egg_info.writers]
requires.txt = setuptools.command.egg_info:write_requirements requires.txt = setuptools.command.egg_info:write_requirements
namespace_packages.txt = setuptools.command.egg_info:overwrite_arg
entry_points.txt = setuptools.command.egg_info:write_entries entry_points.txt = setuptools.command.egg_info:write_entries
top_level.txt = setuptools.command.egg_info:write_toplevel_names
depends.txt = setuptools.command.egg_info:warn_depends_obsolete depends.txt = setuptools.command.egg_info:warn_depends_obsolete
PKG-INFO = setuptools.command.egg_info:write_pkg_info
eager_resources.txt = setuptools.command.egg_info:overwrite_arg
dependency_links.txt = setuptools.command.egg_info:overwrite_arg dependency_links.txt = setuptools.command.egg_info:overwrite_arg
namespace_packages.txt = setuptools.command.egg_info:overwrite_arg
eager_resources.txt = setuptools.command.egg_info:overwrite_arg
PKG-INFO = setuptools.command.egg_info:write_pkg_info
top_level.txt = setuptools.command.egg_info:write_toplevel_names
[setuptools.file_finders]
svn_cvs = setuptools.command.sdist:_default_revctrl
[distutils.setup_keywords]
use_2to3_fixers = setuptools.dist:assert_string_list
convert_2to3_doctests = setuptools.dist:assert_string_list
test_loader = setuptools.dist:check_importable
tests_require = setuptools.dist:check_requirements
entry_points = setuptools.dist:check_entry_points
zip_safe = setuptools.dist:assert_bool
include_package_data = setuptools.dist:assert_bool
packages = setuptools.dist:check_packages
eager_resources = setuptools.dist:assert_string_list
install_requires = setuptools.dist:check_requirements
exclude_package_data = setuptools.dist:check_package_data
extras_require = setuptools.dist:check_extras
test_suite = setuptools.dist:check_test_suite
use_2to3_exclude_fixers = setuptools.dist:assert_string_list
dependency_links = setuptools.dist:assert_string_list
package_data = setuptools.dist:check_package_data
use_2to3 = setuptools.dist:assert_bool
namespace_packages = setuptools.dist:check_nsp
[console_scripts]
easy_install = setuptools.command.easy_install:main
easy_install-3.3 = setuptools.command.easy_install:main
[setuptools.installation] [setuptools.installation]
eggsecutable = setuptools.command.easy_install:bootstrap eggsecutable = setuptools.command.easy_install:bootstrap
......
[ssl:sys_platform=='win32' and python_version=='2.4']
ctypes==1.0.2
[ssl:python_version in '2.4, 2.5']
ssl==1.16
[certs] [certs]
certifi==0.0.8 certifi==0.0.8
[ssl:sys_platform=='win32'] [ssl:sys_platform=='win32']
wincertstore==0.1 wincertstore==0.1
[ssl:python_version in '2.4, 2.5']
ssl==1.16
[ssl:sys_platform=='win32' and python_version=='2.4']
ctypes==1.0.2
\ No newline at end of file
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