-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (30 loc) · 1.04 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Makefile
.ONESHELL:
SHELL := /bin/bash
SOURCE_INIT = /tmp/venv.oscal-insights
SOURCE = $(SOURCE_INIT)
all: run
run: venv-plus
echo "=> run"; \
source $(SOURCE_INIT)/bin/activate; \
python python/oscal_component_definition_insights.py --base-path . --file-path component-definitions/acme-component-definition/component-definition.json --output-path plots/component-definitions/acme-component-definition; \
help: venv-plus
echo "=> help"; \
source $(SOURCE_INIT)/bin/activate; \
python python/oscal_component_definition_insights.py --help;
venv-plus: venv
echo "=> install extras"; \
source $(SOURCE_INIT)/bin/activate; \
python -m pip install matplotlib;
venv:
if [ ! -d $(SOURCE_INIT) ]; then \
echo "=> create python virtual environment"; \
python -m venv $(SOURCE_INIT); \
source $(SOURCE_INIT)/bin/activate; \
echo "=> install prereqs"; \
python -m pip install -q --upgrade pip setuptools; \
python -m pip install -q compliance-trestle; \
fi
clean-up:
echo "=> remove python virtual environment"; \
rm -fr $(SOURCE_INIT)