On Thursday 2014-09-25 00:33, Greg Freemyer wrote:
If the just-built python interface requires a just-built libyara, then, both ought to be produced in one go, from one specfile (and thus, one build invocation).
Like... sssd.spec. This also produces a bunch of shared libs and some python interfaces.
That makes sense conceptually, but what;s the best way to fix it.
How's this prep section? It allows the python setup.py to find the library after "make" creates it, but before it is installed:
============ %prep %setup -q cd yara-python sed -i "/libraries=\['yara'\],/a library_dirs=['%_builddir/%name-%version/libyara/.libs']," setup.py ============
An idealized software package which builds both .so and python interfaces normally seems to build the python parts on its own, during `make` and `make install`, such that you need not run `python setup.py` and `python setup.py install` yourself, respectively. If that is not the case, then yes, you will need to hack something up involving a hardcoded location like .libs. Do put all that in %build though, quilt is sensitive to running molasses of commands in %prep. %prep %setup -q %build perl -i -pe "s{(\s+)(libraries=\['yara'\])} {${1}library_dirs=['$PWD/libyara/.libs']\n$1$2}g" setup.py make python setup.py build -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org