Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendor ssh2-python as a submodule #271

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Comment on lines +55 to +56
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fancy 🤓

source .venv/bin/activate
uv pip install -e .[dev,docker]
ls -l "$BROKER_DIRECTORY"
broker --version
pytest -v tests/ --ignore tests/functional
9 changes: 8 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "broker/vendored/ssh2-python"]
path = broker/vendored/ssh2-python
url = https://github.com/jacobcallahan/ssh2-python.git
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
1 change: 1 addition & 0 deletions broker/vendored/ssh2-python
Submodule ssh2-python added at abbbf8
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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]
Expand Down