From afc1d148da0e5333dda48b69956b270210c7d1ae Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Wed, 1 Nov 2023 02:51:45 -0400 Subject: [PATCH] Updates for 2024 --- .github/workflows/dist.yml | 2 +- pyfrc/mains/cli_sim.py | 12 ++++-------- setup.cfg | 16 +++------------- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 152e360..8e1f6d5 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -11,7 +11,7 @@ on: jobs: ci: - uses: robotpy/build-actions/.github/workflows/package-pure.yml@v2023 + uses: robotpy/build-actions/.github/workflows/package-pure.yml@v2024 with: enable_sphinx_check: false secrets: diff --git a/pyfrc/mains/cli_sim.py b/pyfrc/mains/cli_sim.py index 7784311..d5200d9 100644 --- a/pyfrc/mains/cli_sim.py +++ b/pyfrc/mains/cli_sim.py @@ -4,12 +4,8 @@ import inspect import logging import pathlib -from pkg_resources import iter_entry_points -try: - from importlib.metadata import metadata -except ImportError: - from importlib_metadata import metadata +from importlib.metadata import metadata, entry_points logger = logging.getLogger("pyfrc.sim") @@ -29,8 +25,8 @@ def __init__(self, parser: argparse.ArgumentParser): self.simexts = {} - for entry_point in iter_entry_points(group="robotpysimext", name=None): - if entry_point.module_name == "halsim_gui": + for entry_point in entry_points(group="robotpysimext"): + if entry_point.module == "halsim_gui": continue try: sim_ext_module = entry_point.load() @@ -44,7 +40,7 @@ def __init__(self, parser: argparse.ArgumentParser): f"--{entry_point.name}", default=False, action="store_true", - help=metadata(entry_point.dist.project_name)["summary"], + help=metadata(entry_point.dist.name)["summary"], ) def run(self, options, robot_class, **static_options): diff --git a/setup.cfg b/setup.cfg index e5c3509..a70d6d9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,11 +15,6 @@ classifiers = Intended Audience :: Developers License :: OSI Approved :: BSD License Programming Language :: Python :: 3 :: Only - 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 Topic :: Software Development Topic :: Software Development :: Testing @@ -32,17 +27,12 @@ install_requires = pytest-reraise pynetconsole~=2.0.2 pint>=0.11.0 - importlib-metadata; python_version < '3.8' - robotpy-wpiutil>=2023.1.1.0,<2024 - pyntcore>=2023.1.1.0,<2024 - robotpy-hal>=2023.1.1.0,<2024 - wpilib>=2023.1.1.0,<2024 - - robotpy-installer>=2023.0.0,<2024 + wpilib>=2024.0.0b2.post1,<2025 + robotpy-installer>=2024.0.0b1,<2025 setup_requires = setuptools_scm > 6 -python_requires = >=3.7 +python_requires = >=3.8 [options.entry_points] robotpy =