specfile dependecy to pip package

I'm maintainer of libcbor package and in fedora 30 has been removed
python3-sphinx package which is required to build documentation for
libcbor. I can changa the dependency to python2-sphinx but thats not what I
really want to do. Another option is to install sphinx via pip3. However in
build phase it will show an error which says:

sphinx-build -b man -d build/doctrees source build/man
Traceback (most recent call last):
File "/usr/local/bin/sphinx-build", line 6, in <module>
from import main
ModuleNotFoundError: No module named 'sphinx'
make: *** [Makefile:131: man] Error 1

(it needs breathe package and that is installed as well using pip3)

Now I have two questions:

1. How can I write to specfile that I need a pip package?
I tried:

BuildRequires: %{py3_dist Sphinx} >= 2.2.0

And as well:

BuildRequires: %{py3_dist sphinx} >= 2.2.0

Both of those will show an dependency error even when I install sphinx
and breathe using pip3:

python3dist(sphinx) >= 2.2.0 is needed by libcbor-0.5.0-5.fc30.x86_64

2. How to fix that error from sphinx-build?
I tried to install even sphinx-multibuild (using pip) but did not succeed.
It is suspicious that sphinx package need sphinx and it can not find it.

Marek Tamaskovic


Re: specfile dependecy to pip package

By Dan =?utf-8?B?x... at 09/19/2019 - 09:12

Hi Marek,

Marek Tamaskovic < ... at redhat dot com> writes:

You cannot/should not install packages via pip during rpmbuild as mock &
koji don't allow network connections (at least by default).

In Fedora 30 there is only Sphinx 1.8.4, so you'll have to patch your
package to work with an older version of sphinx.

Re: specfile dependecy to pip package

By =?UTF-8?B?TWlyb... at 09/19/2019 - 09:35

On 19. 09. 19 15:12, Dan Čermák wrote:
Or stop building the docs on Fedora 30 and only build it on Fedora 31+.

Re: specfile dependecy to pip package

By Vascom at 09/19/2019 - 09:06

python3-sphinx not removed.
Look at
<a href="" title=""></a>

чт, 19 сент. 2019 г. в 16:03, Marek Tamaskovic < ... at redhat dot com>: