Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using rez env interactively in windows #375

Closed
bpabel opened this issue Jan 12, 2017 · 7 comments
Closed

Using rez env interactively in windows #375

bpabel opened this issue Jan 12, 2017 · 7 comments

Comments

@bpabel
Copy link
Contributor

bpabel commented Jan 12, 2017

What is the preferred way of creating interactive rez environments?

I have several rez packages built and rez env is resolving them, but it doesn't seem to be applying them to the current shell (windows cmd).

For example, I'm using rez env to build a context with the requests python library

rez env requests

Rez appears to find and resolve the package, but it's not updating the PYTHONPATH in my shell.

If I run the following command, it will launch a child shell and the packages are correctly applied. Is this how it is supposed to work -- that you have to launch a child process to apply the package environment?

rez env requests -c CMD
@nerdvegas
Copy link
Contributor

nerdvegas commented Jan 12, 2017 via email

@instinct-vfx
Copy link
Contributor

Can you share some more information like the code of the package.py file to investigate?

Cheers,
Thorsten

@assumptionsoup
Copy link

assumptionsoup commented Feb 8, 2017

I took another stab at getting rez to work on windows today. I have this same issue with the hello_world example. In windows cmd.exe and in git-bash rez-env does not put the environment in a sub-shell, and therefore it does not affect $PATH.

UPDATE Just saw PR #377. I'll give that a go

@pmolodo
Copy link
Contributor

pmolodo commented Feb 9, 2017 via email

@bpabel
Copy link
Contributor Author

bpabel commented Feb 9, 2017

@elrond79 Yes, that will drop you into a shell, but that is different from the behavior in other shells. In other shells, not specifying a command will give you an interactive shell. The current behavior (without the PR I submitted) when using rez-env in a windows CMD shell is to spawn a shell with the correct rez enviroment, but then immediately exit.

@instinct-vfx
Copy link
Contributor

There are different PRs doing similar things or tackling it slightly different. We definitely need to clean up the windows side of rez and rework the cmd plugin a bit.

@bpabel
Copy link
Contributor Author

bpabel commented Nov 29, 2017

Fixed with #377

@bpabel bpabel closed this as completed Nov 29, 2017
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

No branches or pull requests

5 participants