Hello,

tox is a cross-platform tool aimed to work on all platforms the same. By default, virtualenv is able to handle Python dependencies via pip and virtualenv. The dependencies you've enumerated there live outside of the Python world. They are binary dependencies. The install commands you've enlisted there hint to me that you're using some Debian derivative. Note those will not work on some other distribution such as Fedora, macOS, or Windows. Furthermore, executing those commands might need a system administrator account/password and as such in general cannot be automated. Dependencies that are not install-able from the Python world into virtual environments are generally out of scope for tox to handle. Your project might still use them if you enlist them under whitelist_external_commands. You should otherwise encourage the user to install those dependencies though the best they can on their platform, with their own tool and authentication.

Thanks.

On Fri, Feb 19, 2021 at 4:59 AM Meike Moeckel <meike.moeckel@anu.edu.au> wrote:

Hello,

I recently discovered tox, due to a testing issue that i had. It is working great locally on my machine. I am using it to set up different environment that contain different solvers for my optimization code. However the solvers are not part of the requirements for this project as the user might want to choose the solver for a specific purpose. The main solvers used are cbc, gplk, and cplex. At the moment I have set up the solvers on my system and invoke them using environment variables. However, this approach causes Tox to look for the solver outside of the created environment, which is not the behavior i intended or expected. I would like to be able to install the solver inside the environment as a system dependency, so that i can move my test setup to a github action or really any computer i like, without having to install a solver there.

The solvers are installed on my system with the following commands, and that is basically what i would like to move to the virtual environment..

apt-get install coinor-cbc
apt-get install glpk-utils libglpk-dev glpk-doc 

and whatever 300 hoops you have to jump to install cplex.

Please find also attached my tox.ini file.


Could you advice what the best approach would be to achieve the installation with virtenv?

Thank you for your help

Meike Moeckel

_______________________________________________
tox-dev mailing list -- tox-dev@python.org
To unsubscribe send an email to tox-dev-leave@python.org
https://mail.python.org/mailman3/lists/tox-dev.python.org/
Member address: jokerjokerer@gmail.com