From 98464190b0d884a0d01e75a2d5d35ed5bac7b088 Mon Sep 17 00:00:00 2001 From: Simon Sawicki Date: Thu, 25 Jul 2024 17:05:03 +0200 Subject: [PATCH] Provide additional target youtube-dl-py3 --- .github/workflows/build.yml | 3 ++- Makefile | 15 +++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dceb0c12e..c93cdeb05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ on: required: true type: string unix: - description: youtube-dl, youtube-dl.tar.gz + description: youtube-dl, youtube-dl-py3, youtube-dl.tar.gz default: true type: boolean windows32: @@ -65,6 +65,7 @@ jobs: name: build-bin-${{ github.job }} path: | youtube-dl + youtube-dl-py3 youtube-dl.tar.gz compression-level: 0 diff --git a/Makefile b/Makefile index 3e17365b8..c623d747b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -all: youtube-dl README.md CONTRIBUTING.md README.txt youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish supportedsites +all: youtube-dl youtube-dl-py3 README.md CONTRIBUTING.md README.txt youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish supportedsites clean: - rm -rf youtube-dl.1.temp.md youtube-dl.1 youtube-dl.bash-completion README.txt MANIFEST build/ dist/ .coverage cover/ youtube-dl.tar.gz youtube-dl.zsh youtube-dl.fish youtube_dl/extractor/lazy_extractors.py *.dump *.part* *.ytdl *.info.json *.mp4 *.m4a *.flv *.mp3 *.avi *.mkv *.webm *.3gp *.wav *.ape *.swf *.jpg *.png CONTRIBUTING.md.tmp youtube-dl youtube-dl.exe + rm -rf youtube-dl.1.temp.md youtube-dl.1 youtube-dl.bash-completion README.txt MANIFEST build/ dist/ .coverage cover/ youtube-dl.tar.gz youtube-dl.zsh youtube-dl.fish youtube_dl/extractor/lazy_extractors.py *.dump *.part* *.ytdl *.info.json *.mp4 *.m4a *.flv *.mp3 *.avi *.mkv *.webm *.3gp *.wav *.ape *.swf *.jpg *.png CONTRIBUTING.md.tmp youtube-dl youtube-dl-py3 youtube-dl.zip youtube-dl.exe find . -name "*.pyc" -delete find . -name "*.class" -delete @@ -10,6 +10,7 @@ BINDIR ?= $(PREFIX)/bin MANDIR ?= $(PREFIX)/man SHAREDIR ?= $(PREFIX)/share PYTHON ?= /usr/bin/env python +PYTHON3 ?= /usr/bin/env python3 # set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local SYSCONFDIR = $(shell if [ $(PREFIX) = /usr -o $(PREFIX) = /usr/local ]; then echo /etc; else echo $(PREFIX)/etc; fi) @@ -57,7 +58,7 @@ tar: youtube-dl.tar.gz pypi-files: youtube-dl.bash-completion README.txt youtube-dl.1 youtube-dl.fish -youtube-dl: youtube_dl/*.py youtube_dl/*/*.py +youtube-dl.zip: youtube_dl/*.py youtube_dl/*/*.py mkdir -p zip for d in youtube_dl youtube_dl/downloader youtube_dl/extractor youtube_dl/postprocessor ; do \ mkdir -p zip/$$d ;\ @@ -67,11 +68,17 @@ youtube-dl: youtube_dl/*.py youtube_dl/*/*.py mv zip/youtube_dl/__main__.py zip/ cd zip ; zip -q ../youtube-dl youtube_dl/*.py youtube_dl/*/*.py __main__.py rm -rf zip + +youtube-dl: youtube-dl.zip echo '#!$(PYTHON)' > youtube-dl cat youtube-dl.zip >> youtube-dl - rm youtube-dl.zip chmod a+x youtube-dl +youtube-dl-py3: youtube-dl.zip + echo '#!$(PYTHON3)' > youtube-dl-py3 + cat youtube-dl.zip >> youtube-dl-py3 + chmod a+x youtube-dl-py3 + README.md: youtube_dl/*.py youtube_dl/*/*.py COLUMNS=80 $(PYTHON) youtube_dl/__main__.py --help | $(PYTHON) devscripts/make_readme.py