chaotic-aur / packages

Read-only mirror of Chaotic-AUR's main repository. Issues and bug reports welcome! 📑
https://gitlab.com/chaotic-aur/pkgbuilds
GNU General Public License v3.0
339 stars 20 forks source link

[Request] ytmdl #1595

Closed ZingyTomato closed 1 year ago

ZingyTomato commented 2 years ago

Link to the package(s) in the AUR

https://aur.archlinux.org/packages/ytmdl

Utility this package has for you

Download songs from YouTube with metadata from sources like Itunes, Gaana, Deezer etc.

Do you consider the package(s) to be useful for every Chaotic-AUR user?

No, but for a great amount.

Do you consider the package to be useful for feature testing/preview?

Have you tested if the package builds in a clean chroot?

Does the package's license allow redistributing it?

YES!

Have you searched the issues to ensure this request is unique?

Have you read the README to ensure this package is not banned?

More information

No response

Technetium1 commented 2 years ago
# Issue 1595
downloader-cli # (dep ytmdl)
python-itunespy # (dep ytmdl)
python-ffmpeg # (dep ytmdl)
python-xdg # (dep ytmdl)
python-pydes # (dep ytmdl)
python-ytmusicapi # (dep ytmdl)
python-spotipy # (dep ytmdl)
youtube-search-python # (dep ytmdl)
python-simber # (dep ytmdl)
ytmdl
Adds ytmdl, downloader-cli, python-itunespy, python-ffmpeg, python-xdg, python-pydes, python-ytmusicapi, python-spotipy, youtube-search-python, python-simber
ZingyTomato commented 2 years ago

This? https://aur.archlinux.org/packages/ytmdl#comment-868155

It's quite a lot of deps :sweat_smile:

Technetium1 commented 2 years ago

python-ffmpeg package has a broken test. That's currently the only holdup on building this package. Not sure if it's okay to skip the tests just because of that being broken. Upstream issue: https://github.com/kkroening/ffmpeg-python/issues/636

ZingyTomato commented 2 years ago

Yep just encountered the same issue.

Technetium1 commented 2 years ago

I just posted about a possible patch for the issue here: https://github.com/kkroening/ffmpeg-python/issues/636#issuecomment-1268676007

ZingyTomato commented 2 years ago

Hope they fix it :joy:

xiota commented 1 year ago

Using pytest -vvl, it looks like ffmpeg 5.x replaces the trimmed frames with the first frame instead of removing them entirely.

ZingyTomato commented 1 year ago

Will the saga finally be over... after like 5 months :joy:

Technetium1 commented 1 year ago

@ZingyTomato should finally be fixed when xiota's pr is merged: https://github.com/kkroening/ffmpeg-python/pull/726

xiota commented 1 year ago

I created another PR that uses a different method to fix the test. kkroening/ffmpeg-python#737

Still no sign of maintainer activity in that repository though.

Why not just skip the checks?

xiota commented 1 year ago

The python-ffmpeg package has been updated to skip the broken test.

Also, the upstream project name is actually "ffmpeg-python", while there is another project named "python-ffmpeg" (github). I don't know whether they are drop-in replacements for each other, but while the former appears to have been abandoned, the latter is actively developed.

Technetium1 commented 1 year ago

Issues with python-simber, will link an upstream issue when I make one. python-simber.log

deepjyoti30 commented 1 year ago

The simber issue should be fixed with the 0.2.6 release. Let me know if any other blockers come up that I can possibly solve!

Also thanks for the effort to add ytmdl. Really appreciate it!

Technetium1 commented 1 year ago

@deepjyoti30 finally got a new problem to solve! from ytmdl.log:

