Skip to content

Commit

Permalink
remove build wrapper (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaAltieri authored Jan 10, 2025
1 parent 624b147 commit b9d8b22
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 38 deletions.
24 changes: 9 additions & 15 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,32 @@ bases:
channel: "22.04"
architectures: [amd64]
parts:
charm:
charm-strict-dependencies: true
files:
plugin: dump
source: .
prime:
- charm_version
- workload_version
override-build: |
rustup default stable
# Convert subset of poetry.lock to requirements.txt
curl -sSL https://install.python-poetry.org | python3 -
/root/.local/bin/poetry self add poetry-plugin-export
/root/.local/bin/poetry export --only main,charm-libs --output requirements.txt
craftctl default
charm:
build-snaps:
- rustup
build-packages:
- libffi-dev
- libssl-dev
- pkg-config
override-pull: |
craftctl default
if [[ ! -f requirements.txt ]]
then
echo 'ERROR: Use "tox run -e build-dev" instead of calling "charmcraft pack" directly' >&2
exit 1
fi
files:
plugin: dump
source: .
prime:
- charm_version
- workload_version
override-build: |
rustup default stable
# Convert subset of poetry.lock to requirements.txt
curl -sSL https://install.python-poetry.org | python3 -
/root/.local/bin/poetry self add poetry-plugin-export
/root/.local/bin/poetry export --only main,charm-libs --output requirements.txt
craftctl default
charm-strict-dependencies: true
charm-requirements: [requirements.txt]
24 changes: 1 addition & 23 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,6 @@ set_env =
allowlist_externals =
poetry

[testenv:build-{production,dev,wrapper}]
# Wrap `charmcraft pack`
pass_env =
CI
GH_TOKEN
allowlist_externals =
{[testenv]allowlist_externals}
charmcraft
charmcraftcache
mv
commands_pre =
poetry export --only main,charm-libs --output requirements.txt
commands =
build-production: charmcraft pack {posargs}
build-dev: charmcraftcache pack {posargs}
commands_post =
mv requirements.txt requirements-last-build.txt

[testenv:format]
description = Apply coding style standards to code
commands_pre =
Expand Down Expand Up @@ -76,12 +58,8 @@ pass_env =
CI
GITHUB_OUTPUT
SECRETS_FROM_GITHUB
allowlist_externals =
{[testenv:build-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
{[testenv:build-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s --ignore={[vars]tests_path}/unit/ {posargs}
commands_post =
{[testenv:build-wrapper]commands_post}

0 comments on commit b9d8b22

Please sign in to comment.