Skip to content

Commit

Permalink
Pack dependent libraries in wheel
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
  • Loading branch information
mballance committed Sep 13, 2023
1 parent 47aec28 commit 297115d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ def _get_lib_ext_name():
""" Get name of default library file extension on given OS. """

if os.name == "nt":
ext_name = "dll"
ext_name = ".dll"
else:
ext_name = "so"
ext_name = ".so"

return ext_name

Expand All @@ -167,6 +167,12 @@ def copy_tree(self, infile, outfile, preserve_mode=1, preserve_times=1, preserve
shutil.copytree(
os.path.join(vsc_solvers_dir, "src/include"),
os.path.join(outfile, "vsc_solvers/include"))
for f in os.listdir(os.path.join(vsc_solvers_dir, "build/lib")):
ext = os.path.splitext(f)[1]
if ext == _get_lib_ext_name():
shutil.copy(
os.path.join(vsc_solvers_dir, "build", "lib", f),
os.path.join(outfile, "vsc_solvers", f))

class build_ext(_build_ext):
def run(self):
Expand Down

0 comments on commit 297115d

Please sign in to comment.