Skip to content

Commit

Permalink
fix: build generic wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaser committed Apr 4, 2023
1 parent 57b9ecb commit 1f1273b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 59 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
with:
cache: poetry

- name: Install dependencies
run: poetry build
- name: Build package
run: make build

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Build package
run: poetry build
run: make build

black:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -93,8 +93,5 @@ jobs:
cache: poetry
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: poetry install

- name: Run tests
run: poetry run pytest
run: make test
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
clean:
rm -rfv magnum_cluster_api/charts/cluster-autoscaler

vendor: clean
helm repo add autoscaler https://kubernetes.github.io/autoscaler
helm repo update
helm fetch autoscaler/cluster-autoscaler --version 9.27.0 --untar --untardir magnum_cluster_api/charts
patch -p0 magnum_cluster_api/charts/cluster-autoscaler/templates/clusterrole.yaml < hack/add-omt-to-clusterrole.patch

build: vendor
poetry build

install: build
poetry install

test: install
poetry run pytest
48 changes: 0 additions & 48 deletions hack/build.py

This file was deleted.

3 changes: 3 additions & 0 deletions hack/stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ clusterctl init \
sudo curl -Lo /usr/local/bin/skopeo https://github.com/lework/skopeo-binary/releases/download/v1.10.0/skopeo-linux-amd64
sudo chmod +x /usr/local/bin/skopeo

# Vendor the chart
make vendor

# Install `magnum-cluster-api`
pip install -U setuptools pip
$HOME/.local/bin/pip3 install -e .
Expand Down
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ pytest-mock = "^3.6.1"
requires = ["setuptools", "poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.build]
generate-setup-file = false
script = "hack/build.py"

[tool.poetry.scripts]
magnum-cluster-api-image-builder = "magnum_cluster_api.cmd.image_builder:main"
magnum-cluster-api-image-loader = "magnum_cluster_api.cmd.image_loader:main"
Expand Down

0 comments on commit 1f1273b

Please sign in to comment.