Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop pkg_resources as a runtime requirement #1394

Merged
merged 2 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyart/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
5 changes: 3 additions & 2 deletions pyart/testing/example_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pkg_resources
import importlib.resources

import pooch

DATASETS = pooch.create(
Expand All @@ -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)


Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down