Skip to content

fix: Python Workflow with Incorrect Environ - #223

Merged
CoshUS merged 13 commits into
aws:developfrom
CoshUS:fix/lb-library-path
Feb 22, 2021
Merged

fix: Python Workflow with Incorrect Environ#223
CoshUS merged 13 commits into
aws:developfrom
CoshUS:fix/lb-library-path

Conversation

@CoshUS

@CoshUS CoshUS commented Feb 19, 2021

Copy link
Copy Markdown
Contributor

Issue #, if available:
#224

Description of changes:
Patches the LB_LIBRARY_PATH envar and passes the original one to all popens in Python workflow.
This is required as PyInstaller changes LB_LIBRARY_PATH and affects its subprocesses.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@CoshUS
CoshUS requested a review from sriram-mv February 19, 2021 06:17
Comment thread .appveyor.yml
# setup go
- rmdir c:\go /s /q
- "choco install golang"
- "choco install golang --version 1.15.7"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinning down golang version to 1.15 as 1.16 changes default Windows installation directory which breaks AppVeyor.

wchengru
wchengru previously approved these changes Feb 19, 2021
# https://pyinstaller.readthedocs.io/en/stable/runtime-information.html#ld-library-path-libpath-considerations
env = dict(os.environ)
lp_key = "LD_LIBRARY_PATH"
original_lp = env.get(lp_key + "_ORIG")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this just specific to some systems where LD_LIBRARY_PATH_ORIG is populated? is there any way we can make this very specific to pyinstaller? does pyinstaller re-introduce any other env vars?

@CoshUS CoshUS Feb 19, 2021

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LD_LIBRARY_PATH_ORIG is only populated if LD_LIBRARY_PATH is set. There are no other env vars that are generated by PyInstaller. I will add a check to run this only in PyInstaller.

sriram-mv
sriram-mv previously approved these changes Feb 22, 2021

@sriram-mv sriram-mv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, could you clean up the commit history?

@CoshUS

CoshUS commented Feb 22, 2021

Copy link
Copy Markdown
Contributor Author

Cleaned up merge commits.

@CoshUS
CoshUS merged commit 33179b7 into aws:develop Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants