Skip to content

Commit

Permalink
fix: use python virtual env
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly committed Jun 10, 2024
1 parent 71a56fa commit a07d08c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
.tools
.gopath
.DS_Store/
.gopath/
.tools/
.venv/
coverage.out
dist/
/kyverno-json
Expand Down
13 changes: 4 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ HELM_VERSION := v3.10.1
KO := $(TOOLS_DIR)/ko
KO_VERSION := v0.14.1
TOOLS := $(CLIENT_GEN) $(LISTER_GEN) $(INFORMER_GEN) $(REGISTER_GEN) $(DEEPCOPY_GEN) $(CONTROLLER_GEN) $(REFERENCE_DOCS) $(KIND) $(HELM) $(KO)
PIP ?= pip3
PIP ?= pip
ifeq ($(GOOS), darwin)
SED := gsed
else
Expand Down Expand Up @@ -239,9 +239,7 @@ codegen-docs: codegen-api-docs codegen-cli-docs codegen-jp-docs codegen-catalog
.PHONY: codegen-mkdocs
codegen-mkdocs: codegen-docs ## Generate mkdocs website
@echo Generate mkdocs website... >&2
@PIP_BREAK_SYSTEM_PACKAGES=1 $(PIP) install mkdocs
@PIP_BREAK_SYSTEM_PACKAGES=1 $(PIP) install --upgrade pip
@PIP_BREAK_SYSTEM_PACKAGES=1 $(PIP) install -U mkdocs-material mkdocs-redirects mkdocs-minify-plugin mkdocs-include-markdown-plugin lunr mkdocs-rss-plugin mike
@$(PIP) install -r requirements.txt
@mkdocs build -f ./website/mkdocs.yaml

.PHONY: codegen-schemas-openapi
Expand All @@ -261,8 +259,7 @@ codegen-schemas-openapi: $(KIND) $(HELM) ## Generate openapi schemas (v2 and v3)

.PHONY: codegen-schemas-json
codegen-schemas-json: codegen-schemas-openapi ## Generate json schemas
@PIP_BREAK_SYSTEM_PACKAGES=1 $(PIP) install -U pip setuptools
@PIP_BREAK_SYSTEM_PACKAGES=1 $(PIP) install openapi2jsonschema --no-build-isolation
@$(PIP) install -r requirements.txt
@rm -rf ./.schemas/json
@openapi2jsonschema ./.schemas/openapi/v2/schema.json --kubernetes --stand-alone --expanded -o ./.schemas/json

Expand Down Expand Up @@ -319,9 +316,7 @@ verify-codegen: codegen ## Verify all generated code and docs are up to date
.PHONY: mkdocs-serve
mkdocs-serve: ## Generate and serve mkdocs website
@echo Generate and servemkdocs website... >&2
@$(PIP) install mkdocs
@$(PIP) install --upgrade pip
@$(PIP) install -U mkdocs-material mkdocs-redirects mkdocs-minify-plugin mkdocs-include-markdown-plugin lunr mkdocs-rss-plugin mike
@$(PIP) install -r requirements.txt
@mkdocs serve -f ./website/mkdocs.yaml

########
Expand Down
11 changes: 11 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cairosvg
lunr
mike
mkdocs
mkdocs-include-markdown-plugin
mkdocs-material
mkdocs-minify-plugin
mkdocs-redirects
mkdocs-rss-plugin
openapi2jsonschema
Pillow

0 comments on commit a07d08c

Please sign in to comment.