Commit 7a8a7cf9 authored by omni's avatar omni
Browse files

testing/py3-sibc: patch out hard requirements

parent 65ea8880
......@@ -3,7 +3,7 @@
pkgname=py3-sibc
_pkgname=sibc
pkgver=1.0.4
pkgrel=0
pkgrel=1
pkgdesc="Supersingular Isogeny-Based Cryptography constructions (python-code library)"
url="https://github.com/JJChiDguez/sibc"
arch="all"
......@@ -11,7 +11,9 @@ license="GPL-3.0-or-later"
depends="python3 py3-click py3-progress py3-numpy"
makedepends="py3-setuptools py3-numpy-dev"
checkdepends="py3-pytest py3-pytest-runner"
source="$_pkgname-$pkgver.tar.gz::https://github.com/JJChiDguez/sibc/archive/refs/tags/v$pkgver.tar.gz"
source="$_pkgname-$pkgver.tar.gz::https://github.com/JJChiDguez/sibc/archive/refs/tags/v$pkgver.tar.gz
bench_soft_requirements.patch
"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
......@@ -28,4 +30,5 @@ package() {
sha512sums="
11fb75240b0ceedce208380aef9572ed29fad8b6ea73ef982d0051792a8316cfb95ae0c81f30186f53941d129d2095988bef0f9160b643a1936ccf1175107a19 sibc-1.0.4.tar.gz
85b5bd2de5b3ba2d2c9d20bbfec343e778e70452c8a89d4a3b81ad19224669bb76bf072d78b2d18b3fbf9000d69f1eca2cd50f458dd2efe1d8fb34410afa6f60 bench_soft_requirements.patch
"
# Allow running without requirements needed for plot-strategy command, because
# the required py3-networkx and py3-matplotlib have many dependencies and the
# rest of sibc is usable without them.
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,3 @@
click
-matplotlib
-networkx
numpy
progress
--- a/sibc/__main__.py
+++ b/sibc/__main__.py
@@ -20,7 +20,10 @@ from sibc.bsidh.main import bsidh_main
#sidh
from sibc.sidh.precompute_strategy import sidh_precompute_strategy
-from sibc.plot_strategy import plot_strategy
+try:
+ from sibc.plot_strategy import plot_strategy
+except:
+ plot_strategy = None
from sibc.timing import print_timing
from sibc.common import attrdict
from sibc.constants import parameters, sidh_primes, bsidh_primes, csidh_primes
@@ -214,7 +217,8 @@ def decaps(ctx, sk, c):
main.add_command(print_timing)
-main.add_command(plot_strategy)
+if plot_strategy is not None:
+ main.add_command(plot_strategy)
# csidh
main.add_command(csidh_bench)
main.add_command(csidh_bounds)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment