Skip to content

fix quoting in test setup command#279

Merged
ianhi merged 1 commit intocytoscape:masterfrom
dreness:patch-1
Oct 17, 2021
Merged

fix quoting in test setup command#279
ianhi merged 1 commit intocytoscape:masterfrom
dreness:patch-1

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.

2 participants