Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

* Changed `compas._os.prepare_environment` to prepend environment paths (fixes problem with RPC on windows).

### Removed


Expand Down
10 changes: 5 additions & 5 deletions src/compas/_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,13 @@ def prepare_environment(env=None):
env = os.environ.copy()

if PYTHON_DIRECTORY:
lib_bin = os.path.join(PYTHON_DIRECTORY, 'Library', 'bin')
if os.path.exists(lib_bin) and lib_bin not in env['PATH']:
env['PATH'] += os.pathsep + lib_bin
if is_windows():
lib_bin = os.path.join(PYTHON_DIRECTORY, 'Library', 'bin')
else:
lib_bin = os.path.join(PYTHON_DIRECTORY, 'bin')

lib_bin = os.path.join(PYTHON_DIRECTORY, 'lib')
if os.path.exists(lib_bin) and lib_bin not in env['PATH']:
env['PATH'] += os.pathsep + lib_bin
env['PATH'] = lib_bin + os.pathsep + env['PATH']

if CONDA_EXE:
env['CONDA_EXE'] = CONDA_EXE
Expand Down