getavalon / docker

Avalon in a Dockerfile
MIT License
5 stars 2 forks source link

Fix terminal environment #45

Closed tokejepsen closed 6 years ago

tokejepsen commented 6 years ago

Problem

You cant override the PYTHONPATH for development because AVALON_CORE and AVALON_LAUNCHER gets first priority.

Solution

Use AVALON_CORE and AVALON_LAUNCHER to setup the terminal environment.

tokejepsen commented 6 years ago

Just realized that this makes so you can't actually import avalon in the terminal.

Would the best way for people to override with other repositories, to encourage prefix PYTHONPATH with the overrides and try to remove AVALON_CORE and AVALON_LAUNCHER? What was the reason for these environment variables to begin with when they also need to be on PYTHONPATH?

tokejepsen commented 6 years ago

Just realized that this makes so you can't actually import avalon in the terminal.

I have fixed this in the PR now.

mottosso commented 6 years ago

There's an (admittedly undocumented) reason for not wanting to set AVALON_CORE and friends in the .bat file, which is that if you wanted to use a local copy of avalon-core, you could set it via this variable. To override the one shipping with the Docker (or Setup) distributions.

The use for that is to develop for core, and leverage all dependencies from docker/setup.

In my case, I've got my own .bats that call this bat, but set AVALON_CORE to my local copy first.

What problem is this PR solving exactly?

tokejepsen commented 6 years ago

What problem is this PR solving exactly?

I had mistakenly thought that prefixing PYTHONPATH with a development version of avalon-core would be enough. Using AVALON_CORE as override works for me. Will send a PR for documentation about this.