-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 797 Bytes
/
Makefile
File metadata and controls
40 lines (32 loc) · 797 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
39
# Variables
PYTHON = python
PROTOC = $(PYTHON) -m grpc_tools.protoc
PROTO_DIR = protobufs
SRC_DIR = imageassessmentservice
GEN_DIR = $(SRC_DIR)/generated
BUILD_DIR = build
DIST_DIR = dist
# Default target
all: build
# Generate Protobuf files
generate:
@mkdir -p $(GEN_DIR)
@$(PROTOC) -I $(PROTO_DIR) --python_out=$(GEN_DIR) --grpc_python_out=$(GEN_DIR) $(PROTO_DIR)/*.proto
@touch $(GEN_DIR)/__init__.py
# Clean generated files
clean:
@rm -rf $(GEN_DIR)
@rm -rf $(BUILD_DIR)
@rm -rf $(DIST_DIR)
@rm -rf imageassessmentservice.egg-info
# Build package
build: generate
$(PYTHON) setup.py sdist bdist_wheel
# Install package
install: build
uv pip install .
# Install dependencies
deps:
uv pip install -r requirements.txt
# Install dependencies and package
install-all: deps install