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
python3Packages.fastecdsa: init at 2.1.5 #99194
Conversation
buildInputs = [ gmp ]; | ||
|
||
# skip tests, most of them require being online to download test vectors | ||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two test files specifically that require downloading third-party files: https://github.com/AntonKueltz/fastecdsa/search?q=urlopen.
I believe it should be feasible to get the tests up and running using pytestCheckHook
and
pytestFlags = [
"--ignore=fastecdsa/tests/test_wycheproof_vectors.py"
"--ignore=fastecdsa/tests/test_rfc6979_ecdsa.py"
];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this, but now other tests fail with:
ImportError while importing test module '/build/fastecdsa-2.1.5/fastecdsa/tests/encoding/test_asn1.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fastecdsa/tests/encoding/test_asn1.py:5: in <module>
from fastecdsa.keys import export_key, import_key, gen_keypair
fastecdsa/keys.py:7: in <module>
from .ecdsa import verify
fastecdsa/ecdsa.py:5: in <module>
from fastecdsa import _ecdsa
E ImportError: cannot import name '_ecdsa' from 'fastecdsa' (/build/fastecdsa-2.1.5/fastecdsa/__init__.py)
Any ideas why? /build/fastecdsa-2.1.5
looks spurious, but not sure where this is from ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's because you are not building this: https://github.com/AntonKueltz/fastecdsa/tree/master/src
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is mentioned in the setup.py and the following works if I skip the tests: from fastecdsa import _ecdsa
, so I assume that is being built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I'm not sure then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rebased this on top of the current master and now it works - included in c28e12b6b552b2b3fe48f2970eb03c3d2a277828
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is included? If the tests still don't work but the resulting package works, add a comment why you disabled them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry. Brainfart - tests disabled and comment added in f70ecb6
Result of 3 packages built:
|
Motivation for this change
new python module for fast ecdsa operations
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)