diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 35a56439..6fc3dc24 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -25,6 +25,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + submodules: recursive - name: Initialize CodeQL uses: github/codeql-action/init@v3 @@ -48,9 +50,12 @@ jobs: - name: Unit Tests env: BROKER_DIRECTORY: "${{ github.workspace }}/broker_dir" + PWD: "${{ github.workspace }}" run: | - pip install -U pip - pip install -U .[dev,docker] + pip install uv + uv venv + source .venv/bin/activate + uv pip install -e .[dev,docker] ls -l "$BROKER_DIRECTORY" broker --version pytest -v tests/ --ignore tests/functional diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 4a25997d..bd706a9d 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -17,14 +17,21 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: recursive - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Setup and Build + env: + PWD: "${{ github.workspace }}" run: | - pip install -U pip .[setup] + pip install uv + uv venv + source .venv/bin/activate + uv pip install -e .[setup] python -m build python -m twine check dist/* diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..c8001c9a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "broker/vendored/ssh2-python"] + path = broker/vendored/ssh2-python + url = https://github.com/jacobcallahan/ssh2-python.git diff --git a/Dockerfile b/Dockerfile index 427eee7b..096ccc25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,18 @@ FROM fedora MAINTAINER https://github.com/SatelliteQE +ENV PWD /root/broker + RUN dnf -y install make cmake gcc-c++ zlib-devel \ - openssl-devel git python3-pip python3-devel \ + openssl-devel git python3-pip python3-devel which\ && dnf clean all -WORKDIR /root/broker -COPY . /root/broker/ -RUN pip install . + +WORKDIR $PWD +COPY . $PWD + +RUN pip install uv +RUN uv pip install -e . ENTRYPOINT ["broker"] CMD ["--help"] diff --git a/broker/vendored/ssh2-python b/broker/vendored/ssh2-python new file mode 160000 index 00000000..abbbf867 --- /dev/null +++ b/broker/vendored/ssh2-python @@ -0,0 +1 @@ +Subproject commit abbbf86709046ee04b21d2b9c80d288d44c67a9c diff --git a/pyproject.toml b/pyproject.toml index b3e9eeea..467b6d54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ "packaging", "pyyaml", "setuptools", - "ssh2-python@git+https://github.com/jacobcallahan/ssh2-python.git", + "ssh2-python @ file://${PWD}/broker/vendored/ssh2-python", ] dynamic = ["version"] # dynamic fields to update on build - version via setuptools_scm @@ -53,7 +53,7 @@ setup = [ "build", "twine", ] -ssh2 = ["ssh2-python@git+https://github.com/jacobcallahan/ssh2-python.git"] +# ssh2 = ["ssh2-python@git+https://github.com/jacobcallahan/ssh2-python.git"] ssh2_py311 = ["ssh2-python"] [project.scripts]