Skip to content
Snippets Groups Projects
Commit ad8f6a26 authored by Moul's avatar Moul
Browse files

Support libnacl v1.9.0 onward

libnacl.version file removed:
https://github.com/saltstack/libnacl/commit/85e7b61b2c2dca957d5701c4cfc2b75fcdb46894

Get version with importlib.metadata.version("libnacl")
https://github.com/python-poetry/poetry/issues/273#issuecomment-570999678

Could have use pkg_resources.get_distribution("libnacl").version
https://github.com/python-poetry/poetry/issues/273#issuecomment-401983643
parent 3c846b10
No related branches found
No related tags found
1 merge request!190Support libnacl v1.9.0 onward
Pipeline #32969 waiting for manual action
......@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import base64
import importlib.metadata
import re
from typing import Any, Dict, List, Optional
import libnacl
from libnacl.version import version as libnacl_version
from .encryption_key import PublicKey
from .signing_key import SigningKey
......@@ -33,6 +33,7 @@ HEADER_PREFIX = "-----"
DASH_ESCAPE_PREFIX = "\x2D\x20"
# Version field value
libnacl_version = importlib.metadata.version("libnacl")
VERSION_FIELD_VALUE = f"Python Libnacl {libnacl_version}"
# Parser cursor status
......
......@@ -32,7 +32,7 @@ websocket-client = "^1.5.2"
jsonschema = "^4.17.3"
pypeg2 = "^2.15.2"
base58 = "^2.1.1"
libnacl = "^1.8.0"
libnacl = "^2.1.0"
pyaes = "^1.6.1"
mnemonic = "^0.20"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment