Skip to content

Commit

Permalink
Switch pkg_resources to importlib (#122)
Browse files Browse the repository at this point in the history
* switch pkg_resources to importlib

* fix path

* update changelog
  • Loading branch information
lilyminium authored Jun 21, 2024
1 parent 63b7a56 commit 187c12c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ The rules for this file:

### Fixed
<!-- Bug fixes -->
- Switched deprecated pkg_resources to use importlib (PR #122, Issue #121)
- Fixed pypi_check with lowercase (PR #118, Issue #112)
- Fixed ModuleNotFound after installation (Issue #113, PR #115)
- Fix cookie pypi_check test (PR #45)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"MDANALYSIS_LOGO", # example file of MDAnalysis logo
]

from pkg_resources import resource_filename
import importlib.resources

MDANALYSIS_LOGO = resource_filename(__name__, "mda.txt")
data_directory = importlib.resources.files("{{ cookiecutter.package_name }}") / "data"

MDANALYSIS_LOGO = data_directory / "mda.txt"

0 comments on commit 187c12c

Please sign in to comment.