-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
95 lines (76 loc) · 2.76 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Makefile for building and uploading ShowerPy
#===========================================
# Rules for building files
#===========================================
#------------------------------------
# Main Functions
#------------------------------------
# - - - - - - - - - - - - - - -
# Rules:
# - - - - - - - - - - - - - - -
# Possible make targets (to be make with ```make [xxx]```)
.PHONY : all test venv clean_all clean_build clean_venv build upload upload_test
# - - - - - - - - - - - - - - -
# Default
# - - - - - - - - - - - - - - -
# Go through full pipeline to make plots by default
test : clean_build build upload_test
.DEFAULT_GOAL := test
# - - - - - - - - - - - - - - -
# All
# - - - - - - - - - - - - - - -
# Make all main functions
all: clean_all venv build upload_prod
# =======================================================
# Building and uploading
# =======================================================
build:
# =======================================================
# Building project:
# =======================================================
# Please make sure you have updated the version number in
# the `pyproject.toml` file
. venv/bin/activate; python3 -m build
@printf "\n"
upload:
# =======================================================
# Exporting project to pypi.org:
# =======================================================
. venv/bin/activate; python3 -m twine upload dist/*
@printf "\n"
upload_test:
# =======================================================
# Exporting project to test.pypi.org:
# =======================================================
. venv/bin/activate; python3 -m twine upload --repository testpypi dist/*
@printf "\n"
# =======================================================
# Setup
# =======================================================
# Telling Make to make a virtual environment
venv:
# =======================================================
# Setting up virtual environment:
# =======================================================
python3 -m venv venv
. venv/bin/activate; pip3 install -r build_requirements.txt
@printf "\n"
# =======================================================
# Cleaning
# =======================================================
# Telling Make to clean by removing all catalogs
clean_build:
# =======================================================
# Removing build directories:
# =======================================================
rm -r dist
@printf "\n"
# Telling Make to clean by removing the virtual environment
clean_venv:
# =======================================================
# Removing virtual environment:
# =======================================================
rm -r venv
@printf "\n"
# Cleaning all additional files
clean_all: clean_venv clean_build