Skip to content
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

LIEF fails to build with setuptools versions >= 64.0.0 #770

Closed
mrphilroth opened this issue Aug 12, 2022 · 2 comments
Closed

LIEF fails to build with setuptools versions >= 64.0.0 #770

mrphilroth opened this issue Aug 12, 2022 · 2 comments
Assignees

Comments

@mrphilroth
Copy link

Describe the bug
LIEF fails to build with setuptools versions greater than 64.0.0 that was released yesterday

To Reproduce

pip install --upgrade pip setuptools
pip install lief

Environment (please complete the following information):

  • System and Version : macOS 12.4 on M1
  • Python: tried 3.8, 3.9, and 3.10 and all failed

Additional context

~/tmp via 🐍 3.8.13
➜ pip install --upgrade pip setuptools
Requirement already satisfied: pip in /Users/proth/.pyenv/versions/3.8.13/lib/python3.8/site-packages (22.0.4)
Collecting pip
  Downloading pip-22.2.2-py3-none-any.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 10.7 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /Users/proth/.pyenv/versions/3.8.13/lib/python3.8/site-packages (56.0.0)
Collecting setuptools
  Downloading setuptools-64.0.3-py3-none-any.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 13.2 MB/s eta 0:00:00
Installing collected packages: setuptools, pip
  Attempting uninstall: setuptools
    Found existing installation: setuptools 56.0.0
    Uninstalling setuptools-56.0.0:
      Successfully uninstalled setuptools-56.0.0
  Attempting uninstall: pip
    Found existing installation: pip 22.0.4
    Uninstalling pip-22.0.4:
      Successfully uninstalled pip-22.0.4
Successfully installed pip-22.2.2 setuptools-64.0.3

~/tmp via 🐍 3.8.13 took 3s
➜ pip install lief
Collecting lief
  Using cached lief-0.12.1.zip (15.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/9g/py_0zbys7fv5v29lg6xntncm0000gn/T/pip-install-fnzqy2cc/lief_697349fd73ee4716b52db708927610ec/setup.py", line 12, in <module>
          from setuptools.command.build_ext import build_ext, copy_file
      ImportError: cannot import name 'copy_file' from 'setuptools.command.build_ext' (/Users/proth/.pyenv/versions/3.8.13/lib/python3.8/site-packages/setuptools/command/build_ext.py)
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
@risicle
Copy link

risicle commented Sep 18, 2022

The fix for this left a reference to copy_file remaining which fails when the sdk is built.

@romainthomas
Copy link
Member

Indeed @risicle. I pushed the fix

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

No branches or pull requests

3 participants