forked from adobe/target-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (29 loc) · 861 Bytes
/
Makefile
File metadata and controls
38 lines (29 loc) · 861 Bytes
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
.PHONY: clean install codegen format test build
all: pre_env clean install codegen format test build
pre_env:
${PYTHON_PATH} -m pip install --upgrade virtualenv
env:
test -d env/bin || ${PYTHON_PATH} -m virtualenv env
. env/bin/activate
clean_env:
rm -rf env
# Setup new virtual env (deletes existing one)
new_env: clean_env pre_env env
clean:
rm -rf build dist target_python_sdk.egg-info
# Install dependencies - pip update sometimes required for python 2.7
install: env
curl https://bootstrap.pypa.io/get-pip.py | python
pip install --upgrade pip "setuptools>=>=38.3.0,<=44.1.x" wheel pep517 pylint
# Run tests
test: env
python -m unittest -v tests
# Format code
format: env
pylint src tests
# Generate client based on open-api spec
codegen:
cd codegeneration && npm run codegen
# Create build package
build: env
python -m pep517.build .