<div dir="ltr"><div dir="ltr">On Wed, 4 Sep 2019 at 09:32, Quentin Schulz &lt;<a href="mailto:quentin.schulz@streamunlimited.com">quentin.schulz@streamunlimited.com</a>&gt; wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt;                      # if library is private (only used by package) then do not build shlib for it<br>
&gt; -                    if not private_libs or this_soname not in private_libs:<br>
&gt; +                    import fnmatch<br>
&gt; +                    if not private_libs or len([i for i in private_libs if fnmatch.fnmatch(this_soname, i)]) == 0:<br>
<br>
We only need to know if this_soname is matching one of the patterns, we<br>
don&#39;t need to check for each and every pattern.<br>
<br>
Something like:<br>
<br>
for pattern in private_libs:<br>
        if fnmatch.fnmatch(this_soname, pattern)]) == 0:<br>
                sonames.add(prov)<br>
                break<br>
<br>
would be possible?<br></blockquote><div><br></div>Yes, although there should only be very few patterns, and most of the time just one: *.so*. Not worth it I&#39;d say. There are other spots in do_package which truly slow down things and could use a bit of optimization.<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Alex<br></div></div>