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

Allow sourcing of dev_tools/pypath from any path #4739

Merged

Conversation

pavoljuhas
Copy link
Collaborator

Also fix its usage from zsh. Avoid changing shell variables m, PREFIX.
Use python3 instead of python in case the latter is not installed.

Enable usage from zsh.  Avoid changing shell variables `m`, `PREFIX`.
@pavoljuhas pavoljuhas requested review from cduck, vtomole and a team as code owners December 9, 2021 00:25
@pavoljuhas pavoljuhas requested a review from maffoo December 9, 2021 00:25
@CirqBot CirqBot added the size: S 10< lines changed <50 label Dec 9, 2021
Copy link
Collaborator

@MichaelBroughton MichaelBroughton left a comment

Choose a reason for hiding this comment

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

LGTM. Wasn't able to test with zsh, but still does fine for me on bash.

@MichaelBroughton MichaelBroughton self-assigned this Dec 14, 2021
@MichaelBroughton MichaelBroughton added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Dec 14, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Dec 14, 2021
@CirqBot CirqBot merged commit 876bad4 into quantumlib:master Dec 14, 2021
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Dec 14, 2021
@pavoljuhas
Copy link
Collaborator Author

Thank you for accepting the PR. For reference here is the broken behavior in zsh that got fixed here (happened because zsh does not split unquoted scalar variables) -

# OLD
$ git checkout 132005a29e
$ unset PYTHONPATH; source dev_tools/pypath
$ echo "'$PYTHONPATH'"
'/home/user/Cirq:/home/user/Cirq/cirq-aqt cirq-core cirq-google cirq-ionq cirq-pasqal cirq-rigetti cirq-web :'

# NEW
$ git checkout 876bad4f4f
$ unset PYTHONPATH; source dev_tools/pypath
$ echo "'$PYTHONPATH'"
'/home/user/Cirq:/home/user/Cirq/cirq-aqt:/home/user/Cirq/cirq-core:/home/user/Cirq/cirq-google:/home/user/Cirq/cirq-ionq:/home/user/Cirq/cirq-pasqal:/home/user/Cirq/cirq-rigetti:/home/user/Cirq/cirq-web'

@pavoljuhas pavoljuhas deleted the enable-dev_tools-pypath-anywhere branch December 14, 2021 01:20
MichaelBroughton pushed a commit to MichaelBroughton/Cirq that referenced this pull request Jan 22, 2022
Also fix its usage from zsh.  Avoid changing shell variables `m`, `PREFIX`.
Use `python3` instead of `python` in case the latter is not installed.
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
Also fix its usage from zsh.  Avoid changing shell variables `m`, `PREFIX`.
Use `python3` instead of `python` in case the latter is not installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants