[Distutils] [issue149] 'pkg_resources' is not defined in ssl_support.py
Keith Yang
setuptools at bugs.python.org
Fri May 31 11:32:12 CEST 2013
New submission from Keith Yang:
File "/Users/keitheis/Quest/biienv/lib/python2.7/site-packages/setuptools/package_index.py", line 161, in __init__
if verify_ssl and ssl_support.is_available and (ca_bundle or ssl_support.find_ca_bundle()):
File "/Users/keitheis/Quest/biienv/lib/python2.7/site-packages/setuptools/ssl_support.py", line 239, in find_ca_bundle
return pkg_resources.resource_filename('certifi', 'cacert.pem')
NameError: global name 'pkg_resources' is not defined
----------
files: patch_ssl_support.diff
keyword: pkg_resources
messages: 717
nosy: keitheis
priority: bug
status: unread
title: 'pkg_resources' is not defined in ssl_support.py
Added file: http://bugs.python.org/setuptools/file89/patch_ssl_support.diff
_______________________________________________
Setuptools tracker <setuptools at bugs.python.org>
<http://bugs.python.org/setuptools/issue149>
_______________________________________________
-------------- next part --------------
Index: setuptools/ssl_support.py
===================================================================
--- setuptools/ssl_support.py (revision 88997)
+++ setuptools/ssl_support.py (working copy)
@@ -236,7 +236,8 @@
if os.path.isfile(cert_path):
return cert_path
try:
- return pkg_resources.resource_filename('certifi', 'cacert.pem')
+ from pkg_resources import resource_filename
+ return resource_filename('certifi', 'cacert.pem')
except (ImportError, ResolutionError, ExtractionError):
return None
More information about the Distutils-SIG
mailing list