1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-22 10:45:15 +03:00
aports/testing/py3-sibc/bench_soft_requirements.patch

35 lines
1 KiB
Diff

# 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)