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

Adapt to setuptools v72 #2207

Open
ssouques opened this issue Jul 29, 2024 · 4 comments
Open

Adapt to setuptools v72 #2207

ssouques opened this issue Jul 29, 2024 · 4 comments
Labels
bug Issues that report (apparent) bugs.

Comments

@ssouques
Copy link

link to setuptools issue:
pypa/setuptools#4519

Expected Behavior

installing moviepy using poetry should install moviepy

Actual Behavior

installing moviepy fails with following error:

**  ChefBuildError
  Backend subprocess exited when trying to invoke get_requires_for_build_wheel
  
  Traceback (most recent call last):
    File "/home/runner/.local/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
      main()
    File "/home/runner/.local/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/runner/.local/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 134, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpal7yprgz/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpal7yprgz/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
      self.run_setup()
    File "/tmp/tmpal7yprgz/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 497, in run_setup
      super().run_setup(setup_script=setup_script)
    File "/tmp/tmpal7yprgz/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 21, in <module>
  NameError: name 'TestCommand' is not defined
  
  at ~/.local/venv/lib/python3.11/site-packages/poetry/installation/chef.py:164 in _prepare
      160│ 
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│ 
      163│             if error is not None:
    → 164│                 raise error from None
      165│ 
      166│             return path
Installing /home/runner/work/Libertyfi.api/Libertyfi.api/py/projects/media/.venv/bin/pymupdf over existing file
      167│ 
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
Note: This error originates from the build backend, and is likely not a problem with poetry but with moviepy (1.0.3) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "moviepy (==1.0.3)"'.

Steps to Reproduce the Problem

add moviepy into a poetry dependency file, try to install it

Specifications

  • Python Version: 3.11.9
  • MoviePy Version: 1.0.3
  • Platform Name: Ubuntu 22.04, Windows 11
  • Platform Version:
@ssouques ssouques added the bug Issues that report (apparent) bugs. label Jul 29, 2024
@tylerjthomas9
Copy link

pypa/setuptools#4522

setuptools v72 has been yanked, and the deprecation is now scheduled for November 15th, 2024.

@Galaxy102
Copy link

Galaxy102 commented Jul 30, 2024

If you need some inspiration for the resolution of this issue, my colleague @LostInDarkMath and I have created a PEP517-compatible fork of v1.0.3 at https://github.com/Galaxy102/moviepy-pep517. The applied changes are: v1.0.x...Galaxy102:moviepy-pep517:master

Please note that this fork will not be maintained! Its sole purpose is to not break our build system when setuptools v72 will be released. Neither can we guarantee that everything still works (the tests are passing).

@zahlman
Copy link

zahlman commented Jul 31, 2024

@LostInDarkMath and I have created a PEP517-compatible fork of v1.0.3

Might I suggest turning this into a pull request? That way, @Zulko could integrate the changes on master, allowing everyone to benefit going forward. See e.g. tomislater/RandomWords#16 where I did similarly for another project.

@Galaxy102
Copy link

@zahlman I don't want to maintain neither the fork nor an eventual pull request as we are currently evaluating alternatives to this library which hasn't seen a stable release in 4 years. I had to do "a lot" of code changes that I don't really understand (like changing the order of decorators), I didn't translate all the setup.py targets like build_docs, haven't touched the docs and so on. Furthermore I didn't intend backwards compatibility (AFAIK Python 2 is still supported by moviepy - at least some support has not been removed), I only tested against Python 3.12.

TL;DR: Feel free to fork my fork and open a PR here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that report (apparent) bugs.
Projects
None yet
Development

No branches or pull requests

4 participants