generated from canonical/starbase
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,17 +30,39 @@ publish-pypi: clean package-pip lint-twine ##- Publish Python packages to pypi | |
|
||
# Used for installing build dependencies in CI. | ||
.PHONY: install-build-deps | ||
install-build-deps: install-lint-build-deps | ||
ifeq ($(shell which apt-get),) | ||
$(warning Cannot install build dependencies without apt.) | ||
else ifeq ($(wildcard /usr/include/libxml2/libxml/xpath.h),) | ||
sudo $(APT) install libxml2-dev libxslt1-dev python3-venv | ||
else ifeq ($(wildcard /usr/include/libxslt/xslt.h),) | ||
sudo $(APT) install libxslt1-dev python3-venv | ||
else ifeq ($(wildcard /usr/share/doc/python3-venv/copyright),) | ||
sudo $(APT) install python3-venv | ||
endif | ||
install-build-deps: install-lint-build-deps install-macos-build-deps install-linux-build-deps | ||
|
||
# If additional build dependencies need installing in order to build the linting env. | ||
.PHONY: install-lint-build-deps | ||
install-lint-build-deps: | ||
|
||
.PHONY: install-linux-build-deps | ||
install-linux-build-deps: | ||
ifneq ($(OS),Linux) | ||
else ifeq ($(shell which apt-get),) | ||
$(warning apt-get not found. Please install dependencies yourself.) | ||
else | ||
sudo $(APT) install skopeo | ||
# Needed for integration testing. | ||
sudo $(APT) install libyaml-dev python3-dev python3-pip python3-setuptools python3-venv python3-wheel | ||
# Needed for python-apt. | ||
sudo $(APT) install python-apt-dev libapt-pkg-dev clang | ||
endif | ||
ifneq ($(shell which snap),) | ||
sudo snap install lxd | ||
endif | ||
ifneq ($(shell which lxd),) | ||
sudo lxd init --auto | ||
endif | ||
|
||
.PHONY: install-macos-build-deps | ||
install-macos-build-deps: | ||
ifneq ($(OS),Darwin) | ||
else ifeq ($(shell which brew),) | ||
$(warning brew not installed. Please install dependencies yourself.) | ||
else | ||
brew install [email protected] # For building pygit2 | ||
sudo cp -R /usr/local/opt/[email protected]/* /usr/local | ||
brew install multipass | ||
brew install skopeo | ||
endif |