diff --git a/pyart/__init__.py b/pyart/__init__.py index a9a8df424a..8b107b0711 100644 --- a/pyart/__init__.py +++ b/pyart/__init__.py @@ -22,7 +22,7 @@ if "PYART_QUIET" not in _environ: print(_citation_text) -from pkg_resources import DistributionNotFound, get_distribution +import importlib.metadata as _importlib_metadata # import subpackages # print out helpful message if build fails or importing from source tree @@ -48,7 +48,7 @@ # Get the version try: - __version__ = get_distribution("arm_pyart").version -except DistributionNotFound: + __version__ = _importlib_metadata.version("arm_pyart") +except _importlib_metadata.PackageNotFoundError: # package is not installed __version__ = "0.0.0" diff --git a/pyart/testing/example_data.py b/pyart/testing/example_data.py index daeaf776e2..022a396182 100644 --- a/pyart/testing/example_data.py +++ b/pyart/testing/example_data.py @@ -1,4 +1,5 @@ -import pkg_resources +import importlib.resources + import pooch DATASETS = pooch.create( @@ -8,7 +9,7 @@ ) -with pkg_resources.resource_stream("pyart.testing", "registry.txt") as registry_file: +with open(importlib.resources.files("pyart.testing") / "registry.txt") as registry_file: DATASETS.load_registry(registry_file) diff --git a/setup.py b/setup.py index 62aae62b6a..39d7a9e5cc 100644 --- a/setup.py +++ b/setup.py @@ -29,11 +29,9 @@ License :: OSI Approved :: BSD License Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Programming Language :: C Programming Language :: Cython Topic :: Scientific/Engineering @@ -265,6 +263,7 @@ def check_rsl_path(rsl_lib_path, rsl_include_path): packages=find_packages(exclude=["docs"]), include_package_data=True, scripts=SCRIPTS, + python_requires=">=3.9", install_requires=requirements, setup_requires="setuptools_scm", license=LICENSE,