Skip to content

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

Merged
merged 2 commits into from
Jul 28, 2022

Conversation

Roger-luo
Copy link
Contributor

@Roger-luo
Copy link
Contributor Author

bump @cjdoris

Copy link
Collaborator

@cjdoris cjdoris left a 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'
Copy link
Collaborator

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).

Copy link
Contributor Author

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()
Copy link
Collaborator

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.

@Roger-luo
Copy link
Contributor Author

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

@cjdoris
Copy link
Collaborator

cjdoris commented Jul 27, 2022

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.

@cjdoris cjdoris merged commit 6d8f4d1 into JuliaPy:main Jul 28, 2022
@Roger-luo
Copy link
Contributor Author

lol, thanks! what's in the 3%?

@cjdoris
Copy link
Collaborator

cjdoris commented Jul 29, 2022

A healthy dose of paranoia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

find wrong Julia on M1
2 participants