Skip to content

Commit

Permalink
WIP modify sys.path
Browse files Browse the repository at this point in the history
  • Loading branch information
real-or-random committed Feb 6, 2025
1 parent e1c60d4 commit 74e3abe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions python/chilldkg_ref/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
import sys


__all__ = ["chilldkg"]

# Prefer the vendored copy of secp256k1proto.
sys.path.append("secp256k1proto/src")
8 changes: 5 additions & 3 deletions python/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
from typing import Tuple, List, Optional
from secrets import token_bytes as random_bytes

from secp256k1proto.secp256k1 import GE, G, Scalar
from secp256k1proto.keys import pubkey_gen_plain

from chilldkg_ref.util import (
FaultyParticipantOrCoordinatorError,
FaultyCoordinatorError,
Expand All @@ -21,6 +18,11 @@
import chilldkg_ref.encpedpop as encpedpop
import chilldkg_ref.chilldkg as chilldkg

# Import from secp256k1proto after the chilldkg_ref imports because the latter
# modifies sys.path to make sure the vendored copy of secp256k1proto is found.
from secp256k1proto.secp256k1 import GE, G, Scalar
from secp256k1proto.keys import pubkey_gen_plain

from example import simulate_chilldkg_full as simulate_chilldkg_full_example


Expand Down

0 comments on commit 74e3abe

Please sign in to comment.