From 34ea7ab4f2d200ba6d95639c3f04b24f71f10dd2 Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Tue, 15 Nov 2022 13:06:44 -0800 Subject: [PATCH] lots of changes --- .github/workflows/package.yaml | 7 +------ .gitignore | 1 + Makefile | 9 +++++++-- docker/Dockerfile | 3 +-- setup.cfg | 3 +-- tools/docs | 4 ---- 6 files changed, 11 insertions(+), 16 deletions(-) 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 c5151dfc..4697a1f3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -21,8 +21,7 @@ RUN apk update --no-cache && \ apk del \ g++ \ make \ - py3-setuptools \ - py3-pip + py3-setuptools ############################################################################### # CONTAINER CONFIGS diff --git a/setup.cfg b/setup.cfg index 3b410d81..66f6ecd9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -49,6 +49,5 @@ docs = sphinx==4.5.0 sphinx-rtd-theme==1.0.0 build = - setuptools - wheel + build 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 -