Skip to content

Commit

Permalink
Fix make build target
Browse files Browse the repository at this point in the history
Move the actions done by the tox target into the
build target and call them there in a clean and easy
to spot sequence. There is no need to call tox to
prepare for the package submission, instead the
checks and poetry runs to prepare for the package
target should be called directly as part of the
build target. In the future we might get rid of
tox completely.
  • Loading branch information
schaefi committed Nov 1, 2024
1 parent 41dee12 commit eade3d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,16 @@ clean_git_attributes:
# for details on when this target is called see setup.py
git checkout kiwi/version.py

build: clean tox
build: clean
poetry install --all-extras
bash -c 'shellcheck -e SC1091,SC1090,SC2001,SC2174,SC1117,SC2048,SC2004 dracut/modules.d/*/*.sh -s bash'
bash -c 'shellcheck -e SC1091,SC1090,SC2001,SC2174,SC1117,SC2048,SC2004 kiwi/config/functions.sh -s bash'
poetry run make -C doc man
poetry run flake8 --statistics -j auto --count kiwi
poetry run flake8 --statistics -j auto --count test/unit
poetry run flake8 --statistics -j auto --count test/scripts
poetry run mypy kiwi
poetry run bash -c 'pushd test/unit && pytest -n 5 --doctest-modules --no-cov-on-fail --cov=kiwi --cov-report=term-missing --cov-fail-under=100 --cov-config .coveragerc'
# build the sdist source tarball
poetry build --format=sdist
# provide rpm source tarball
Expand All @@ -119,7 +128,6 @@ pypi: clean tox
poetry build --format=sdist
poetry publish --repository=pypi


clean: clean_git_attributes
rm -rf dist
rm -rf doc/build
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ simplejson = ">=3.17.0"
# Optional dependencies for markup extra
anymarkup-core = { version = ">=0.8.0", optional = true }
xmltodict = { version = ">=0.12.0", optional = true }
toml = { version = "*", optional = true }

[tool.poetry.extras]
markup = [ "anymarkup-core", "xmltodict" ]
markup = [ "anymarkup-core", "xmltodict" , "toml" ]
integration_tests = ["pytest-container"]

[tool.poetry.plugins]
Expand Down

0 comments on commit eade3d4

Please sign in to comment.