On 2.9.2018 10:58, Dan Čermák wrote:
Igor Gnatenko <ignatenkobrain(a)fedoraproject.org> writes:
> On Sun, Sep 2, 2018 at 10:39 AM Dan Čermák <dan.cermak(a)cgc-instruments.com>
> wrote:
>
>> Hi list,
>>
>> I recently wanted to update the Fedora package of gcovr
>> (
https://github.com/gcovr/gcovr). However, I have hit the following
>> problem: the gcovr doc is build via sphinx, but it won't build unless
>> gcovr is installed, both the binary and the python package.
>>
>
> Can't you fake some paths to python lib and binary so that documentation is
> using those (built but not installed)?
I think I can fake PYTHONPATH (which would fix the import errors), but
the documentation tries to run the gcovr binary, which is created by
setup.py install and not by setup.py build.
As a workaround, I'd build the docs at the end of %install (with
PYTHONPATH set to buildroot/sitelib and PATH to buildroot/bindir:$PATH).
It's not perfect, but it should work. Certainly don't do it in %check.
Don't forget to add appropriate explanation in a comment.
# We can only build the docs after we've installed the gcovr binary
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok