Skip to content

Commit

Permalink
setup.py: work with mupdf master's versioned shared libraries on Linux.
Browse files Browse the repository at this point in the history
We use new pipcl.get_soname() to ensure that if MuPDF creates libmupdf.so ->
libmupdf.so.MAJOR.MINOR containing SONAME, we copy the versioned library into
wheel.
  • Loading branch information
julian-smith-artifex-com committed Jan 10, 2024
1 parent 2b73014 commit a23bf69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def add( ret, from_, to_):
elif pyodide:
add( ret_b, f'{mupdf_build_dir}/libmupdf.so', 'PyMuPDF.libs/')
else:
add( ret_b, f'{mupdf_build_dir}/libmupdf.so', to_dir)
add( ret_b, pipcl.get_soname(f'{mupdf_build_dir}/libmupdf.so'), to_dir)

if path_so_leaf_b:
# Add rebased implementation files.
Expand Down Expand Up @@ -622,8 +622,8 @@ def add( ret, from_, to_):
add( ret_b, f'{mupdf_build_dir}/libmupdf.so', 'PyMuPDF.libs/')
else:
add( ret_p, f'{mupdf_build_dir}/_mupdf.so', to_dir)
add( ret_b, f'{mupdf_build_dir}/libmupdfcpp.so', to_dir)
add( ret_b, f'{mupdf_build_dir}/libmupdf.so', to_dir)
add( ret_b, pipcl.get_soname(f'{mupdf_build_dir}/libmupdfcpp.so'), to_dir)
add( ret_b, pipcl.get_soname(f'{mupdf_build_dir}/libmupdf.so'), to_dir)

if g_flavour == 'pb':
ret = ret_p + ret_b
Expand Down

0 comments on commit a23bf69

Please sign in to comment.