代码拉取完成,页面将自动刷新
同步操作将从 openGauss/openGauss-DBMind 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Copyright (c) 2022 Huawei Technologies Co.,Ltd.
#
# openGauss is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
#
# http://license.coscl.org.cn/MulanPSL2
#
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# See the Mulan PSL v2 for more details.
export PYTHONPATH:=$(CURDIR)/3rd:${PYTHONPATH}
PYTHON := $(shell which python3)
ifeq (, $(PYTHON))
$(error "Not found PYTHON($(PYTHON)) in $(PATH).")
endif
include constant
PYTHON_VERSION=$(shell $(PYTHON) -c 'import sys; print("%d.%d"% sys.version_info[0:2])' )
PYTHON_VERSION_OK=$(shell $(PYTHON) -c 'import sys;\
print(int(eval($(MIN_PYTHON_VERSION)) <= sys.version_info[0:2] <= eval($(MAX_PYTHON_VERSION))))' )
ifeq ($(PYTHON_VERSION_OK),0)
$(error "Not supported Python version. At least $(MIN_PYTHON_VERSION)")
endif
installer_name := $(shell echo "dbmind-installer-"`uname -m`"-python$(PYTHON_VERSION).sh")
installer_name_without_3rd := "dbmind-installer-without-dependencies.sh"
.PHONY: dbmind ui
default: help
all: ui dbmind
help:
@echo "Available commands:"
@sed -n '/^[^\.][a-zA-Z0-9_.]*:/s/:.*//p' <Makefile | sort
tox:
$(PYTHON) -m tox
test:
$(PYTHON) -m pytest tests
coverage:
$(PYTHON) -m coverage run -m pytest tests
$(PYTHON) -m coverage report --omit=3rd*
dbmind:
@echo "DBMind"
ui:
@echo "Starting to compile UI components..."
cd ui && npm install && npm run build
clean:
find . -type d -name '__pycache__' -exec rm -rf {} +
rm -rf dbmind-installer*.sh
rm -rf payload.tar*
package: clean ui dbmind 3rd
@echo "Full packaging..."
tar --exclude='ui' --exclude='tests' --exclude='Makefile' --exclude='decompress' --exclude='tox.ini' -cf payload.tar *
tar --append --file=payload.tar ui/build
gzip payload.tar
cat decompress payload.tar.gz > $(installer_name)
chmod +x $(installer_name)
@echo Successfully generated DBMind installation package $(installer_name).
package_without_3rd: clean ui dbmind
@echo "Packaging without third-party dependencies..."
tar --exclude='ui' --exclude='tests' --exclude='Makefile' --exclude='decompress' --exclude='tox.ini' -cf payload.tar *
tar --append --file=payload.tar ui/build
gzip payload.tar
cat decompress payload.tar.gz > $(installer_name_without_3rd)
chmod +x $(installer_name_without_3rd)
@echo Successfully generated DBMind installation package $(installer_name_without_3rd).
3rd: third_party_basic
find 3rd -type d -name '__pycache__' -exec rm -rf {} +
third_party_basic:
ifeq ($(shell uname -m | grep x86 | wc -m), 0)
@echo "Downloading third-party dependencies for DBMind..."
$(PYTHON) -m pip install -r requirements-aarch64.txt --target=3rd --prefer-binary
else
@echo "Downloading third-party dependencies for DBMind..."
$(PYTHON) -m pip install -r requirements-x86.txt --target=3rd --prefer-binary
endif
third_party_total: third_party_basic
@echo "Downloading more optional dependencies..."
$(PYTHON) -m pip install -r requirements-optional.txt --target=3rd --prefer-binary
lint:
@echo "Starting to insepect code..."
@$(PYTHON) -m flake8 --config flake8.conf --statistics dbmind
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。