Skip to content

Commit

Permalink
Update makefile, package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
rnixx committed Jun 14, 2024
1 parent d720233 commit 5393e8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 23 deletions.
29 changes: 8 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ MXMAKE_FOLDER?=.mxmake
# Sentinel files
SENTINEL_FOLDER?=$(MXMAKE_FOLDER)/sentinels
SENTINEL?=$(SENTINEL_FOLDER)/about.txt
$(SENTINEL):
$(SENTINEL): $(firstword $(MAKEFILE_LIST))
@mkdir -p $(SENTINEL_FOLDER)
@echo "Sentinels for the Makefile process." > $(SENTINEL)

Expand Down Expand Up @@ -309,26 +309,7 @@ DOCS_REQUIREMENTS+=sphinx_js
# mxenv
##############################################################################

# Check if given Python is installed
ifeq (,$(shell which $(PRIMARY_PYTHON)))
$(error "PYTHON=$(PRIMARY_PYTHON) not found in $(PATH)")
endif

# Check if given Python version is ok
PYTHON_VERSION_OK=$(shell $(PRIMARY_PYTHON) -c "import sys; print((int(sys.version_info[0]), int(sys.version_info[1])) >= tuple(map(int, '$(PYTHON_MIN_VERSION)'.split('.'))))")
ifeq ($(PYTHON_VERSION_OK),0)
$(error "Need Python >= $(PYTHON_MIN_VERSION)")
endif

# Check if venv folder is configured if venv is enabled
ifeq ($(shell [[ "$(VENV_ENABLED)" == "true" && "$(VENV_FOLDER)" == "" ]] && echo "true"),"true")
$(error "VENV_FOLDER must be configured if VENV_ENABLED is true")
endif

# Check if global python is used with uv (this is not supported by uv)
ifeq ("$(VENV_ENABLED)$(PYTHON_PACKAGE_INSTALLER)","falseuv")
$(error "Package installer uv does not work with a global Python interpreter.")
endif
export OS:=$(OS)

# Determine the executable path
ifeq ("$(VENV_ENABLED)", "true")
Expand All @@ -353,6 +334,12 @@ endif

MXENV_TARGET:=$(SENTINEL_FOLDER)/mxenv.sentinel
$(MXENV_TARGET): $(SENTINEL)
@$(PRIMARY_PYTHON) -c "import sys; vi = sys.version_info; sys.exit(1 if (int(vi[0]), int(vi[1])) >= tuple(map(int, '$(PYTHON_MIN_VERSION)'.split('.'))) else 0)" \
&& echo "Need Python >= $(PYTHON_MIN_VERSION)" && exit 1 || :
@[[ "$(VENV_ENABLED)" == "true" && "$(VENV_FOLDER)" == "" ]] \
&& echo "VENV_FOLDER must be configured if VENV_ENABLED is true" && exit 1 || :
@[[ "$(VENV_ENABLED)$(PYTHON_PACKAGE_INSTALLER)" == "falseuv" ]] \
&& echo "Package installer uv does not work with a global Python interpreter." && exit 1 || :
ifeq ("$(VENV_ENABLED)", "true")
ifeq ("$(VENV_CREATE)", "true")
ifeq ("$(PYTHON_PACKAGE_INSTALLER)$(MXENV_UV_GLOBAL)","uvtrue")
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"main": "src/treibstoff.js",
"devDependencies": {
"@rollup/plugin-terser": "^0.4.4",
"@web/dev-server-import-maps": "^0.2.0",
"@web/test-runner": "^0.18.1",
"@web/dev-server-import-maps": "^0.2.1",
"@web/test-runner": "^0.18.2",
"install": "^0.13.0",
"jquery": "^4.0.0-beta",
"jsdoc": "^3.6.11",
Expand Down

0 comments on commit 5393e8b

Please sign in to comment.