diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7c4bce7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +version: 2 + +updates: + - package-ecosystem: pip + directory: "/" + schedule: + interval: daily + time: "03:00" + open-pull-requests-limit: 10 + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + time: "04:00" + open-pull-requests-limit: 5 + rebase-strategy: "disabled" diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml new file mode 100644 index 0000000..57a7793 --- /dev/null +++ b/.github/workflows/publish-package.yml @@ -0,0 +1,28 @@ +name: publish-package + +on: + push: + tags: + - v* + +permissions: read-all + +jobs: + build_and_push: + runs-on: ubuntu-24.04 + strategy: + matrix: + python-version: [3.12] + + steps: + - uses: actions/checkout@v6 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + + - name: Upload packages for ${{ github.event.ref }} + env: + TWINE_PASSWORD: ${{ secrets.GEMFURY_PUSH_TOKEN }} + run: | + make upload-pkg diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 0000000..bb5ec7b --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,32 @@ +name: testing + +on: + push: + branches: main + pull_request: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +permissions: read-all + + +jobs: + build-package: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.12] + + steps: + - uses: actions/checkout@v6 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + + - name: Build package for ${{ github.event.ref }} + run: | + make build-pkg diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..5f762aa --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# Copyright (c) 2026 Alexander Todorov +# +# Licensed under GNU Affero General Public License v3 or later (AGPLv3+) +# https://www.gnu.org/licenses/agpl-3.0.html + +FROM kiwitcms/kiwi AS buildroot + +USER 0 +RUN dnf -y install gcc krb5-devel python3.12-devel + +USER 1001 +COPY ./requirements.txt /Kiwi/requirements.txt +RUN pip3 install --no-cache-dir --upgrade pip wheel +RUN pip3 wheel --no-deps --wheel-dir /Kiwi/dist -r /Kiwi/requirements.txt + +FROM scratch AS pkg-dist +COPY --from=buildroot /Kiwi/dist/ / diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a2c6bc7 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +# Copyright (c) 2026 Alexander Todorov +# +# Licensed under GNU Affero General Public License v3 or later (AGPLv3+) +# https://www.gnu.org/licenses/agpl-3.0.html + + +.PHONY: build-pkg +build-pkg: + rm -rf dist/ + docker build --output type=local,dest=dist/ --target pkg-dist . + +.PHONY: upload-pkg +upload-pkg: build-pkg + test -n "$(TWINE_USERNAME)" || exit 1 + test -n "$(TWINE_PASSWORD)" || exit 2 + twine upload dist/* --repository-url https://push.fury.io/kiwitcms diff --git a/README.md b/README.md new file mode 100644 index 0000000..94976f2 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +This repository contains a downstream build of the +[gssapi](https://pypi.org/project/gssapi/) PyPI package which is built +specifically for use inside a Kiwi TCMS container! diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..9442876 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +gssapi==1.11.1