Skip to content

Commit

Permalink
Package the Python module and library
Browse files Browse the repository at this point in the history
Contributes to CURA-10561
  • Loading branch information
jellespijker committed Oct 26, 2023
1 parent 590d833 commit 758571c
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,16 @@ def build(self):

def package(self):
copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
packager = AutoPackager(self)
packager.run()
for ext in ("*.pyi", "*.so", "*.lib", "*.a", "*.pyd"):
copy(self, ext, src = self.build_folder, dst = os.path.join(self.package_folder, "lib"), keep_path = False)

for ext in ("*.dll", "*.so", "*.dylib"):
copy(self, ext, src = self.build_folder, dst = os.path.join(self.package_folder, "bin"), keep_path = False)
copy(self, "*.h", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include"))

def package_info(self):
self.cpp_info.libdirs = [ os.path.join(self.package_folder, "lib") ]
if self.in_local_cache:
self.runenv_info.append_path("PYTHONPATH", os.path.join(self.package_folder, "lib"))
else:
self.runenv_info.append_path("PYTHONPATH", self.build_folder)

0 comments on commit 758571c

Please sign in to comment.