From e9ea232b3c3bf592790bf526c377e251b940e58e Mon Sep 17 00:00:00 2001 From: ianwal Date: Sat, 14 Dec 2024 04:03:28 +0000 Subject: [PATCH] Add optional dev dependencies, fix dynamic scripts invalid entry --- .github/workflows/vpdq-release.yaml | 15 +++++++++------ vpdq/pyproject.toml | 8 +++++++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/vpdq-release.yaml b/.github/workflows/vpdq-release.yaml index a097ba703..49e44feee 100644 --- a/.github/workflows/vpdq-release.yaml +++ b/.github/workflows/vpdq-release.yaml @@ -20,16 +20,18 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.10" - - name: Install packaging dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r packaging-requirements.txt + python-version: "3.11" - name: Install build dependencies run: | sudo apt-get update sudo apt-get install -y python3-dev pkg-config cmake ffmpeg libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev + - name: Install packaging dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r packaging-requirements.txt + python -m pip list + - name: Package run: | python -m build --sdist @@ -37,7 +39,8 @@ jobs: - name: Ensure packaged build runs run: | python -m pip install dist/vpdq*.tar.gz - python -c "import vpdq" + python -m pip list + python -c "import vpdq; print(dir(vpdq))" - name: Publish distribution to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/vpdq/pyproject.toml b/vpdq/pyproject.toml index adec2b7c6..a49c7e6b0 100644 --- a/vpdq/pyproject.toml +++ b/vpdq/pyproject.toml @@ -9,7 +9,7 @@ description = "Python bindings for Facebook VPDQ hash" requires-python = ">= 3.8" readme = {file = "python/README.md", content-type = "text/markdown"} license = {file = "LICENSE.txt"} -dynamic = ["version", "scripts", "entry-points"] +dynamic = ["version"] [tool.scikit-build.metadata.version] provider = "scikit_build_core.metadata.regex" @@ -25,3 +25,9 @@ regex = "^(?P\\S+)$" [tool.scikit-build] minimum-version = "0.10" cmake.build-type = "RelWithDebInfo" + +[project.optional-dependencies] +dev = [ + "pytest", + "clang-format", +]