1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

appveyor: ship cacert.pem when built with nuitka

This commit is contained in:
Johan Andersson 2018-06-17 15:53:59 +02:00
parent e3939a4bbe
commit 43b67dfa86
2 changed files with 7 additions and 0 deletions

View File

@ -18,7 +18,9 @@ test_script:
after_test:
- "mkdir svtplay-dl"
- "mkdir svtplay-dl\\certifi"
- "nuitka --recurse-all --output svtplay-dl bin/svtplay-dl"
- "copy %PYTHON%\\lib\\site-packages\\certifi\\cacert.pem svtplay-dl\\certifi"
- "dir svtplay-dl"
- "svtplay-dl\\svtplay-dl.exe --version"
- "rmdir /q /s svtplay-dl\\svtplay-dl.build"

View File

@ -3,6 +3,7 @@
from __future__ import absolute_import, unicode_literals
import sys
import os
import logging
import yaml
@ -14,6 +15,10 @@ from svtplay_dl.service.cmore import Cmore
log = logging.getLogger('svtplay_dl')
# hack to get around missing cacert.pem in nuitka
if sys.platform == "win32" and sys.argv[0].endswith('.exe'):
os.environ["REQUESTS_CA_BUNDLE"] = "./certifi/cacert.pem"
def setup_log(silent, verbose=False):
logging.addLevelName(25, "INFO")