Skip to content

Commit

Permalink
Merge pull request #84 from braingram/bug/entry_points_version_conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson authored Mar 6, 2023
2 parents 656bbfa + 801e55b commit 67e8071
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
0.4.6 (unreleased)
==================

-
- add ``importlib.metadata`` as a dependency and update loading of entry_points to drop
usage of pkg_resources [#84]

0.4.5 (2022-12-23)
==================
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dependencies = [
'crds>=7.4.1.3',
'astropy>=5.0.4',
'stdatamodels>=0.2.4',
'importlib_metadata>=4.11.4',
]
dynamic = ['version']

Expand Down
7 changes: 4 additions & 3 deletions src/stpipe/entry_points.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from pkg_resources import iter_entry_points
from collections import namedtuple
import warnings

from importlib_metadata import entry_points


STEPS_GROUP = "stpipe.steps"

Expand All @@ -23,8 +24,8 @@ class alias, and the third is a bool indicating whether the class is to be
"""
steps = []

for entry_point in iter_entry_points(group=STEPS_GROUP):
package_name = entry_point.dist.project_name
for entry_point in entry_points(group=STEPS_GROUP):
package_name = entry_point.dist.name
package_version = entry_point.dist.version
package_steps = []

Expand Down

0 comments on commit 67e8071

Please sign in to comment.