Skip to content

Commit

Permalink
Manually specify default compat version 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tomyun committed Feb 19, 2021
1 parent 8083782 commit 27a0ed8
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions repo2docker/buildpacks/julia/julia_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ def julia_version(self):
else:
project_toml = toml.load(self.binder_path("Project.toml"))

if "compat" in project_toml:
if "julia" in project_toml["compat"]:
julia_version_str = project_toml["compat"]["julia"]

# For Project.toml files, install the latest julia version that
# satisfies the given semver.
_julia_version = find_semver_match(julia_version_str, self.all_julias)
if _julia_version is not None:
return _julia_version

default_julia_version = self.all_julias[-1]
return default_julia_version
try:
# For Project.toml files, install the latest julia version that
# satisfies the given semver.
compat = project_toml["compat"]["julia"]
except:
# Default version which needs to be manually updated with new major.minor releases
compat = "1.5"

match = find_semver_match(compat, self.all_julias)
if match is None:
raise RuntimeError("Failed to find a matching Julia version: {compat}")
return match

def get_build_env(self):
"""Get additional environment settings for Julia and Jupyter
Expand Down

0 comments on commit 27a0ed8

Please sign in to comment.