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

add resources symlink #416

Merged
merged 1 commit into from
Jan 29, 2024
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
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Exclude the symlink included to allow
# importlib.resources to work for editable installs
exclude src/*/resources
9 changes: 1 addition & 8 deletions src/asdf_standard/integration.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import sys
from pathlib import Path

if sys.version_info < (3, 9):
import importlib_resources
Expand All @@ -10,13 +9,7 @@


def get_resource_mappings():
resources_root = importlib_resources.files(asdf_standard) / "resources"
if not resources_root.is_dir():
# In an editable install, the resources directory will exist off the
# repository root:
resources_root = Path(__file__).absolute().parent.parent.parent / "resources"
if not resources_root.is_dir():
raise RuntimeError("Missing resources directory")
resources_root = importlib_resources.files("asdf_standard") / "resources"

return [
asdf_standard.DirectoryResourceMapping(
Expand Down
1 change: 1 addition & 0 deletions src/asdf_standard/resources
Loading