-
Notifications
You must be signed in to change notification settings - Fork 20
detect arch when installing using juliaup #11
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
Conversation
bump @cjdoris |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! There's a bit of a bug with the arch names, but the general approach looks great.
I'm trusting you that it solves the issue on M1 since I don't have access to one.
if arch == 'aarch64': | ||
ver = ver + '~aarch64' | ||
elif arch == 'x64': | ||
ver = ver + '~x64' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think just unconditionally do ver += '~' + get_short_arch()
where get_short_arch() == {'aarch64': 'aarch64', 'x86_64': 'x64', 'i686': 'x86'}[get_arch()]
. This is because (a) info['files'][0]['arch']
will always equal get_arch()
; and (b) get_arch()
returns things like x86_64
and i686
which need translating to the short form that juliaup uses (x64
and x86
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah make sense!
@@ -117,12 +122,16 @@ def ju_find_julia(compat=None, install=False): | |||
def ju_find_julia_noinstall(compat=None): | |||
judir = os.path.join(STATE['depot'], 'juliaup') | |||
metaname = os.path.join(judir, 'juliaup.json') | |||
sys_arch = get_arch() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also be get_short_arch()
as above.
I'm wondering if it's possible to set up some sort of test in CI for this package? It's a bit hard to know whether my changes break things or not |
Yeah tests would be brilliant. I've not set up CI for a python package before so help would be much appreciated - I don't have a lot of time for open source projects right now. For now, I'm 97% sure with the above bug fix that this will work. |
lol, thanks! what's in the 3%? |
A healthy dose of paranoia |
fix JuliaPy/PythonCall.jl#197