forked from TrueCloudLab/allure-validator
37 lines
1 KiB
Makefile
37 lines
1 KiB
Makefile
SHELL := /bin/bash
|
|
PYTHON_VERSION := 3.10
|
|
VENV_NAME = allure-validator-${PYTHON_VERSION}
|
|
VENV_DIR := venv.${VENV_NAME}
|
|
|
|
current_dir := $(shell pwd)
|
|
FROM_VENV := . ${VENV_DIR}/bin/activate &&
|
|
|
|
venv: create requirements paths precommit
|
|
@echo Ready
|
|
|
|
precommit:
|
|
@echo Isntalling pre-commit hooks
|
|
${FROM_VENV} pre-commit install
|
|
|
|
paths:
|
|
@echo Append paths for project
|
|
@echo Virtual environment: ${VENV_DIR}
|
|
@rm -rf ${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/_paths.pth
|
|
@touch ${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/_paths.pth
|
|
@echo ${current_dir} | tee ${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/_paths.pth
|
|
|
|
create: ${VENV_DIR}
|
|
|
|
${VENV_DIR}:
|
|
@echo Create virtual environment ${VENV_DIR}
|
|
virtualenv --python=python${PYTHON_VERSION} --prompt=${VENV_NAME} ${VENV_DIR}
|
|
|
|
requirements:
|
|
@echo Isntalling pip requirements
|
|
${FROM_VENV} pip install -Ur requirements.txt
|
|
${FROM_VENV} pip install -Ur requirements_dev.txt
|
|
|
|
|
|
#### VALIDATION SECTION ####
|
|
lint: create requirements
|
|
${FROM_VENV} pylint --disable R,C,W pytest_tests
|