Package Details: yt-dlp-git 2024.03.10.r9.g86d2f4d-1

Git Clone URL: https://aur.archlinux.org/yt-dlp-git.git (read-only, click to copy)
Package Base: yt-dlp-git
Description: A youtube-dl fork with additional features and fixes (git)
Upstream URL: https://github.com/yt-dlp/yt-dlp
Licenses: Unlicense
Conflicts: yt-dlp
Provides: yt-dlp
Submitter: katt
Maintainer: katt
Last Packager: katt
Votes: 43
Popularity: 0.60
First Submitted: 2021-08-08 15:20 (UTC)
Last Updated: 2024-03-17 17:40 (UTC)

Dependencies (24)

Required by (117)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 Next › Last »

rekman commented on 2023-05-09 13:35 (UTC) (edited on 2023-05-09 13:35 (UTC) by rekman)

Parsing ls is considered harmful. But I agree my solution is kind of ugly.

gesh commented on 2023-05-09 13:24 (UTC)

Instead, couldn't we filter the glob, eg --destdir="$(ls "$pkgdir"/dist/*.whl | sort -n | head -n1)" (Am afk, might've made a typo here)

rekman commented on 2023-05-09 13:11 (UTC) (edited on 2023-05-09 13:12 (UTC) by rekman)

The package fails to build if there is already a wheel in src/yt-dlp/dist/, i.e., a previous version was built in the same directory.

This is because the main packaging command uses a glob: python -m installer --destdir="$pkgdir" dist/*.whl but the installer command excepts a single .whl filename. Thus you can reproduce with touch dist/test.whl.

Annoyingly it doesn't seem like there is way to ask the python build system what the name of the built wheel is. Well, it tells you something like

Successfully built yt_dlp-2023.3.4-py2.py3-none-any.whl

but this occurs in build() and if we read output there we'd have to put it in global scope which is unvirtuous.

For now a workaround is

diff --git a/PKGBUILD b/PKGBUILD
@@ -39,5 +39,6 @@ check() {

 package() {
     cd "${pkgname%-git}"
-    python -m installer --destdir="$pkgdir" dist/*.whl
+    local tag=$(git describe --tags | cut -d- -f1 | sed -E 's/(^|\.)0*([1-9]+)/\1\2/g')
+    python -m installer --destdir="$pkgdir" dist/yt_dlp-$tag-py2.py3-none-any.whl
 }

The sed step is necessary because the git tag of the latest release is 2023.03.04 but as you can see the wheel filename strips leading zeros. This is not particularly future-proof because we have hardcoded the wheel tags py2.py3-none-any but as far as I can tell wheel tags are WRITE ONLY. Python packaging makes me want to be dead.

willemw commented on 2023-04-15 06:21 (UTC)

Requires now python-exceptiongroup (in checkdepends).

ignace1972 commented on 2023-04-02 22:03 (UTC) (edited on 2023-04-02 22:05 (UTC) by ignace1972)

Hello, katt.
Thanks to you.
Rather than risk breaking everything, I managed to solve my difficulty with these commands in normal user:

pip install pychromecast --upgrade
pip install setuptools --upgrade

Being the only user of my computer, problem solved.

katt commented on 2023-04-02 19:17 (UTC)

@ignace1972 This is a problem with python-setuptools in Manjaro, you can use the testing branch to work around it or wait.

ignace1972 commented on 2023-03-29 00:38 (UTC)

Hello, is broken:

File "/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 253, in finalize_options if pd is not None and pd.key == self.egg_name.lower(): AttributeError: 'PathDistribution' object has no attribute 'key'

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel

katt commented on 2023-03-04 13:34 (UTC) (edited on 2023-03-04 13:35 (UTC) by katt)

Huh, wasn't aware of --exclude, serves me right for not looking at manpages, I'll use that instead of this terrible workaround! I see what happened, they got rid of the nightlies already, lol...

willemw commented on 2023-03-04 13:02 (UTC)

Now this can happen in prepare():

$ git tag -d nightly
error: tag 'nightly' not found.

Tried this instead in pkgver():

$ git describe --long --tags --abbrev=7 --exclude=nightly
2023.03.03-3-g4a6272c

katt commented on 2023-03-04 12:07 (UTC) (edited on 2023-03-04 12:27 (UTC) by katt)

So upstream started releasing nightly releases which messes up the pkgver(), not quite sure how to fix it without just going for only having revision as the pkgver.

EDIT: I added a fugly workaround that appears to work, if it stops working feel free to scream right at me.