New issue 167: Add an option to run commands after virtualenv creation but 
before other steps
https://bitbucket.org/hpk42/tox/issue/167/add-an-option-to-run-commands-after

Mikhail Korobov:

Hi, 

I first mentioned this idea at 
https://bitbucket.org/hpk42/tox/issue/42/dependencies-should-be-installed-one-at-a
 (it was shut down then). I think it deserves its own ticket :)

The problem is the following: 

1. Some packages require certain software to build. Most common case - a 
C/Cython extension that uses numpy or scipy C-API.
2. One solution is to put this software to `deps` section. The issue is that it 
can be hard/slow to install numpy and scipy to virtualenv using pip. System 
packages is not a solution either because you may need different versions. 
Also, there could be chains like "my package needs A to build, and A needs B to 
build", so you can't put both A and B into deps.

As an alternative, I can use Anaconda to get numpy, scipy and similar packages 
to virtualenv. It is fast and works quite well. But you need to 

1. run 'pip install conda' and 'conda init' after virtualenv creation;
2. then run 'conda install numpy scipy --yes';
3. and only then install other packages and the package being tested.

Both these steps should happen *before* installation of the package being 
tested. 
I can't set `install_commans` to `conda install {packages}` because conda can't 
install local zip packages. 

There are other possible uses of this: for example, packages may need C/C++ 
libraries to build, and one may fetch them and install to virtualenv.

So, I'd like to be able to run some commands after virtualenv creation but 
before installation of my package (and better before installation of the 
dependencies).


_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to