Skip to content

Commit

Permalink
Remove distutils
Browse files Browse the repository at this point in the history
  • Loading branch information
holgern committed Mar 11, 2024
1 parent be3dfae commit 2b91910
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

import platform
import sys
from distutils.version import LooseVersion
from packaging.version import Version, parse

import pytest
from _pytest.doctest import DoctestItem

from skopt import _IS_32BIT

PYTEST_MIN_VERSION = '3.3.0'
PYTEST_MIN_VERSION = '3.6.0'

if LooseVersion(pytest.__version__) < PYTEST_MIN_VERSION:
if parse(pytest.__version__) < Version(PYTEST_MIN_VERSION):
raise ImportError(
'Your version of pytest is too old, you should have '
'at least pytest >= {} installed.'.format(PYTEST_MIN_VERSION)
Expand Down Expand Up @@ -52,7 +52,7 @@ def pytest_collection_modifyitems(config, items):
try:
import numpy as np

if LooseVersion(np.__version__) < LooseVersion('1.14'):
if parse(np.__version__) < Version('1.14'):
reason = 'doctests are only run for numpy >= 1.14'
skip_doctests = True
elif _IS_32BIT:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies = [
"numpy>=1.20.3",
"scipy>=1.1.0",
"scikit-learn>=1.0.0",
"packaging>=21.3",
]
version = "0.10.0rc1"

Expand Down

0 comments on commit 2b91910

Please sign in to comment.