unicorn-engine / unicorn

Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, S390x, TriCore, X86)
http://www.unicorn-engine.org
GNU General Public License v2.0
7.63k stars 1.35k forks source link

Unicorn 2.1.0 doesn't install from tar.gz with Python 2.7 (setuptools problem) #2008

Open gerph opened 1 month ago

gerph commented 1 month ago

Summary

Installing Unicorn for Python 2.7 fails when installing with Python 2.7 when the tar.gz is used. This will happen on any platform which does not already have a suitable wheel present. It would also be seen if a version of pip prior to the introduction of the wheel architecture changes is installed (eg around 19.x or earlier).

This might not be a big deal as there may already be versions present for all the major OS versions that are supported, but it's a thing that currently happens.

As such this is probably not a very important bug.

Steps to provoke

Failing output

root@1f1c3e7f8599:/# pip install --no-binary :all: -U unicorn
Collecting unicorn
  Downloading https://files.pythonhosted.org/packages/44/87/6e4710dee0716c7d75ad759ee0bbe7ae2d73624c5722749b4d7d55055a43/unicorn-2.1.0.tar.gz (2.8MB)
    100% |################################| 2.8MB 345kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-PyeJCM/unicorn/setup.py", line 16, in <module>
        from setuptools.command.build import build
    ImportError: No module named build

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-PyeJCM/unicorn/

Expected behaviour

You would expect it to build and install the package.

wtdcode commented 1 month ago

This shall be fixed by pip install -U pip wheel setuptools ?

wtdcode commented 1 month ago

Oh yes, you are correct. I understand the context.

Maybe this can be fixed by using egg, but as you suggested, the priority won't be very high.