mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-17 21:56:07 -04:00
setup.py: retrieve cacert.pem from requests package. Create application compressed archive. Added a fix for requests to support cacert.pem in different locations.
This commit is contained in:
@@ -4,9 +4,10 @@ import sys
|
||||
import fix_arrow # A few new locales for Three languages in arrow.
|
||||
import fix_urllib3_warnings # Avoiding some SSL warnings related to Twython.
|
||||
import fix_win32com
|
||||
|
||||
import fix_requests #fix cacert.pem location for TWBlue binary copies
|
||||
def setup():
|
||||
fix_arrow.fix()
|
||||
if hasattr(sys, "frozen"):
|
||||
fix_win32com.fix()
|
||||
fix_requests.fix()
|
||||
fix_urllib3_warnings.fix()
|
10
src/fixes/fix_requests.py
Normal file
10
src/fixes/fix_requests.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from requests import certs, utils, adapters
|
||||
import paths
|
||||
|
||||
def patched_where():
|
||||
return paths.app_path(u"cacert.pem")
|
||||
|
||||
def fix():
|
||||
certs.where=patched_where
|
||||
utils.DEFAULT_CA_BUNDLE_PATH=patched_where()
|
||||
adapters.DEFAULT_CA_BUNDLE_PATH=patched_where()
|
Reference in New Issue
Block a user