1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-06-06 10:23:06 +03:00

Handle hard dependency on certifi in requests>=2.16

This commit is contained in:
Jonathan Harris 2018-03-01 01:08:26 +00:00
parent d2122108c7
commit 9c8a3d628a
3 changed files with 8 additions and 8 deletions

View File

@ -54,8 +54,8 @@ try:
parser.add_argument('-j', help=argparse.SUPPRESS) # Import JSON dump parser.add_argument('-j', help=argparse.SUPPRESS) # Import JSON dump
args = parser.parse_args() args = parser.parse_args()
if sys.platform=='win32' and getattr(sys, 'frozen', False): if getattr(sys, 'frozen', False):
os.environ['REQUESTS_CA_BUNDLE'] = join(dirname(sys.executable), 'cacert.pem') os.environ['REQUESTS_CA_BUNDLE'] = join(config.respath, 'cacert.pem')
if args.version: if args.version:
latest = '' latest = ''

View File

@ -157,8 +157,8 @@ class Session:
from requests.packages import urllib3 from requests.packages import urllib3
urllib3.disable_warnings() urllib3.disable_warnings()
if platform=='win32' and getattr(sys, 'frozen', False): if getattr(sys, 'frozen', False):
os.environ['REQUESTS_CA_BUNDLE'] = join(dirname(sys.executable), 'cacert.pem') os.environ['REQUESTS_CA_BUNDLE'] = join(config.respath, 'cacert.pem')
def login(self, username=None, password=None, is_beta=False): def login(self, username=None, password=None, is_beta=False):
if (not username or not password): if (not username or not password):

View File

@ -16,6 +16,7 @@ import re
import shutil import shutil
import sys import sys
from tempfile import gettempdir from tempfile import gettempdir
import requests
from config import appname as APPNAME, applongname as APPLONGNAME, appcmdname as APPCMDNAME, appversion as VERSION from config import appname as APPNAME, applongname as APPLONGNAME, appcmdname as APPCMDNAME, appversion as VERSION
from config import update_feed, update_interval from config import update_feed, update_interval
@ -73,10 +74,10 @@ if sys.platform=='darwin':
'optimize': 2, 'optimize': 2,
'packages': [ 'requests', 'keyring.backends' ], 'packages': [ 'requests', 'keyring.backends' ],
'frameworks': [ 'Sparkle.framework' ], 'frameworks': [ 'Sparkle.framework' ],
'excludes': [ 'certifi', 'distutils', 'iniparse', '_markerlib', 'PIL', 'pkg_resources', 'simplejson', 'unittest' ], 'excludes': [ 'distutils', 'iniparse', '_markerlib', 'PIL', 'pkg_resources', 'simplejson', 'unittest' ],
'iconfile': '%s.icns' % APPNAME, 'iconfile': '%s.icns' % APPNAME,
'include_plugins': [('plugins', x) for x in PLUGINS], 'include_plugins': [('plugins', x) for x in PLUGINS],
'resources': ['commodity.csv', 'snd_good.wav', 'snd_bad.wav', 'modules.p', 'ships.p', 'stations.p', 'systems.p'], 'resources': [ requests.certs.where(), 'commodity.csv', 'snd_good.wav', 'snd_bad.wav', 'modules.p', 'ships.p', 'stations.p', 'systems.p'],
'semi_standalone': True, 'semi_standalone': True,
'site_packages': False, 'site_packages': False,
'plist': { 'plist': {
@ -106,11 +107,10 @@ elif sys.platform=='win32':
'requests', 'keyring.backends', 'requests', 'keyring.backends',
'shutil', 'sqlite3', 'zipfile', # Included for plugins 'shutil', 'sqlite3', 'zipfile', # Included for plugins
], ],
'excludes': [ 'certifi', 'distutils', 'iniparse', '_markerlib', 'optparse', 'PIL', 'pkg_resources', 'simplejson', 'unittest' ], 'excludes': [ 'distutils', 'iniparse', '_markerlib', 'optparse', 'PIL', 'pkg_resources', 'simplejson', 'unittest' ],
} }
} }
import requests
DATA_FILES = [ DATA_FILES = [
('', [ ('', [
requests.certs.where(), requests.certs.where(),