Skip to content

build.py: don't nuke PYTHONPATH#1584

Closed
deliciouslytyped wants to merge 1 commit intowxWidgets:masterfrom
deliciouslytyped:patch-1
Closed

build.py: don't nuke PYTHONPATH#1584
deliciouslytyped wants to merge 1 commit intowxWidgets:masterfrom
deliciouslytyped:patch-1

Conversation

@deliciouslytyped
Copy link
Copy Markdown

Append phoenixDir to PYTHONPATH instead of overwriting it.

Partially Fixes #1314

Append phoenixDir to PYTHONPATH instead of overwriting it.
@deliciouslytyped
Copy link
Copy Markdown
Author

I think I also go it backwards because python seems to load from the first found result not the last one. I need to look into this more.

setDevModeOptions(args)

os.environ['PYTHONPATH'] = phoenixDir()
os.environ['PYTHONPATH'] = os.environ['PYTHONPATH'] + ':' + phoenixDir()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

os.pathsep should be used instead of ':'


sys.path.insert(0, phoenixDir())
os.environ['PYTHONPATH'] = phoenixDir()
os.environ['PYTHONPATH'] = os.environ['PYTHONPATH'] + ':' + phoenixDir()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here

@RobinD42
Copy link
Copy Markdown
Member

RobinD42 commented Apr 1, 2020

The KeyError in the CI builds are because PYTHONPATH is not already in os.environ, so you need to either check if it's there already before trying to get it, or use something like os.environ.get

@deliciouslytyped
Copy link
Copy Markdown
Author

deliciouslytyped commented Apr 1, 2020

Thanks! will add the changes later.

@evils
Copy link
Copy Markdown
Contributor

evils commented May 29, 2020

@deliciouslytyped could i get you to take a look at this again?

@deliciouslytyped
Copy link
Copy Markdown
Author

deliciouslytyped commented May 30, 2020

"Its not that big of a deal" - but if you want it, it'll probably be faster for you to give it a shot because I haven't touched my wxPython stuff in a bit and I'm distracted by exams. Thanks for the reminder though.

@evils
Copy link
Copy Markdown
Contributor

evils commented May 30, 2020

I'm distracted by exams.

i'll submit a PR that closes this one if i get things building with nix, good luck

@deliciouslytyped deliciouslytyped deleted the patch-1 branch July 3, 2020 08:33
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.

NixOS packaging misc.

3 participants