File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 4545 # The platform-specific filename suffix for library files.
4646 # Includes the dot, e.g. `.so`
4747 "SHLIB_SUFFIX" ,
48+ # Debian has a "multiarch" layout that has libs for different archs
49+ # in slightly other locations. The MULTIARCH sysconfig varible tells
50+ # which directory under `LIBDIR` these exist in, if any.
51+ # See https://wiki.debian.org/Python/MultiArch
52+ "MULTIARCH" ,
4853]
4954data .update (zip (config_vars , sysconfig .get_config_vars (* config_vars )))
5055print (json .dumps (data ))
Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ def _local_runtime_repo_impl(rctx):
126126 # In some cases, the same value is returned for multiple keys. Not clear why.
127127 shared_lib_names = {v : None for v in shared_lib_names }.keys ()
128128 shared_lib_dir = info ["LIBDIR" ]
129+ multiarch = info ["MULTIARCH" ]
129130
130131 # The specific files are symlinked instead of the whole directory
131132 # because it can point to a directory that has more than just
@@ -141,6 +142,11 @@ def _local_runtime_repo_impl(rctx):
141142 repo_utils .watch (rctx , origin )
142143 rctx .symlink (origin , "lib/" + name )
143144
145+ origin_multiarch = rctx .path ("{}/{}/{}" .format (shared_lib_dir , multiarch , name ))
146+ if origin_multiarch .exists :
147+ repo_utils .watch (rctx , origin )
148+ rctx .symlink (origin , "lib/{}/{}" .format (multiarch , name ))
149+
144150 rctx .file ("WORKSPACE" , "" )
145151 rctx .file ("MODULE.bazel" , "" )
146152 rctx .file ("REPO.bazel" , "" )
You can’t perform that action at this time.
0 commit comments