Skip to content

Commit

Permalink
Make prev_prime documentation conditional only GMP >= 6.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sethtroisi committed Sep 10, 2023
1 parent b7b488c commit d020433
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,10 @@
('index', 'gmpy2', 'gmpy2 Documentation',
['Case Van Horsen'], 3)
]

try:
import gmpy2
if gmpy2.mp_version() >= "GMP 6.3.0":
tags.add('has_prev_prime')
except:
pass
4 changes: 3 additions & 1 deletion docs/mpz.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ mpz Functions
.. autofunction:: powmod_exp_list
.. autofunction:: powmod_base_list
.. autofunction:: powmod_sec
.. autofunction:: prev_prime
.. only:: has_prev_prime

.. autofunction:: prev_prime
.. autofunction:: primorial
.. autofunction:: remove
.. autofunction:: t_div
Expand Down

0 comments on commit d020433

Please sign in to comment.