diff options
author | Michael Schurter <schmichael@urbanairship.com> | 2012-06-04 13:19:10 -0700 |
---|---|---|
committer | Michael Schurter <schmichael@urbanairship.com> | 2012-06-04 13:19:10 -0700 |
commit | 62a23bfbdecf54e13e571237df5a175e53d539cb (patch) | |
tree | c3f2537c62881b4af9278332e4fd9d59db7ec209 /setup.py | |
parent | b026def9614e07ed4341ba29e33311065e072352 (diff) | |
download | python-requests-62a23bfbdecf54e13e571237df5a175e53d539cb.tar.gz |
Auto-detect CA Cert path instead of requiring users to hack setup.py
Also fixed nearby comments to wrap at 79 characters as per PEP8
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -30,11 +30,14 @@ packages = [ 'requests.packages.urllib3.packages.mimetools_choose_boundary', ] -# certifi is a Python package containing a CA certificate bundle for SSL verification. -# On certain supported platforms (e.g., Red Hat / Debian / FreeBSD), Requests can -# use the system CA bundle instead; see `requests.utils` for details. -# If your platform is supported, set `requires` to [] instead: -requires = ['certifi>=0.0.7'] +requires = [] + +# certifi is a Python package containing a CA certificate bundle for SSL +# verification. On certain supported platforms (e.g., Red Hat / Debian / +# FreeBSD), Requests can use the system CA bundle instead; see `requests.utils` +# for details. +if not requests.utils.get_os_ca_bundle_path(): + requires.append('certifi>=0.0.7') # chardet is used to optimally guess the encodings of pages that don't declare one. # At this time, chardet is not a required dependency. However, it's sufficiently |