-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
533f6e7
commit e6847f5
Showing
88 changed files
with
2,444 additions
and
1,538 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
|
||
jobs: | ||
build-macos: | ||
runs-on: macos-12 | ||
runs-on: macos-13 | ||
steps: | ||
- | ||
name: Checkout | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import os | ||
|
||
from hydrus.core import HydrusData | ||
|
||
def SetRequestsCABundleEnv( pem_path = None ): | ||
|
||
# TODO: we could initialise this with a custom pem in launch args pretty easy if we wanted to! | ||
# but tbh the user can already set it in the launch env anyway so maybe whatever | ||
|
||
env_var_name = 'REQUESTS_CA_BUNDLE' | ||
|
||
if env_var_name in os.environ: | ||
|
||
HydrusData.Print( f'Custom REQUESTS_CA_BUNDLE: {os.environ[env_var_name]}') | ||
|
||
return | ||
|
||
|
||
# could say "If CURL_CA_BUNDLE exists, use that instead of certifi" | ||
|
||
if pem_path is None: | ||
|
||
try: | ||
|
||
import certifi | ||
|
||
pem_path = certifi.where() | ||
|
||
except: | ||
|
||
HydrusData.Print( 'No certifi, so cannot set REQUESTS_CA_BUNDLE.' ) | ||
|
||
return | ||
|
||
|
||
|
||
if os.path.exists( pem_path ): | ||
|
||
os.environ[ env_var_name ] = pem_path | ||
|
||
else: | ||
|
||
HydrusData.Print( f'The given CA Bundle at "{pem_path}" does not exist, so cannot set REQUESTS_CA_BUNDLE!' ) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.