From 923f9cc32b2f0436c39aa81e478d33a4acca46ff Mon Sep 17 00:00:00 2001 From: Eric Hibbs Date: Wed, 6 Nov 2024 17:36:58 -0800 Subject: [PATCH] resolving weird pip issues, remove argparse as its built-in --- .github/workflows/pr-preview.yml | 3 ++- Dockerfile | 12 ++++-------- pyproject.toml | 1 - 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index aa71b3d..2596963 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -130,4 +130,5 @@ jobs: tags: socketdev/cli:pr-${{ github.event.pull_request.number }} build-args: | CLI_VERSION=${{ env.VERSION }} - PIP_INDEX_URL=https://test.pypi.org/simple \ No newline at end of file + PIP_INDEX_URL=https://test.pypi.org/simple + PIP_EXTRA_INDEX_URL=https://pypi.org/simple \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 1810ff0..949ec58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,15 +2,11 @@ FROM python:3-alpine LABEL org.opencontainers.image.authors="socket.dev" ARG CLI_VERSION ARG PIP_INDEX_URL=https://pypi.org/simple +ARG PIP_EXTRA_INDEX_URL=https://pypi.org/simple + RUN apk update \ && apk add --no-cache git nodejs npm yarn -RUN pip install --index-url ${PIP_INDEX_URL} socketsecurity==$CLI_VERSION \ +RUN pip install --index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} socketsecurity==$CLI_VERSION \ && socketcli -v \ - && socketcli -v | grep -q $CLI_VERSION - -# !! Uncomment to test local build - requires running `python -m build` first (and correct version number) -# COPY dist/socketsecurity-1.0.34-py3-none-any.whl /tmp/ -# RUN pip install /tmp/socketsecurity-1.0.34-py3-none-any.whl \ -# && socketcli -v \ -# && socketcli -v | grep -q $CLI_VERSION \ No newline at end of file + && socketcli -v | grep -q $CLI_VERSION \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index abb0472..7ff90d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,6 @@ dependencies = [ 'requests', 'mdutils', 'prettytable', - 'argparse', 'GitPython', 'packaging', ]