diff pipcl.py @ 14:59f1bd90b2a0

Use "soname" on FreeBSD also. FreeBSD and Linux are now handled identical with regard to soname and library naming and packaging.
author Franz Glasner <fzglas.hg@dom66.de>
date Wed, 17 Sep 2025 20:35:45 +0200
parents 1d09e1dec1d9
children dd663470c57c
line wrap: on
line diff
--- a/pipcl.py	Wed Sep 17 20:31:46 2025 +0200
+++ b/pipcl.py	Wed Sep 17 20:35:45 2025 +0200
@@ -2317,6 +2317,9 @@
 def openbsd():
     return platform.system() == 'OpenBSD'
 
+def freebsd():
+    return platform.system() == 'FreeBSD'
+
 
 def show_system():
     '''
@@ -2863,7 +2866,7 @@
     return `path`. Useful if Linux shared libraries have been created with
     `-Wl,-soname,...`, where we need to embed the versioned library.
     '''
-    if linux() and os.path.islink(path):
+    if (linux() or freebsd()) and os.path.islink(path):
         path2 = os.path.realpath(path)
         if subprocess.run(f'objdump -p {path2}|grep SONAME', shell=1, check=0).returncode == 0:
             return path2