proud-dentist-22844
05/11/2025, 5:49 AMpython-ldap.
The wheel ends up with the linux_x86_64 platform tag (not with manylinux* because it links against libldap which is not one of the allowed libs for manylinux*. For python-ldap that is problematic because every distro and distro version seems to have a different version of libldap, so I can't reuse the pex anywhere except on the distro version I used to build it.
So, it would be great if I could create a pex that includes an sdist instead of a wheel whenever the platform tag is too generic. That would require pex to build the wheel when the pex is first used instead of when building the pex. Is that possible?
More details in 🧵.proud-dentist-22844
05/11/2025, 5:55 AMpex python-ldap --interpreter-constraint 'CPython==3.7.*' -o ldap.pex on an ubuntu 20.04 host, and then ran ./ldap.pex -c 'import ldap' on that host and on an old CentOS 7 host. On the CentOS 7 host, it gives a big ImportError: libldap-2.5.so.0: cannot open shared object file: No such file or directory because the libldap versions are different making the pex very unportable.proud-dentist-22844
05/11/2025, 5:57 AMfast-nail-55400
05/11/2025, 2:06 PMfast-nail-55400
05/11/2025, 2:07 PMproud-dentist-22844
05/11/2025, 3:50 PMproud-dentist-22844
05/11/2025, 3:54 PMdocker_environment to build a smaller pex_binary that only has python-ldap in it so that I can have multiple distro-specific pexes alongside one general purpose PEX that excludes that dep (extra_build_args=["--exclude", "python-ldap"]).