Re: pip and missing shared system system library

Wes Turner <[email protected]> Mon, 10 Aug 2020 10:08:43 -0400
Newsgroups gmane.comp.python.distutils.devel
Message-ID <CACfEFw8E-ConzGW4WuBHt_X24d4h7r6oKy1mTU9kGm95iVbVaQ@mail.gmail.com>
--===============5478505354345898714==
Content-Type: multipart/alternative; boundary="000000000000b28c7b05ac867e4f"

--000000000000b28c7b05ac867e4f
Content-Type: text/plain; charset="UTF-8"

On Sun, Aug 9, 2020, 3:28 PM Wes Turner <[email protected]> wrote:

> Are you requesting an implementation of autotools / autoconf / pkg-config
> / libtool in Python, in setuptools?
>
> Existing workarounds for building and distributing portable binaries:
>
> W/ shared library dependencies:
> - auditwheel & manylinux
>

"""
`auditwheel show`: shows external shared libraries that the wheel depends
on (beyond the libraries included in the manylinux policies), and checks
the extension modules for the use of versioned symbols that exceed the
manylinux ABI.

`auditwheel repair`: copies these external shared libraries into the wheel
itself, and automatically modifies the appropriate RPATH entries such that
these libraries will be picked up at runtime. This accomplishes a similar
result as if the libraries had been statically linked without requiring
changes to the build system. Packagers are advised that bundling, like
static linking, may implicate copyright concerns.
"""

https://github.com/pypa/auditwheel#overview

- package managers which support arbitrary binary packages in languages
> other than python:
>   - conda
>   - RPM / DEB / ...
>     - bdist_rpm
>     - bdist_deb
>     - FPM
>
> W/ static dependencies:
> - zipapp
> - bazel / buck build / pants build (BUILD files)
> - py2app, py2exe, pyinstaller,
>   https://github.com/vinta/awesome-python#distribution
>
> On Sun, Aug 9, 2020, 3:05 PM David Mathog <[email protected]> wrote:
>
>> On Sun, Aug 9, 2020 at 10:21 AM Ned Deily <[email protected]> wrote:
>> > Just to be clear, pkg-config is not part of any Posix standard, AFAIK,
>> so you cannot depend on it being available.
>>
>> Understood.  However, if that is not employed what reasonable method
>> remains for implementing "Requires-External"?  The only thing I can
>> think of is to specify exact library or program names, like
>>
>> Requires-External gcc
>> Requires-External libpng.so
>>
>> and those could be found by searching the whole directory tree.  That
>> might even be efficient if updatedb/locate are available.  However
>> going that way, how would one determine version compatibility on a
>> library?  Doing it through the package manager may be possible, but it
>> is a multistep process:
>>
>> 1.  lookup libpng.so -> PATHPNG
>> 2.  rpm -q --whatprovides $PATHPNG -> name of package
>> 3.  analyze "name of package" for version information
>>
>> Much easier one suspects to install pkg-config on systems which do not
>> yet have it than to completely reimplement it.
>>
>> Does OS X have something which is equivalent to pkg-config, or is
>> there just no way to look up this sort of information on that OS?
>>
>> Regards,
>>
>> David Mathog
>> --
>> Distutils-SIG mailing list -- [email protected]
>> To unsubscribe send an email to [email protected]
>> https://mail.python.org/mailman3/lists/distutils-sig.python.org/
>> Message archived at
>> https://mail.python.org/archives/list/[email protected]/message/BCYVPMEGXLU7YQJUCCQDV5BT7E22EH7M/
>>
>

--000000000000b28c7b05ac867e4f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Sun, Aug 9, 2020, 3:28 PM Wes Turner &lt;<a href=3D=
"mailto:[email protected]">[email protected]</a>&gt; wrote:<br></div>=
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"auto">Are you requesting an impl=
ementation of autotools / autoconf / pkg-config / libtool in Python, in set=
uptools?<div dir=3D"auto"><br></div><div dir=3D"auto">Existing workarounds =
for building and distributing portable binaries:</div><div dir=3D"auto"><br=
></div><div dir=3D"auto">W/ shared library dependencies:</div><div dir=3D"a=
uto">- auditwheel &amp; manylinux</div></div></blockquote></div></div><div =
dir=3D"auto"><br></div><div dir=3D"auto">&quot;&quot;&quot;</div><div dir=
=3D"auto"><div dir=3D"auto">`auditwheel show`: shows external shared librar=
ies that the wheel depends on (beyond the libraries included in the manylin=
ux policies), and checks the extension modules for the use of versioned sym=
bols that exceed the manylinux ABI.</div><div dir=3D"auto"><br></div><div d=
ir=3D"auto">`auditwheel repair`: copies these external shared libraries int=
o the wheel itself, and automatically modifies the appropriate RPATH entrie=
s such that these libraries will be picked up at runtime. This accomplishes=
 a similar result as if the libraries had been statically linked without re=
