Skip to content
Snippets Groups Projects
Commit ade8f560 authored by Celeste's avatar Celeste
Browse files

testing/py3-duniterpy: fix build

- Add py3-jsonschema and py3-attrs to depends
  (py3-jsonschema is no longer a dependency of poetry since 1.7.0,
   and in that case is wrongly a part of makedepends anyway;
   py3-attrs is listed under "Requirements" in README.md)

- Apply https://git.duniter.org/clients/python/duniterpy/-/commit/5dbf13c6
  to fix compatibility with new poetry

- Apply relevant parts of
  https://git.duniter.org/clients/python/duniterpy/-/commit/ad8f6a26
  to fix compatibility with new py3-libnacl
parent 00a093d5
No related branches found
No related tags found
1 merge request!57287testing/py3-duniterpy: fix build
......@@ -3,15 +3,30 @@
pkgname=py3-duniterpy
_pkgname=duniterpy
pkgver=1.1.1
pkgrel=1
pkgrel=2
pkgdesc="Python APIs library to implement Duniter clients software"
url="https://git.duniter.org/clients/python/duniterpy"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3 py3-aiohttp py3-scrypt py3-libnacl py3-base58 py3-pyaes py3-pypeg2 py3-websocket-client attr"
depends="
attr
python3
py3-aiohttp
py3-attrs
py3-base58
py3-jsonschema
py3-libnacl
py3-pyaes
py3-pypeg2
py3-scrypt
py3-websocket-client
"
makedepends="py3-build py3-wheel py3-installer poetry libsodium-dev"
checkdepends="py3-pytest"
source="https://git.duniter.org/clients/python/$_pkgname/-/archive/$pkgver/$_pkgname-$pkgver.tar.gz"
source="https://git.duniter.org/clients/python/$_pkgname/-/archive/$pkgver/$_pkgname-$pkgver.tar.gz
Remove_empty_homepage_field_from_pyproject.patch
Support_py3-libnacl_1.9.0.patch
"
builddir="$srcdir/"$_pkgname-$pkgver
build() {
......@@ -28,4 +43,6 @@ package() {
sha512sums="
4fd702f37d65c83ce907c90dde8fe2d55a47c9b19624f9f48a5bb988bf11c62cf56092a0fd61cae91225b42afb7784739ab2a9c14577e0fa275b97c21f312608 duniterpy-1.1.1.tar.gz
b85743c269fff452d71016059c287a4b12f6442d29c06481ac5c9604b20a88887d5d7806058fc99c6471bc57dc866102ee8d5319e7aa89bd24fe2ada873cc0f2 Remove_empty_homepage_field_from_pyproject.patch
b0b71d291898be989e6a74ea0ec75942fdea5e089c022b42f7a6751de2911699998cc84fc48bca80ce5829caae9dc137266e43f19be573e239fa3ce7d7dc8066 Support_py3-libnacl_1.9.0.patch
"
diff --git a/pyproject.toml b/pyproject.toml
index c2a9b4d190c7c92caba8784d3fa5975646e7260e..5b2d3789f76e857846455cdcf64518d067d913a0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -7,7 +7,6 @@ authors = ["inso <insomniak.fr@gmail.com>", "canercandan", "s_b"]
maintainers = ["vit <vit@free.fr>", "Moul <moul@moul.re>"]
readme = "README.md"
license = "GPL-3.0-or-later"
-homepage = ""
repository = "https://git.duniter.org/clients/python/duniterpy"
documentation = "https://clients.pages.duniter.org/python/duniterpy/index.html"
urls = { Changelog = "https://git.duniter.org/clients/python/duniterpy/-/blob/main/CHANGELOG.md" }
diff --git a/duniterpy/key/ascii_armor.py b/duniterpy/key/ascii_armor.py
index 9ab3efe47b0224179926f04bc3c2be03674fbccd..84b8c68335d83dad70d8e61a7b013d6a830c6047 100644
--- a/duniterpy/key/ascii_armor.py
+++ b/duniterpy/key/ascii_armor.py
@@ -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
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