File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 6565 uses : astral-sh/setup-uv@v6
6666
6767 - name : Install project
68- run : uv sync --dev
68+ run : |
69+ uv sync --dev
70+ uv run python -c "from importlib.metadata import version; print(version('cbor2'))" > .cbor2_version
71+ CBOR2_VERSION=$(cat .cbor2_version)
72+ CBOR2_BUILD_C_EXTENSION=0 uv pip install --no-binary cbor2 "cbor2==$CBOR2_VERSION" --force-reinstall
6973
7074 - name : Install secp256k1-py
7175 run : uv pip install python-secp256k1-cardano
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ test.uplc
33venv
44.vscode
55.DS_Store
6+ .cbor2_version
67# Created by https://www.toptal.com/developers/gitignore/api/python,pycharm+all
78# Edit at https://www.toptal.com/developers/gitignore?templates=python,pycharm+all
89
Original file line number Diff line number Diff line change 33import functools
44import json
55import logging
6- import math
76import sys
87import typing
98from collections import defaultdict
1918from bitstring import BitArray
2019from frozenlist2 import frozenlist
2120import nacl .exceptions
22- from _cbor2 import CBOREncoder
2321from pycardano .crypto .bip32 import BIP32ED25519PublicKey
2422from pycardano .serialization import IndefiniteFrozenList , IndefiniteList
2523from Crypto .Hash import keccak
@@ -629,7 +627,9 @@ def _int_to_bytes(x: int):
629627 return x .to_bytes ((x .bit_length () + 7 ) // 8 , byteorder = "big" )
630628
631629
632- def default_encoder (encoder : CBOREncoder , value : Union [PlutusData , IndefiniteList ]):
630+ def default_encoder (
631+ encoder : cbor2 .CBOREncoder , value : Union [PlutusData , IndefiniteList ]
632+ ):
633633 """A fallback function that encodes PlutusData objects"""
634634 if isinstance (value , IndefiniteList ):
635635 # Currently, cbor2 doesn't support indefinite list, therefore we need special
You can’t perform that action at this time.
0 commit comments