diff --git a/build-linux.sh b/build-linux.sh new file mode 100644 index 0000000..06abf2b --- /dev/null +++ b/build-linux.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +pyinstaller scrapist.py --clean -F --add-data "$(python -c 'import certifi; print(certifi.where())'):certifi" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index b35fa77..8b4eec7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ discord.py-self==2.1.0 -pyinstaller==6.19.0 \ No newline at end of file +pyinstaller==6.19.0 +certifi==2026.1.4 diff --git a/scrapist.py b/scrapist.py index ecccb08..4294900 100644 --- a/scrapist.py +++ b/scrapist.py @@ -2,6 +2,11 @@ import discord import os import argparse from pathlib import Path +import certifi + +# When running as PyInstaller bundle, point SSL to bundled certs +if getattr(sys, 'frozen', False): + os.environ['SSL_CERT_FILE'] = certifi.where() parser = argparse.ArgumentParser( prog="Scrapist",