You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I appreciate your efforts in creating this tool. I'm trying to resolve a broken building system in one of the open-source libraries, and I found it quite challenging to discover the proper approach. After spending hours searching and consulting ChatGPT, I eventually found a solution that works, but I'm still uncertain if it's the right method. Given the limited information available on how to correctly build a wheel with shared libraries, could you consider adding a few paragraphs to your README file?
While it's relatively easy to locate your library, when searching for issues related to rpath, getting the information how to make pip install . to call your tool is quite difficult. My current approach is as follows.
frompathlibimportPathfromsetuptoolsimportsetup, Commandfromsetuptools.command.bdist_wheelimportbdist_wheelimportsubprocessclassRepairWheel(bdist_wheel):
defrun(self):
super().run()
wheel_path=next(Path(self.dist_dir).glob(f"{self.distribution.get_name()}*.whl"))
# Create a temporary directory for the repaired wheelimporttempfilewithtempfile.TemporaryDirectory(prefix='repaired_wheel_') astmp_dir:
tmp_dir=Path(tmp_dir)
subprocess.call(['repairwheel', wheel_path, '-o', tmp_dir])
# We need to glob as repairwheel may change the name of the wheel # on linux from pywhispercpp-1.2.0-cp312-cp312-linux_aarch64.whl # to pywhispercpp-1.2.0-cp312-cp312-manylinux_2_34_aarch64.whlrepaired_wheel=next(tmp_dir.glob("*.whl"))
self.copy_file(repaired_wheel, wheel_path)
print(f"Copied repaired wheel to: {wheel_path}")
setup(
# ...cmdclass={
'bdist_wheel': RepairWheel,
},
# ...
)
Actually afer some inspection I'm pretty sure that it isn't working well as I have copies of my .dylib in two places (in wheel/ and wheel/package/.dylibs/) but at least they reference each other.
If I find a way to fix this I will update the ticket.
The text was updated successfully, but these errors were encountered:
PiotrCzapla
changed the title
Add a bit docs how to use this tool with setuptools / pip install
Add documentation how to use repairwheel with 'pip install .'
Oct 17, 2024
Hello, I appreciate your efforts in creating this tool. I'm trying to resolve a broken building system in one of the open-source libraries, and I found it quite challenging to discover the proper approach. After spending hours searching and consulting ChatGPT, I eventually found a solution that works, but I'm still uncertain if it's the right method. Given the limited information available on how to correctly build a wheel with shared libraries, could you consider adding a few paragraphs to your README file?
While it's relatively easy to locate your library, when searching for issues related to rpath, getting the information how to make
pip install .
to call your tool is quite difficult. My current approach is as follows.Actually afer some inspection I'm pretty sure that it isn't working well as I have copies of my .dylib in two places (in wheel/ and wheel/package/.dylibs/) but at least they reference each other.
If I find a way to fix this I will update the ticket.
The text was updated successfully, but these errors were encountered: