Skip to content

Python SDK installs Linux pre-compiled binaries on Mac OS #181

@gbolmier

Description

@gbolmier

/kind bug

What happened:

pip installing ormb Python SDK installed Linux binaries on my Mac OS machine.

What you expected to happen:

I would expect Darwin binaries instead.

How to reproduce it (as minimally and precisely as possible):

Run pip install ormb on a mac, then try any ormb command in a Python interpreter, e.g.:

import ormb

ormb.push(ref)

or in a terminal using the installed pre-compiled binaries path:

$ /usr/local/miniconda/base/envs/temp/lib/python3.7/site-packages/ormb/bin/ormb push <ref>
zsh: exec format error: ormb

Here is the executable file type:

$ file -b /usr/local/Caskroom/miniconda/base/envs/temp/lib/python3.7/site-packages/ormb/bin/ormb
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
for GNU/Linux 3.2.0, Go BuildID=Vh_I6gshxrIYk3nyfbU4/8lRYVkdsHynt31-8VZSv/bWN64Rk8-0IaZNAJyZHM/D7BNeRxCP-crkwFL38Mt,
BuildID[sha1]=7c1f9737776ee71b657b552b5d8af535515cd2d3, stripped

Anything else we need to know?:

It doesn't look like the problem comes from extern-sdk/python/git_release.py.

On my system:

import platform
import sys

platform.platform().lower()
> 'darwin-20.5.0-x86_64-i386-64bit'

sys.platform
> 'darwin'

Therefore, the following loop:

asset_name = "ormb_%s_Linux_x86_64.tar.gz" % cur_version
for os_name in OS_LIST:
for arch_name in ARCH_LIST:
if arch_name in platform.platform().lower() and os_name.lower() in sys.platform:
asset_name = "ormb_%s_%s_%s.tar.gz" % (cur_version, os_name, arch_name)

should give to asset_name the following value 'ormb_0.0.11_Darwin_i386.tar.gz', which doesn't exist in the releases after v0.0.9, I guess it automatically falls back on 'ormb_0.0.11_Linux_x86_64.tar.gz'?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions