Skip to content

Commit

Permalink
Hot fix: Pin Python version (jupyterlite#111)
Browse files Browse the repository at this point in the history
* Hot fix: Pin Python version

* Try fixing CI

* Hacky: Only force Python version if Python is spotted
  • Loading branch information
martinRenou committed Aug 23, 2024
1 parent 6504866 commit 0545060
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion environment-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
dependencies:
- black
- build
- python-build
- empack >=3.3
- hatch-jupyter-builder
- hatch-nodejs-version
Expand Down
5 changes: 4 additions & 1 deletion jupyterlite_xeus/create_conda_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def create_conda_env_from_env_file(root_prefix, env_file_content, env_file_locat

# get the specs
specs, pip_dependencies = _extract_specs(env_file_location, env_file_content)
# Force Python 3.11
if "python" in str(specs):
specs.append("python=3.11")

create_conda_env_from_specs(
env_name=env_name,
Expand Down Expand Up @@ -119,7 +122,7 @@ def _create_conda_env_from_specs_impl(env_name, root_prefix, specs, channels):
check=True,
)
return

if MAMBA_COMMAND:
# Mamba needs the directory to exist already
prefix_path.mkdir(parents=True, exist_ok=True)
Expand Down

0 comments on commit 0545060

Please sign in to comment.