==> Starting build()...
/usr/lib/python3.10/site-packages/setuptools/__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`.
dist.fetch_build_eggs(dist.setup_requires)
/usr/bin/python: No module named pip
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/setuptools/installer.py", line 97, in _fetch_build_egg_no_warn
subprocess.check_call(cmd)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpb2pf1zqe', '--quiet', 'simber==0.2.5']' returned non-zero exit status 1.

python-pip is missing in makedepends, also looks like it still searches for Simber 0.2.5.

xiota commented 1 year ago

After removing the simber version string and changing the build command to python -m build --no-isolation, I get the following error:

* Getting build dependencies for sdist...
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
    main()
  File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 287, in get_requires_for_build_sdist
    return hook(config_settings)
  File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_sdist
    return self._get_build_requires(config_settings, requirements=[])
  File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
    self.run_setup()
  File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 484, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
    exec(code, locals())
  File "<string>", line 14, in <module>
NameError: name 'yt' is not defined

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_sdist

I was able to successfully build once with python -m build (without --no-isolation flag). But I think that's just redownloading all the dependencies when building the venv. Also, subsequent attempts to build have failed because of various errors. (Unfortunately, I didn't save the logs. But I recall some messages about missing ytmdl.bash and ytmdl.zsh, even though they're present, as far as I can tell.)

deepjyoti30 commented 1 year ago

@xiota @Technetium1 The ytmdl release is now published and contains simber 0.2.6 or higher as a required dependency. You can try it now and let me know if something else shows up.

xiota commented 1 year ago

Builds with warnings:

==> Starting build()...
/usr/lib/python3.10/site-packages/setuptools/__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`.
  dist.fetch_build_eggs(dist.setup_requires)
Warning: 'classifiers' should be a list, got type 'tuple'
/usr/lib/python3.10/site-packages/setuptools/dist.py:547: UserWarning: Normalizing '2023.02.28' to '2023.2.28'
  warnings.warn(tmpl.format(**locals()))
   ...
==> Starting package()...
/usr/lib/python3.10/site-packages/setuptools/__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`.
  dist.fetch_build_eggs(dist.setup_requires)
Warning: 'classifiers' should be a list, got type 'tuple'
/usr/lib/python3.10/site-packages/setuptools/dist.py:547: UserWarning: Normalizing '2023.02.28' to '2023.2.28'
  warnings.warn(tmpl.format(**locals()))
running install
/usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
   ...

namcap reports the following:

ytmdl W: File (share/) exists in a non-standard directory.
ytmdl W: File (share/bash-completion/) exists in a non-standard directory.
ytmdl W: File (share/bash-completion/completions/) exists in a non-standard directory.
ytmdl W: File (share/bash-completion/completions/ytmdl.bash) exists in a non-standard directory.
ytmdl E: Missing custom license directory (usr/share/licenses/ytmdl)
ytmdl W: Referenced library 'inaSpeechSegmenter' is an uninstalled dependency
ytmdl W: Dependency python included but already satisfied
ytmdl W: Dependency ffmpeg included but already satisfied
ytmdl W: Dependency python-colorama included but already satisfied
ytmdl W: Dependency python-requests included but already satisfied
ytmdl W: Dependency python-lxml included but already satisfied
ytmdl W: Dependency python-urllib3 included but already satisfied

Can the /share folder and extra dependencies be removed?

Technetium1 commented 1 year ago

@deepjyoti30 It builds now, with the warnings above :eyes:

Technetium1 commented 1 year ago

Feel free to use the hourly log to solve your warnings on future builds :smiley:

deepjyoti30 commented 1 year ago

@xiota

Can the /share folder be removed

/share directory just contains the bash files and is a necessary file for packages in order to include the sh completion files.

extra dependencies be removed?

Those are not extra dependencies. python, ffmpeg etc are direct dependencies and inaSpeechSegmenter is an optional dependency for the ytmdl package. The ytmdl package has an option to include some extra functionality and this package will be required then. This is a common way of shipping python packages that might have certain dependencies not useful for all users.

xiota commented 1 year ago

It's common practice for packages that depend on python-* to not include python in the depends. This is described at ArchWiki PKGBUILD:

In some cases this is not necessary and may or may not be listed, for example glibc cannot be uninstalled as every system needs some C library, or python for a package that already depends on another python- module, as the second module must per definition depend on python and cannot ever stop pulling it in as a dependency.

/share is entirely unused. In the PKGBUILD, ${pkgdir}/share can be removed and bash completion will still work because package() copies the files to the standard location /usr/share/bash-completion/completions/ytmdl.

Also requesting you remove the version strings from "python>=3.6" and "yt-dlp>=2022.03.08.1". The version strings block usage of the -git packages.

$ sudo pacman -S yt-dlp-git
resolving dependencies...
looking for conflicting packages...
:: yt-dlp-git and yt-dlp are in conflict. Remove yt-dlp? [y/N] y
error: failed to prepare transaction (could not satisfy dependencies)
:: removing yt-dlp breaks dependency 'yt-dlp>=2022.03.08.1' required by ytmdl