Skip to content

Commit

Permalink
Merge pull request #193 from grondo/no-strictversion
Browse files Browse the repository at this point in the history
configure: do not use distutils StrictVersion
  • Loading branch information
mergify[bot] authored Nov 4, 2024
2 parents 2e70e2c + c64a86a commit 87068a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions config/am_check_pymod.m4
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ except:
sys.exit(0)
sys.exit(0)"], [prog="
import sys
try:
from distutils.version import StrictVersion as Version
except ModuleNotFoundError:
from packaging.version import Version
from packaging.version import Version
import $1
if not $2:
sys.exit(1)
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ AS_IF([test "x$enable_docs" != "xno"], [
PYTHON_VERSION=3
AM_PATH_PYTHON([3])
AM_CHECK_PYMOD(sphinx,
[StrictVersion(sphinx.__version__) >= StrictVersion ('1.6.7')],
[Version(sphinx.__version__) >= Version ('1.6.7')],
[sphinx=true],
[sphinx=false; AC_MSG_WARN([could not find sphinx to generate docs, version 1.6.7+ required])]
)
AM_CHECK_PYMOD(docutils,
[StrictVersion(docutils.__version__) >= StrictVersion ('0.11.0')],
[Version(docutils.__version__) >= Version ('0.11.0')],
[docutils=true],
[docutils=false; AC_MSG_WARN([could not find docutils to generate docs, version 0.11.0+ required])]
)
Expand Down

0 comments on commit 87068a1

Please sign in to comment.