Skip to content

Commit 5ad553b

Browse files
committed
Update env.py files to append to EXTRA_BUILD_PATH
All env.py files used to just overwrite EXTRA_BUILD_PATH, but this does not allow a user to specify EXTRA_BUILD_PATH from the commandline (or activate script) and then have it stick when those env.py files are run. This change adds a python module which makes setting these build path variables more straight forward, and converts all the env.py files to use it. Now EXTRA_BUILD_PATH is appended to instead of overwritten. The added python module is: redo/environments/modify_build_path.py
1 parent 9502634 commit 5ad553b

File tree

134 files changed

+476
-422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+476
-422
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + os.path.join(this_dir, ".." + os.sep + "example_architecture")
9+
modify_build_path.add_to_build_path([this_dir, os.path.join(this_dir, ".." + os.sep + "example_architecture")])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir + os.sep + ".."])
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])

doc/example_architecture/doc/env.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])

doc/example_architecture/env.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
from environments import modify_build_path
12
import os
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
# os.environ["BUILD_PATH"] = this_dir
9+
# modify_build_path.set_build_path(this_dir)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
# os.environ["BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path(this_dir + os.sep + "..")
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from environments import test # noqa: F401
1+
from environments import test, modify_build_path # noqa: F401
22
import os
33

44
this_dir = os.path.dirname(os.path.realpath(__file__))
55
# Overwrite the normal build path mechanism and just use
66
# this directory as the build path. This prevents any
77
# name conflicts we might get from using the regular
88
# ".all_path".
9-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path(this_dir + os.sep + "..")
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
2+
from environments import modify_build_path
23

34
this_dir = os.path.dirname(os.path.realpath(__file__))
45
# Overwrite the normal build path mechanism and just use
56
# this directory as the build path. This prevents any
67
# name conflicts we might get from using the regular
78
# ".all_path".
8-
os.environ["EXTRA_BUILD_PATH"] = this_dir + os.pathsep + this_dir + os.sep + ".."
9+
modify_build_path.add_to_build_path([this_dir, this_dir + os.sep + ".."])

0 commit comments

Comments
 (0)