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

Latest release broke installation under Windows #133

Closed
darosior opened this issue Jan 23, 2024 · 7 comments
Closed

Latest release broke installation under Windows #133

darosior opened this issue Jan 23, 2024 · 7 comments

Comments

@darosior
Copy link
Contributor

I'm using Coincurve in my BIP32 package. Following a request from @MementoRC i was in the process of bumping the maximum supported Coincurve version to 0.19 (darosior/python-bip32#40) when my CI caught that installing Coincurve under Windows was broken (see here for the installation instructions).

First of all, cffi was missing. Adding a temporary commit to manually install cffi to make sure it was the only issue revealed at runtime that Coincurve wasn't correctly installed (see here for the CI job):

Traceback (most recent call last):
  File "D:\a\python-bip32\python-bip32\setup.py", line 2, in <module>
    import bip32
  File "D:\a\python-bip32\python-bip32\bip32\__init__.py", line 1, in <module>
    from .bip32 import BIP32, PrivateDerivationError, InvalidInputError
  File "D:\a\python-bip32\python-bip32\bip32\bip32.py", line 5, in <module>
    from .utils import (
  File "D:\a\python-bip32\python-bip32\bip32\utils.py", line 1, in <module>
    import coincurve
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\coincurve\__init__.py", line 1, in <module>
    from coincurve.context import GLOBAL_CONTEXT, Context
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\coincurve\context.py", line 5, in <module>
    from coincurve.flags import CONTEXT_ALL, CONTEXT_FLAGS
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\coincurve\flags.py", line 3, in <module>
    CONTEXT_SIGN = lib.SECP256K1_CONTEXT_SIGN
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\cffi\api.py", line 912, in __getattr__
    make_accessor(name)
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\cffi\api.py", line 907, in make_accessor
    raise AttributeError(name)
AttributeError: SECP256K1_CONTEXT_SIGN
@ofek
Copy link
Owner

ofek commented Jan 23, 2024

@MementoRC

@MementoRC
Copy link
Collaborator

@ofek @darosior Started to look at it

@ecy777
Copy link

ecy777 commented Jan 23, 2024

I'm having the same problem too

@ofek
Copy link
Owner

ofek commented Jan 23, 2024

Yanked:

image

@MementoRC
Copy link
Collaborator

@ofek The issue must be with the _windows_libsecp256k1.py. It is unclear how all the tests on windows for the conda feedstock did not highlight this issue if CFFI does not handle #define (formulae) correctly. I ran all the coincurve tests successfully for the feedstock
I proposed a PR: #135

It includes more than just the windows fix, please review and let me know if you prefer to separate it

@darosior
Copy link
Contributor Author

Hey there, any update on this issue?

@ofek
Copy link
Owner

ofek commented Mar 2, 2024

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