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 quoting in test setup command #279

Merged
merged 1 commit into from Oct 17, 2021
Merged

Conversation

dreness
Copy link
Contributor

@dreness dreness commented Oct 17, 2021

The value used with the -e option to pip install is .[test]. The [ character has special meaning in many popular unix shells, so must be quoted (or escaped) to get the literal character needed for pip install to interpret the value inside the square brackets as a local directory path.

A demonstration using zsh:

% pip install -e .[test]
zsh: no matches found: .[test]

Quoting .[test] yields the expected result:

% pip install -e ".[test]"
Looking in indexes: ...

It seems the pypa documentation has the same problem - see pip install example #7 . Those examples are all prefixed with python -m pip, however the same shell quoting rules still apply. I'll file a similar PR over there.

The value used with the `-e` option to `pip install` is `.[test]`. The `[` character has [special meaning](https://tldp.org/LDP/abs/html/special-chars.html#LEFTBRACKET) in many popular unix shells, so must be quoted (or escaped) to get the literal character needed for `pip install` to interpret the value inside the square brackets as a local directory path.

A demonstration using `zsh`:

```
% pip install -e .[test]
zsh: no matches found: .[test]
```

Quoting `.[test]` yields the expected result:

```
% pip install -e ".[test]"
Looking in indexes: ...
```

It seems the pypa documentation has the same problem - see [`pip install` example cytoscape#7](https://pip.pypa.io/en/stable/cli/pip_install/#example) . Those examples are all prefixed with `python -m pip`, however the same shell quoting rules still apply. I'll file a similar PR over there.
@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch dreness/ipycytoscape/patch-1

Copy link
Collaborator

@ianhi ianhi left a comment

Choose a reason for hiding this comment

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

Thanks!

@ianhi ianhi merged commit 205f3ce into cytoscape:master Oct 17, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants