-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
PROPOSAL: add preload and library type #151
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #151 +/- ##
=======================================
Coverage 85.68% 85.68%
=======================================
Files 11 11
Lines 566 566
Branches 67 67
=======================================
Hits 485 485
Misses 45 45
Partials 36 36 |
@ofek Do you accept this proposal, or should I try to find another way. This is what I need to force the loading of
I think it is valuable to have it in coincurve. The type of build and the libname (-1, -2, ..) is saved in this file and packaged with the library. When a user initialize the package, it does this simple check as to how the _libsecp256k1 was built and requires the dynamic lib if needed |
Can you show me another example of an extension module that has runtime logic specifically for Conda? |
No, I don't think I can. This is not specific to conda though, I just know that I will need it for conda, which is the only known case for using libsecp256k1 shared library so far I kind of feel that you're not ok with this at all, so the key reason for this is that I needed to verify the wheel built with a shared libsecp256k1 ... and it works ... so what I mean is maybe I should step back:We won't actually release these builds |
I'm not inherently against it, just trying to understand because I have limited time to review |
I thought about it over lunch and it seems that it is only needed in a niche case where (as far as I understand it) an installed library on windows is "lost". This seems to happen only in the additional condition that several unix-like environments are stacked So, although I am pretty happy with having found and resolved this flaw, it may just seeds an unforeseen issue later that may reduce the popularity of For more context, this is the workflow where this occurs:
The failure that this solves occurs in the CIBW_TEST_COMMAND. When I did try to set the %PATH% but it did not seem to work |
So do you mean that we should close this for now since it's mostly for debugging an edge case that you have fixed? |
Well, if you feel that it is risky, or even feel uneasy about it. I'd rather go back to the drawing board and find another solution or simply test in my fork then PR a clean code without this test I also don't mean to use too much of your time, but I also need to know what is a good idea to pursuit and what is not Next, I'll focus on just replacing the |
Sorry I was just a bit confused: is this necessary to get something working or is it more for debugging? If the former then I will merge. |
It is necessary to make the That need "could" occur IF a user happens to install Also, understand that it is not easy for me to simply say no to something that looks cool and that I found Your repo only releases |
@ofek Are you open to reorganizing ... and separating setup.py into a subpackage like All these PR's are actually kinda ready, btw |
Well, of course - I am switching to dbg mode on my fork - back when it passes |
# Conflicts: # setup.py # setup_tools/support.py
Let me know when to review what |
Sure, I still need to work on rebasing this one. Note that I changed the logic, now I only add the extra file to the wheel if it is an EXTERNAL libsecp256k1, then I try/except on its existence to quick-turn if there's no file |
@ofek Do you understand the codecov error? I added a new test for the init.py logic - Ok, I think I understand, the test cannot excercies all its lines because of the |
…library-info # Conflicts: # setup.py
…nto feat/add-preload-library-info
Ok, so I gave some thoughts to this PR. It is solving a niche case and working around the shortcomings of cibuildwheel. In the meantime, when working on testing the coicurve conda environment, I think that I solved the problem in a different way. So the only benefit of this PR is for the case where coincurve is built to use a system/conda library, but when it is used that library cannot be found - This is a case that is hard to imagine ever happening in the field, and even so, it would only change one error message for another In brief, I now think it is at best useless. |
Can we add recording of the version and the type of library coincurve was built upon (external or internal)? In the case of external, this information is needed to try to pre-load the DLL on windows. This is thw main reason why the tests are not working in the othe PR