I'm trying to build an RPM of Google's protobuf, including the protobuf-python subpackage. Now, this is no problem until i want to build the python subpackage with PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp python setup.py build
. This requires the protobuf header files and lib provided by the protobuf-devel package, which is built from the same .spec and source tarball.
The question is, is it somehow possible to build the (-python) subpackge in such scenario using a single .spec & tarball, or must i create a separate spec?
Here's the .src.rpm if anyone is curious. All i did was to prepend the PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
to python setup.py build
command.
If the sub-package you are building depends on other header file/etc. data from the sources used for other parts of that specfile then I don't think you want (or need) a BuildRequires
on that -devel
package and including it would be wrong.
You already have (and are guaranteed to have) the header files somewhere locally (possibly in your current directory already) when your sub-package is going to be built (which is all a BuildRequires
is supposed to guarantee for you).