Skip to content

Commit

Permalink
fix: add install-build-deps target
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Nov 12, 2024
1 parent e14ed2c commit 0c59109
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,15 @@ publish: publish-pypi ## Publish packages
.PHONY: publish-pypi
publish-pypi: clean package-pip lint-twine ##- Publish Python packages to pypi
uv tool run twine upload dist/*

# Used for installing build dependencies in CI.
.PHONY: install-build-deps
install-build-deps:
ifeq ($(shell which apt),)
$(warning Cannot install build dependencies without apt.)
$(warning Cannot install build dependencies on non-linux platforms.)
else ifeq ($(wildcard /usr/include/libxml2/libxml/xpath.h),)
sudo apt install libxml2-dev libxslt1-dev
else ifeq ($(wildcard /usr/include/libxslt/xslt.h),)
sudo apt install libxslt1-dev
endif
2 changes: 1 addition & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ setup: install-uv setup-precommit ## Set up a development environment
uv sync --frozen --all-extras

.PHONY: setup-tests
setup-tests: install-uv ##- Set up a testing environment without linters
setup-tests: install-uv install-build-deps ##- Set up a testing environment without linters
uv sync --frozen

.PHONY: setup-lint
Expand Down

0 comments on commit 0c59109

Please sign in to comment.