userver icon indicating copy to clipboard operation
userver copied to clipboard

Requiring Jinja2 for building

Open undisputed-seraphim opened this issue 3 years ago • 2 comments
trafficstars

Does it really require jinja2 at the CMake configuration step? I'd like to try building this without having to install any Python dependencies if possible.

undisputed-seraphim avatar Jul 31 '22 03:07 undisputed-seraphim

You may try disable testsuite using cmake flag -DUSERVER_FEATURE_TESTSUITE=0

szvyagin-gj avatar Jul 31 '22 20:07 szvyagin-gj

Ok so here's what I noticed. I can see that the option USERVER_FEATURE_TESTSUITE is in cmake/UserverTestsuite.cmake:5. I ran the command cmake -DUSERVER_FEATURE_TESTSUITE=OFF ...

On CMake 3.23, the flag is successfully passed to UserverTestsuite.cmake and CMake does not try to find jinja2. However, on CMake 3.18, the flag is not passed into that file and CMake still tries to find jinja2.

Furthermore, cmake -LA .. does not find the USERVER_FEATURE_TESTSUITE option in both versions.

(actually, my real intention was to see if it's possible to build without python dependencies but it seems that there are many more python dependencies beyond jinja2)

undisputed-seraphim avatar Aug 02 '22 05:08 undisputed-seraphim

We use Jinja2 to generate Find* cmake helpers. It's a required python dependency, as long as there's no conan or some other package manager support.

apolukhin avatar Aug 30 '22 11:08 apolukhin