Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
File renamed without changes.
5 changes: 3 additions & 2 deletions empack/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tempfile import TemporaryDirectory
from typing import Callable, Optional

from platformdirs import user_cache_dir, user_config_dir
from platformdirs import user_cache_dir

from .filter_env import filter_env, filter_pkg, iterate_env_pkg_meta
from .micromamba_wrapper import create_environment
Expand All @@ -16,7 +16,8 @@
EMPACK_CACHE_DIR = Path(user_cache_dir("empack"))
PACKED_PACKAGES_CACHE_DIR = EMPACK_CACHE_DIR / "packed_packages_cache"
PACKED_PACKAGES_CACHE_DIR.mkdir(parents=True, exist_ok=True)
DEFAULT_CONFIG_PATH = Path(user_config_dir("empack")) / "empack_config.yaml"
# Ensure that the config is tied to a particular installation of empack
DEFAULT_CONFIG_PATH = Path(__file__).parent / "empack_config.yaml"


def filename_base_from_meta(pkg_meta):
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ empack = "empack.cli.main:app"
[project.urls]
Homepage = "https://github.com/emscripten-forge/empack"

[tool.hatch.build.targets.wheel.shared-data]
config = "share/empack"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope I won't be too annoying to you on this. I have a preference for this to stay 🫤

I believe we should make sure we can find this path when using pyenv.

It seems jupyter has something like that https://github.com/jupyter/jupyter_core/blob/main/jupyter_core/paths.py#L102 for finding whether or not it should use user-level paths or conda environment paths.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope I won't be too annoying to you on this.

Absolutely not! :D I'd also love to ensure pyenv works and not move anything else. Let me port Jupyter's thing here, then.


[tool.hatch.build.targets.sdist]
exclude = [
".github",
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import pytest

from empack.file_patterns import pkg_file_filter_from_yaml
from empack.pack import DEFAULT_CONFIG_PATH

THIS_DIR = os.path.dirname(os.path.realpath(__file__))
CONFIG_PATH = os.path.join(THIS_DIR, "..", "config", "empack_config.yaml")
CONFIG_PATH = DEFAULT_CONFIG_PATH
FILE_FILTERS = pkg_file_filter_from_yaml(CONFIG_PATH)
CHANNELS = ["conda-forge", "https://repo.mamba.pm/emscripten-forge"]

Expand Down