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

Fix broken path instructions in setting up a dev environment #4519

Merged
merged 4 commits into from Sep 29, 2021

Conversation

dabacon
Copy link
Collaborator

@dabacon dabacon commented Sep 23, 2021

For the add2virtualenv I could only figure out a way to do it in two steps (this was on mac running big sur). If anyone has some shell foo to make this one line, that would be great.

@dabacon dabacon requested review from cduck, vtomole and a team as code owners September 23, 2021 17:13
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Sep 23, 2021
@CirqBot CirqBot added the size: S 10< lines changed <50 label Sep 23, 2021
Comment on lines 132 to 138
python dev_tools/modules.py list --mode package-path >
```
and then adding these to the virtualenv:
```bash
add2virtualenv <paste modules from last command>
```
(Typically `add2virtualenv` is not executable using xargs, so this two step process is necessary.)
Copy link
Collaborator

Choose a reason for hiding this comment

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

So why exactly does something likeadd2virtualenv "$(python dev_tools/modules.py list --mode package-path | xargs)" not work ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because add2virtualenv is a shell function. Depending on how this shell function was installed, one can do xargs bash -c "add2virtualenv ..." But this doesn't always work depending on how virtualenvwrapper.sh is set up.

The alternative here is to add a command to dev_tools to change the path, which I think is doable. Want this @MichaelBroughton ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ahhhh in that case I'm not too bothered. I think adding an extra command is totally fine. I don't think this little sequence here warrants its own dev_tools command.

@MichaelBroughton MichaelBroughton self-assigned this Sep 27, 2021
@MichaelBroughton MichaelBroughton added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Sep 29, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Sep 29, 2021
@CirqBot CirqBot merged commit 88be1ef into quantumlib:master Sep 29, 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 Sep 29, 2021
@dabacon dabacon deleted the devfix branch April 16, 2022 15:42
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
…lib#4519)

For the add2virtualenv I could only figure out a way to do it in two steps (this was on mac running big sur).  If anyone has some shell foo to make this one line, that would be great.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining. size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants