Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileExistsError: File already exists: ./site-packages/cppyy_backend/lib/libcppyy_backend.so #266

Open
hofbi opened this issue Oct 3, 2024 · 4 comments

Comments

@hofbi
Copy link

hofbi commented Oct 3, 2024

I try to make cppyy working with bazel and run into an issue looking exactly as bazelbuild/rules_python#1659. In this comment they identified that this issue seems to be an issue of the upstream repo (cppyy or cppyy-backend in this case)

ipython-contrib/jupyter_contrib_nbextensions#1612 and aws/aws-elastic-beanstalk-cli#469 is how other projects fix this. However, I could not find this in your setup.py. Any help guiding me to the right place is appreciated.

@wlav
Copy link
Owner

wlav commented Oct 3, 2024

I understand neither the problem, nor the proposed solution, but at issue is likely that the backend is split into two PyPI packages, a large one containing Cling and a small one containing just the wrapper. The latter installs libcppyy_backend.so in a directory of the former, which probably violates a bunch of rules. The original idea/hope was that the large package would change infrequently, with most of the work happening in the wrapper, thus simplifying release turnaround.

Anyway, there are 2 setup.py files involved:
https://github.com/wlav/cppyy-backend/blob/master/cling/setup.py
https://github.com/wlav/cppyy-backend/blob/master/clingwrapper/setup.py
and neither has a scripts option.

Again, I have no idea how bazel works, what the error is precisely, or what the intend is here, but if this is a matter of repackaging, then the best thing to do is to combine these two PyPI packages into a single bazel package, thus side-stepping the problem.

@matthew-limbinar
Copy link

Assuming combining PyPI packages would fix the problems with Bazel builds, would you accept a PR in that direction? Do you foresee any problems taking that approach?

@wlav
Copy link
Owner

wlav commented Oct 3, 2024

Yes, upstream has also been asking for a cleanup. There could be a top-level setup.py to combine the two (both packages are sitting in the same repo already; upstream even wants to have a single repo for all packages involved, but there would still be a use for 3 PyPI packages b/c of PyPy, but also b/c the backend is conveniently Python-agnostic). With an extra toplevel setup.py, both choices could live side by side to understand the implications. I don't think there are individual users of cppyy-cling out there, but several exist for the cppyy-backend + cppyy-cling combo.

@Yilliee
Copy link

Yilliee commented Nov 8, 2024

@hofbi This might be unrelated but I ran into the same issue when trying to install cppyy-backend myself and the fix was to revert the changes on clingwrapper/steup.py that happened between v1.5.0 & v1.5.2.
More specifically, reverting these:
wlav/cppyy-backend@25caf98
wlav/cppyy-backend@6f074cf
wlav/cppyy-backend@17ec932

Essentially it's reverting the changes cause by the commit I mentioned last but mentioned others that are related that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants