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

Optional dependencies enforced via setup.py #6484

Closed
6 of 9 tasks
icp1994 opened this issue Mar 9, 2023 · 4 comments
Closed
6 of 9 tasks

Optional dependencies enforced via setup.py #6484

icp1994 opened this issue Mar 9, 2023 · 4 comments
Labels
question Question

Comments

@icp1994
Copy link

icp1994 commented Mar 9, 2023

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Please make sure the question is worded well enough to be understood

The README mentions all dependencies apart from python itself being optional. But the setup.py pulls in everything from requirements.txt under install_requires. Does this mean downstream distributors who builds from source are recommended to patch the setup.py itself for a dependency-free installation?

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

No response

@icp1994 icp1994 added the question Question label Mar 9, 2023
@pukkandan
Copy link
Member

We have to, due to #5482 (comment)

Does this mean downstream distributors who builds from source are recommended to patch the setup.py itself for a dependency-free installation?

Are you asking whether it's recommended to install without dependencies? If so, no. Unless there is reason to1, it is recommended to install the dependencies too2.

But if you do want dependency-free install and is using pip3 in backend, I suppose only current option is to patch setup.py

Do you have any suggestions what I could do to make it easier?

Footnotes

  1. We don't even pin deps to avoid package conflicts. Any other reason?

  2. Remember, not all deps are in requirements.txt - ffmpeg/ffprobe are highly recommended

  3. All PMs should be using pipx and not pip imho, but that's another topic

@icp1994
Copy link
Author

icp1994 commented Mar 11, 2023

Hi, thanks for the pointers. I don't have any suggestions, was just curious why those optional deps were "default".

@RuRo
Copy link

RuRo commented Aug 1, 2023

@pukkandan Hi. Do you think, you can revisit this issue? Please, either declare these dependencies as non-optional or (preferably, imho) remove the optional dependencies from install_requires in setup.py (at least by default, you can re-enable them when building the wheels for PyPI for example).

Currently, the package metadata is wrong and asking downstream distributors to patch it is kind of weird. I submitted a bug report to the Arch Linux maintainers asking to patch the requirements.txt like you are suggesting, and they (very understandably) refused.

Thanks.

@pukkandan
Copy link
Member

Sorry, but we want default installs (from pip or source) to have these dependencies included. Unless some way to do pypa/setuptools#1139 becomes available, it is not feasible to remove them.

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

No branches or pull requests

3 participants