Daniel Larsson
Daniel Larsson

Reputation: 6394

Use wildcard in tox command

For different reasons I have to do pip install as a command in my tox.ini (I do skipsdist=True so tox will not install my dependencies for me, but I still need some of them installed into the virtual environment).

The problem is that I have a local dependency stored as a tarball, that has its version in its filename, such as my-module-1.0.tar.gz. I therefore need to use a wildcard in my command, such as

pip install my-module-*.tar.gz

but tox does not seem to support bash semantics in this sense, as I get the error

Requirement 'my-module-*.tar.gz' looks like a filename, but the file does not exist

I have tried putting quotes around the filename as well as escaping the asterisk, without success.

Any ideas?

Upvotes: 10

Views: 2017

Answers (1)

Michael Jaros
Michael Jaros

Reputation: 4681

I am not a tox user, but it looks like tox does not use a shell to execute commands. You could try calling a shell explicitly, e.g.:

/bin/bash -c 'pip install my-module-*.tar.gz'

Upvotes: 18

Related Questions