quiring changes to the build system. Packagers are advised that bundling, l=
ike static linking, may implicate copyright concerns.</div><div dir=3D"auto=
">&quot;&quot;&quot;</div><div dir=3D"auto"><br></div><div dir=3D"auto"><a =
href=3D"https://github.com/pypa/auditwheel#overview">https://github.com/pyp=
a/auditwheel#overview</a><br></div></div><div dir=3D"auto"><br></div><div d=
ir=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div =
dir=3D"auto"><div dir=3D"auto">- package managers which support arbitrary b=
inary packages in languages other than python:</div><div dir=3D"auto">=C2=
=A0 - conda</div><div dir=3D"auto">=C2=A0 - RPM / DEB / ...</div><div dir=
=3D"auto">=C2=A0 =C2=A0 - bdist_rpm</div><div dir=3D"auto">=C2=A0 =C2=A0 - =
bdist_deb</div><div dir=3D"auto">=C2=A0 =C2=A0 - FPM</div><div dir=3D"auto"=
><br></div><div dir=3D"auto">W/ static dependencies:</div><div dir=3D"auto"=
>- zipapp</div><div dir=3D"auto">- bazel / buck build / pants build (BUILD =
files)</div><div dir=3D"auto">- py2app, py2exe, pyinstaller,=C2=A0</div><di=
v dir=3D"auto">=C2=A0=C2=A0<a href=3D"https://github.com/vinta/awesome-pyth=
on#distribution" target=3D"_blank" rel=3D"noreferrer">https://github.com/vi=
nta/awesome-python#distribution</a></div></div><br><div class=3D"gmail_quot=
e"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Aug 9, 2020, 3:05 PM David=
 Mathog &lt;<a href=3D"mailto:[email protected]" target=3D"_blank" rel=3D"n=
oreferrer">[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex">On Sun, Aug 9, 2020 at 10:21 AM Ned Deily &lt;<a href=3D"mailto:na=
[email protected]" rel=3D"noreferrer noreferrer" target=3D"_blank">[email protected]=
g</a>&gt; wrote:<br>
&gt; Just to be clear, pkg-config is not part of any Posix standard, AFAIK,=
 so you cannot depend on it being available.<br>
<br>
Understood.=C2=A0 However, if that is not employed what reasonable method<b=
r>
remains for implementing &quot;Requires-External&quot;?=C2=A0 The only thin=
g I can<br>
think of is to specify exact library or program names, like<br>
<br>
Requires-External gcc<br>
Requires-External libpng.so<br>
<br>
and those could be found by searching the whole directory tree.=C2=A0 That<=
br>
might even be efficient if updatedb/locate are available.=C2=A0 However<br>
going that way, how would one determine version compatibility on a<br>
library?=C2=A0 Doing it through the package manager may be possible, but it=
<br>
is a multistep process:<br>
<br>
1.=C2=A0 lookup libpng.so -&gt; PATHPNG<br>
2.=C2=A0 rpm -q --whatprovides $PATHPNG -&gt; name of package<br>
3.=C2=A0 analyze &quot;name of package&quot; for version information<br>
<br>
Much easier one suspects to install pkg-config on systems which do not<br>
yet have it than to completely reimplement it.<br>
<br>
Does OS X have something which is equivalent to pkg-config, or is<br>
there just no way to look up this sort of information on that OS?<br>
<br>
Regards,<br>
<br>
David Mathog<br>
--<br>
Distutils-SIG mailing list -- <a href=3D"mailto:[email protected]" r=
el=3D"noreferrer noreferrer" target=3D"_blank">[email protected]</a>=
<br>
To unsubscribe send an email to <a href=3D"mailto:distutils-sig-leave@pytho=
n.org" rel=3D"noreferrer noreferrer" target=3D"_blank">distutils-sig-leave@=
python.org</a><br>
<a href=3D"https://mail.python.org/mailman3/lists/distutils-sig.python.org/=
" rel=3D"noreferrer noreferrer noreferrer" target=3D"_blank">https://mail.p=
ython.org/mailman3/lists/distutils-sig.python.org/</a><br>
Message archived at <a href=3D"https://mail.python.org/archives/list/distut=
[email protected]/message/BCYVPMEGXLU7YQJUCCQDV5BT7E22EH7M/" rel=3D"norefe=
rrer noreferrer noreferrer" target=3D"_blank">https://mail.python.org/archi=
ves/list/[email protected]/message/BCYVPMEGXLU7YQJUCCQDV5BT7E22EH7M/=
</a><br>
</blockquote></div>
</blockquote></div></div></div>

--000000000000b28c7b05ac867e4f--

--===============5478505354345898714==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
Distutils-SIG mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/distutils-sig.python.org/
Message archived at https://mail.python.org/archives/list/[email protected]/message/EBZ6LGL5ANUKH4MM6XQD5U5TFVRQBDGK/

--===============5478505354345898714==--