-
Notifications
You must be signed in to change notification settings - Fork 21
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
Feature request: probing installed versions #99
Comments
I'm not sure how to do it correctly; should I just limited myself to jill-specific structure If it's the first case, then it might be as simple as checking import os
from jill.utils.defaults import default_install_dir as jill_install_dir
julias_root = jill_install_dir()
julias = [os.path.join(julias_root , x) for x in os.listdir(julias_root ) if x.startswith("julia")] This gives me the following results on my windows machine:
|
That's a good question. I had been thinking only of jill installations. But, perhaps covering juliaup would also be useful. Your example looks good. I was reluctant to roll my own using jill because I am unable to test on mac and windows (I have only linux), and because I am unsure of what might appear in |
Okay so we can get the installed dir from from jill.utils.version_utils import latest_version as jill_latest_version
from jill.utils.sys_utils import current_architecture, current_system
from jill.utils.defaults import default_install_dir as jill_install_dir
stable_version = jill_latest_version("", current_system(), current_architecture()) # '1.7.0'
stable_version = '.'.join(stable_version.split('.')[0:2]) # '1.7' I'm not sure how you would like it to be, maybe you can put up a PR for this? FYI, jill uses https://julialang-s3.julialang.org/bin/versions.json to find out the latest stable version. That file doesn't have LTS information so people still need to hardcode what the latest LTS is. |
This looks like it's on the right track. Yes, since I have an immediate use case, I'll try to find time soon to make a PR to jill.py that is generally useful. |
I'd like to be able to do something like query for the path to the installation of the most recent stable version. For example, under linux, this might return
I looked through the jill source and it seems the functions to do this are not immediately available. It may be out of scope for the jill project. But, I am thinking of using jill in conjunction with pyjulia and in particular this: julia_project. With a little more functionality in jill I could do this.
julia_project
(or a similar tool, I think there may be others) to manage the Julia dependency. The python package is, say,mypackage
.mypackage.install_julia()
(Perhaps make it automatic, but I don't favor that.) that usesjulia_project
andjill
to download and install julia. New feature --> Use jill to find the installation directory. Thenjulia_project
uses this path to configure pyjulia.There are two advantages. First, the user does not need ensure that the symlinked directory is in their PATH. It requires no user intervention outside of Python. Second, some people, like myself use a Julia with a custom system image as their default Julia. But, for
mypackage
I can't use this, I need a Julia with this stock image. In fact, via,julia_project
,mypackage
will manage it's own custom system image.The text was updated successfully, but these errors were encountered: