Commit 0a2519d7 authored by Ashwin V. Mohanan's avatar Ashwin V. Mohanan
Browse files

Replace entrypoints with a backports package

parent 5d186ea82a19
Pipeline #21060 passed with stage
in 15 minutes and 51 seconds
......@@ -5,8 +5,11 @@
.. autofunction:: import_cls_simul
"""
import entrypoints
import sys
if sys.version_info[:2] < (3, 10):
from importlib_metadata import entry_points
else:
from importlib.metadata import entry_points
def available_solvers(entrypoint_grp):
......@@ -22,7 +25,7 @@ def available_solvers(entrypoint_grp):
The name of the entrypoint group listing the solvers.
""" # noqa
return entrypoints.get_group_named(entrypoint_grp)
return entry_points(group=entrypoint_grp)
def import_module_solver(key, entrypoint_grp):
......
......@@ -27,4 +27,8 @@ python_requires = >= 3.6
packages = find:
install_requires =
fluiddyn >= 0.3.2
entrypoints
importlib_metadata >= 3.6.0 ; python_version < "3.10"
[options.entry_points]
fluidsim_core.tests =
test = fluidsim_core.tests.solver
Markdown is supported
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