forked from spdk/spdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (31 loc) · 1.19 KB
/
Makefile
File metadata and controls
41 lines (31 loc) · 1.19 KB
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
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (C) 2023 Intel Corporation.
# Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES
# All rights reserved.
#
SPDK_ROOT_DIR := $(abspath $(CURDIR)/..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
USE_SYSTEM_PYTHON :=
ifeq ($(VIRTUAL_ENV),)
USE_SYSTEM_PYTHON += --system
endif
all: spdk/version.py
clean:
$(Q)rm -f spdk/version.py
$(Q)rm -rf $(SPDK_ROOT_DIR)/python/dist
spdk/version.py: $(SPDK_ROOT_DIR)/VERSION
$(Q)printf "__version__ = '%d.%d%s%s'\n" \
$(version_major) $(version_minor) \
$(shell [ $(version_patch) != 0 ] && echo -n ".$(version_patch)") \
$(shell echo -n \"$(version_suffix)\" | sed 's/-pre/rc0/g' | tr -d -) > spdk/version.py
build: spdk/version.py
$(Q)python -m build $(SPDK_ROOT_DIR)/python/
check: build
$(Q)python -m twine check $(SPDK_ROOT_DIR)/python/dist/*
install:
$(Q)uv pip install --prefix=$(DESTDIR)$(CONFIG_PREFIX) $(SPDK_ROOT_DIR)/python
$(Q)rm -rf $(SPDK_ROOT_DIR)/python/spdk.egg-info $(DESTDIR)$(CONFIG_PREFIX)/.lock
uninstall:
$(Q)uv pip uninstall $(USE_SYSTEM_PYTHON) --prefix=$(DESTDIR)$(CONFIG_PREFIX) spdk
$(Q)rm -rf $(DESTDIR)$(CONFIG_PREFIX)/.lock
.PHONY: all clean install uninstall build check