kopia lustrzana https://github.com/jupyterhub/repo2docker
Fix julia detection code
rodzic
bbf174e7e2
commit
97c66e90f3
|
@ -21,10 +21,12 @@ class JuliaProjectTomlBuildPack(PythonBuildPack):
|
||||||
@property
|
@property
|
||||||
def julia_version(self):
|
def julia_version(self):
|
||||||
default_julia_version = '1.1.0'
|
default_julia_version = '1.1.0'
|
||||||
|
|
||||||
if os.path.exists(self.binder_path('JuliaProject.toml')):
|
if os.path.exists(self.binder_path('JuliaProject.toml')):
|
||||||
project_toml = toml.load(self.binder_path('JuliaProject.toml'))
|
project_toml = toml.load(self.binder_path('JuliaProject.toml'))
|
||||||
else:
|
else:
|
||||||
project_toml = toml.load(self.binder_path('Project.toml'))
|
project_toml = toml.load(self.binder_path('Project.toml'))
|
||||||
|
|
||||||
if 'compat' in project_toml:
|
if 'compat' in project_toml:
|
||||||
if 'julia' in project_toml['compat']:
|
if 'julia' in project_toml['compat']:
|
||||||
julia_version_str = project_toml['compat']['julia']
|
julia_version_str = project_toml['compat']['julia']
|
||||||
|
@ -32,8 +34,9 @@ class JuliaProjectTomlBuildPack(PythonBuildPack):
|
||||||
# For Project.toml files, install the latest julia version that
|
# For Project.toml files, install the latest julia version that
|
||||||
# satisfies the given semver.
|
# satisfies the given semver.
|
||||||
julia_version = find_semver_match(julia_version_str, self.all_julias)
|
julia_version = find_semver_match(julia_version_str, self.all_julias)
|
||||||
if julia_version is None:
|
if julia_version is not None:
|
||||||
return _default_julia_version
|
return julia_version
|
||||||
|
|
||||||
return default_julia_version
|
return default_julia_version
|
||||||
|
|
||||||
def get_build_env(self):
|
def get_build_env(self):
|
||||||
|
|
Ładowanie…
Reference in New Issue