[TIP] Issue with larger project with subprojects; how to deal with dependencies?

holger krekel holger at merlinux.eu
Fri Oct 24 11:12:18 PDT 2014


On Fri, Oct 24, 2014 at 18:52 +0300, Marius Gedminas wrote:
> On Fri, Oct 24, 2014 at 11:28:21AM +0000, holger krekel wrote:
> > If i am not mistaken there is indeed no easy solution for your problem
> > with current tox.  The use case certainly makes sense to me and i am
> > in fact using devpi indexes to solve it for myself.
> > 
> > To make things work locally with tox i think we would need a new option.
> > I see two possibilities:
> > 
> > - "pre_install_commands": tox would call it ahead of
> >   installing the package or the tox.ini-specified dependencies.
> >   You could call a script that (re)creates the subdirectory dependencies
> >   and installs them.
> > 
> > - extend "deps" such that when you specify a relative path to a
> >   "setup.py" it would package and install those.
> > 
> > The first solution is more general but i kind of prefer the second one
> > because it directly solves your problem.  However, i am not going to program
> > this any time soon myself unless paid (which is quite possible, i've done
> > paid feature additions in the past, contact me privately if interested).
> 
> But wouldn't it be sufficient to tell pip where to find the other
> subprojects?  I don't see a `find-links` option in
> http://tox.readthedocs.org/en/latest/config.html, but you could do
> 
>   [tox]
>   install_command = pip install -f ../library1 -f ../library2 {opts} {packages}

IIUC the subdir contains just another project with "setup.py" etc.
For findlinks to work it would need to contain archive files.  But i agree
you could possibly write your own "install_command" command and could
make things work so it's an interesting idea.

best,
holger

> or maybe
> 
>   [tox]
>   env =
>     PIP_FIND_LINKS=../library1 ../library2
> 
> (Untested.)
> 
> I hope I'm not misunderstanding the problem.
> 
> Marius Gedminas
> -- 
> Remember the... the... uhh.....



> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python




More information about the testing-in-python mailing list