Index: scalene-0.7.5/scalene/scalene_preload.py
===================================================================
--- scalene-0.7.5.orig/scalene/scalene_preload.py	2022-01-26 22:02:14.419778076 -0300
+++ scalene-0.7.5/scalene/scalene_preload.py	2022-01-26 22:05:44.089986198 -0300
@@ -11,6 +11,10 @@
 import scalene
 
 
+# To patch loader to use Python ABI renamed files
+from imp import get_suffixes, C_EXTENSION
+
+
 class ScalenePreload:
     @staticmethod
     def get_preload_environ(args: argparse.Namespace) -> Dict[str, str]:
@@ -26,9 +30,10 @@
         # which interposes on allocation and copying functions.
         if sys.platform == "linux":
             if not args.cpu_only:
-                env["LD_PRELOAD"] = os.path.join(
-                    scalene.__path__[0], "libscalene.so"  # type: ignore
-                )
+                # Debianize the path to so file which has been suffixed with arch and Python version
+                best_suffix = [ suffix for suffix in get_suffixes() if suffix[2] == C_EXTENSION ][0][0]
+                library_filename = "libscalene" + best_suffix
+                env["LD_PRELOAD"] = os.path.join(scalene.__path__[0], library_filename)
                 # Disable command-line specified PYTHONMALLOC.
                 if "PYTHONMALLOC" in env:
                     del env["PYTHONMALLOC"]
