-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
addpkg(main/python-yt-dlp): 2025.02.19 - Migrate from TUR. #23789
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| TERMUX_PKG_HOMEPAGE=https://github.com/google/brotli | ||
| TERMUX_PKG_DESCRIPTION="lossless compression algorithm and format (Python bindings)" | ||
| TERMUX_PKG_LICENSE="MIT" | ||
| TERMUX_PKG_MAINTAINER="@termux" | ||
| TERMUX_PKG_VERSION=1.1.0 | ||
| TERMUX_PKG_REVISION=2 | ||
| TERMUX_PKG_SRCURL=https://github.com/google/brotli/archive/v$TERMUX_PKG_VERSION.tar.gz | ||
| TERMUX_PKG_SHA256=e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff | ||
| TERMUX_PKG_DEPENDS="python, python-pip" | ||
| TERMUX_PKG_PYTHON_COMMON_DEPS="wheel" | ||
| TERMUX_PKG_BUILD_IN_SRC=true | ||
| TERMUX_PKG_AUTO_UPDATE=true | ||
|
|
||
| termux_step_configure() { | ||
| # ERROR: ./lib/python3.12/site-packages/_brotli.cpython-312.so contains undefined symbols: | ||
| # 31: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND log2 | ||
| LDFLAGS+=" -lm" | ||
| LDFLAGS+=" -Wl,--no-as-needed -lpython${TERMUX_PYTHON_VERSION}" | ||
| } | ||
|
|
||
| termux_step_make() { | ||
| : | ||
| } | ||
|
|
||
| termux_step_make_install() { | ||
| pip install . --prefix="$TERMUX_PREFIX" -vv --no-build-isolation --no-deps | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| TERMUX_PKG_HOMEPAGE=https://www.pycryptodome.org/ | ||
| TERMUX_PKG_DESCRIPTION="A self-contained Python package of low-level cryptographic primitives" | ||
| TERMUX_PKG_LICENSE="BSD 2-Clause, Public Domain" | ||
| TERMUX_PKG_LICENSE_FILE="LICENSE.rst" | ||
| TERMUX_PKG_MAINTAINER="@termux" | ||
| TERMUX_PKG_VERSION="3.21.0" | ||
| TERMUX_PKG_REVISION=2 | ||
| TERMUX_PKG_SRCURL="https://github.com/Legrandin/pycryptodome/archive/refs/tags/v${TERMUX_PKG_VERSION}x.tar.gz" | ||
| TERMUX_PKG_SHA256=7762d1b658b47e989f21ed844a8bf9a527b130fecec26f0d5076656dc38c0558 | ||
| TERMUX_PKG_DEPENDS="python, python-pip" | ||
| TERMUX_PKG_PYTHON_COMMON_DEPS="wheel" | ||
| TERMUX_PKG_BUILD_IN_SRC=true | ||
| TERMUX_PKG_AUTO_UPDATE=true | ||
|
|
||
| termux_step_pre_configure() { | ||
| LDFLAGS+=" -Wl,--no-as-needed -lpython${TERMUX_PYTHON_VERSION}" | ||
| } | ||
|
|
||
| termux_step_make() { | ||
| : | ||
| } | ||
|
|
||
| termux_step_make_install() { | ||
| pip install . --prefix="$TERMUX_PREFIX" -vv --no-build-isolation --no-deps | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| TERMUX_PKG_HOMEPAGE=https://github.com/yt-dlp/yt-dlp | ||
| TERMUX_PKG_DESCRIPTION="A youtube-dl fork with additional features and fixes" | ||
| TERMUX_PKG_LICENSE="Unlicense" | ||
| TERMUX_PKG_MAINTAINER="Joshua Kahn @TomJo2000" | ||
| TERMUX_PKG_VERSION="2025.02.19" | ||
| TERMUX_PKG_REVISION=1 | ||
| TERMUX_PKG_SRCURL=https://github.com/yt-dlp/yt-dlp/archive/refs/tags/$TERMUX_PKG_VERSION.tar.gz | ||
| TERMUX_PKG_SHA256=3942d04ac56b7cbd51881653946662dc84b8628c9405f9e9bacb29d0259e0ab1 | ||
| TERMUX_PKG_DEPENDS="libc++, libexpat, openssl, python, python-brotli, python-pip, python-pycryptodomex" | ||
| TERMUX_PKG_RECOMMENDS="ffmpeg" | ||
| TERMUX_PKG_PYTHON_COMMON_DEPS="hatchling, wheel" | ||
| TERMUX_PKG_PYTHON_TARGET_DEPS="mutagen, pycryptodomex, websockets, certifi, brotli, requests, urllib3" | ||
| TERMUX_PKG_BUILD_IN_SRC=true | ||
| TERMUX_PKG_HOSTBUILD=true | ||
| TERMUX_PKG_AUTO_UPDATE=true | ||
| TERMUX_PKG_PROVIDES='yt-dlp' | ||
robertkirkman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| termux_step_host_build() { | ||
| cp -Rf $TERMUX_PKG_SRCDIR ./ | ||
|
|
||
| ( cd src && make completions ) | ||
| } | ||
|
|
||
| termux_step_make() { | ||
| : | ||
| } | ||
|
|
||
| termux_step_make_install() { | ||
| # Install library | ||
| pip install . --prefix=$TERMUX_PREFIX -vv --no-build-isolation --no-deps | ||
|
|
||
| # Install completions | ||
| install -Dm600 $TERMUX_PKG_HOSTBUILD_DIR/src/completions/bash/yt-dlp \ | ||
| -t "$TERMUX_PREFIX"/share/bash-completion/completions | ||
| install -Dm600 $TERMUX_PKG_HOSTBUILD_DIR/src/completions/zsh/_yt-dlp \ | ||
| -t "$TERMUX_PREFIX"/share/zsh/site-functions | ||
| install -Dm600 $TERMUX_PKG_HOSTBUILD_DIR/src/completions/fish/yt-dlp.fish \ | ||
| -t "$TERMUX_PREFIX"/share/fish/completions | ||
| } | ||
|
|
||
| termux_step_create_debscripts() { | ||
| cat <<- EOF > ./postinst | ||
| #!$TERMUX_PREFIX/bin/sh | ||
| echo "Installing dependencies through pip..." | ||
| pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / } | ||
| EOF | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has the same
TERMUX_PKG_SRCURLasmain/brotli,would it make sense to combine the
build.shand make this a subpackage of that?termux-packages/packages/brotli/build.sh
Lines 5 to 6 in d5068a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not realize that.
It's definitely an option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to leave that for another time actually.
Mainly because I don't think subpackages support all required build variables.
https://github.com/termux/termux-packages/wiki/Creating-new-package#subpackage-build-script-variables
TERMUX_PKG_PYTHON_COMMON_DEPSin particular doesn't seems to have an equivalent for subpackages.I'm not really happy with the current separation of subpackages as some separate class of package as I've stated previously and this seems to be another case to solidify that.
Leaving it as a separate package for the time being doesn't appear to have any adverse consequences.
It is independent from Brotli in all but source repository as is already.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I agree it's a bit confusing, but
TERMUX_PKG_PYTHON_COMMON_DEPSis actually dependencies that only get installed while the package is building (there are no instances of packages or subpackages that installTERMUX_PKG_PYTHON_COMMON_DEPSduring install-time rather than build-time).Because of that, it means that you would actually put
TERMUX_PKG_PYTHON_COMMON_DEPSin thebuild.shof the main package, not the subpackage (because, since it's not possible to build a subpackage without also building the main package, the build dependencies of subpackages are defined in thebuild.shof the main package).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having an interstitial
main/python-brotlipackage at least makes the "succession" clearer.Having a
BREAKS/REPLACESfor a TUR package is a bit iffy.Although, I'm not even sure replacing a "standalone" package with a subpackage of the same name would require a breaks/replaces entry.