From 21eb36774b30c645e87ce54472dee052980effeb Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Tue, 15 Nov 2022 13:34:47 -0800 Subject: [PATCH] [DOCKER] Use alpine-3.16, update ffmpeg (attempt 2) (#332) * Revert "Revert "[DOCKER] Use alpine-3.16, update ffmpeg (#330)" (#331)" This reverts commit 1fa3aa596704be3b4d65549254dc07bbfad66031. * update mediafile * lots of changes * remove setup py --- .github/workflows/package.yaml | 7 +------ .gitignore | 1 + Makefile | 9 +++++++-- docker/Dockerfile | 10 +++------- setup.cfg | 5 ++--- setup.py | 4 ---- tools/docs | 4 ---- 7 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 setup.py delete mode 100755 tools/docs diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index b5f931ad..f0e92b36 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -38,12 +38,7 @@ jobs: - name: Build Wheel run: | - # Build wheel and copy to docker dir - pip install -e .[build] - python setup.py bdist_wheel - cp dist/*.whl docker/root - # Copy examples to docker defaults dir - cp -R examples docker/root/defaults/ + make docker_stage - name: Save Python build cache uses: actions/cache@v3 diff --git a/.gitignore b/.gitignore index 8c83760e..dce67c93 100644 --- a/.gitignore +++ b/.gitignore @@ -141,3 +141,4 @@ dmypy.json docker/*.whl docker/root/*.whl +docker/root/defaults/examples diff --git a/Makefile b/Makefile index 272ccc76..960a4232 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,11 @@ wheel: clean - python setup.py bdist_wheel -docker: wheel + pip3 install build + python3 -m build +docker_stage: wheel cp dist/*.whl docker/root/ + cp -R examples docker/root/defaults/ +docker: docker_stage sudo docker build --no-cache -t ytdl-sub:0.1 docker/ docs: sphinx-build -a -b html docs docs/_html @@ -14,6 +17,8 @@ clean: src/ytdl_sub.egg-info/ \ docs/_html/ \ .coverage \ + docker/root/*.whl \ + docker/root/defaults/examples \ coverage.xml .PHONY: wheel docker docs clean diff --git a/docker/Dockerfile b/docker/Dockerfile index c5b83022..4697a1f3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,23 +1,19 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:3.15 +FROM ghcr.io/linuxserver/baseimage-alpine:3.16 ############################################################################### # YTDL-SUB INSTALL COPY root/ / RUN apk update --no-cache && \ - apk add \ + apk add --repository=http://dl-3.alpinelinux.org/alpine/edge/main/ \ vim \ g++ \ nano \ make \ - ffmpeg && \ - apk del \ - python3 \ - py3-pip && \ - apk add --repository=http://dl-3.alpinelinux.org/alpine/edge/main/ \ python3=~3.10 \ py3-setuptools && \ apk add --repository=http://dl-3.alpinelinux.org/alpine/edge/community/ \ + ffmpeg \ py3-pip && \ mkdir -p /config && \ pip install --no-cache-dir ytdl_sub-*.whl && \ diff --git a/setup.cfg b/setup.cfg index 90b046c0..66f6ecd9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,7 +27,7 @@ install_requires = yt-dlp argparse==1.4.0 mergedeep==1.3.4 - mediafile==0.9.0 + mediafile==0.10.1 PyYAML==6.0 [options.package_data] @@ -49,6 +49,5 @@ docs = sphinx==4.5.0 sphinx-rtd-theme==1.0.0 build = - setuptools - wheel + build diff --git a/setup.py b/setup.py deleted file mode 100644 index 7f1a1763..00000000 --- a/setup.py +++ /dev/null @@ -1,4 +0,0 @@ -from setuptools import setup - -if __name__ == "__main__": - setup() diff --git a/tools/docs b/tools/docs deleted file mode 100755 index f87d4bb7..00000000 --- a/tools/docs +++ /dev/null @@ -1,4 +0,0 @@ -# Uncomment to build api docs -# sphinx-apidoc -f -o docs/source src/ytdl_sub -sphinx-build -a -b html docs docs/_html -