diff --git a/CHANGES.md b/CHANGES.md index 06764d1..dbd1b2b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,9 @@ ## 1.0a4 (unreleased) -- Get rid of `MXENV_PATH`. Instead, export `PATH` with virtual environment and node modules bin folders. +- Export `PATH` with virtual environment and node modules bin folders. + +- Get rid of `MXENV_PATH`. - Rename `PYTHON_BIN` to `PRIMARY_PYTHON` in `mxenv` domain. diff --git a/Makefile b/Makefile index 9021624..6583b29 100644 --- a/Makefile +++ b/Makefile @@ -193,7 +193,7 @@ endif # determine the executable path ifeq ("$(VENV_ENABLED)", "true") -export PATH:=$(shell pwd)/$(VENV_FOLDER)/bin/:$(shell pwd)/node_modules/.bin/:$(PATH) +export PATH:=$(shell pwd)/$(VENV_FOLDER)/bin/:$(PATH) export VIRTUAL_ENV=$(VENV_FOLDER) MXENV_PYTHON=python else diff --git a/src/mxmake/tests/test_templates.py b/src/mxmake/tests/test_templates.py index 173add9..a79e6b5 100644 --- a/src/mxmake/tests/test_templates.py +++ b/src/mxmake/tests/test_templates.py @@ -658,7 +658,7 @@ def test_Makefile(self, tempdir): # determine the executable path ifeq ("$(VENV_ENABLED)", "true") - export PATH:=$(shell pwd)/$(VENV_FOLDER)/bin/:$(shell pwd)/node_modules/.bin/:$(PATH) + export PATH:=$(shell pwd)/$(VENV_FOLDER)/bin/:$(PATH) export VIRTUAL_ENV=$(VENV_FOLDER) MXENV_PYTHON=python else diff --git a/src/mxmake/topics/core/mxenv.mk b/src/mxmake/topics/core/mxenv.mk index 9ae6e34..9028c21 100644 --- a/src/mxmake/topics/core/mxenv.mk +++ b/src/mxmake/topics/core/mxenv.mk @@ -79,7 +79,7 @@ endif # determine the executable path ifeq ("$(VENV_ENABLED)", "true") -export PATH:=$(shell pwd)/$(VENV_FOLDER)/bin/:$(shell pwd)/node_modules/.bin/:$(PATH) +export PATH:=$(shell pwd)/$(VENV_FOLDER)/bin/:$(PATH) export VIRTUAL_ENV=$(VENV_FOLDER) MXENV_PYTHON=python else diff --git a/src/mxmake/topics/docs/jsdoc.mk b/src/mxmake/topics/docs/jsdoc.mk index 81014e0..1f2d26c 100644 --- a/src/mxmake/topics/docs/jsdoc.mk +++ b/src/mxmake/topics/docs/jsdoc.mk @@ -2,32 +2,13 @@ #:title = JSDoc Documentation #:description = JSDoc installation and integration into Sphinx. #:depends = js.npm -#: -#:[target.jsdoc] -#:description = Provide jsdoc executable on PATH. ############################################################################## # jsdoc ############################################################################## -JSDOC_PATH=$(shell pwd)/$(NPM_PREFIX)/node_modules/jsdoc - -JSDOC_TARGET:=$(SENTINEL_FOLDER)/jsdoc.sentinel -$(JSDOC_TARGET): $(NPM_TARGET) - @echo "Link jsdoc executable to name expected by Sphinx" - @ln -sf $(JSDOC_PATH)/jsdoc.js $(JSDOC_PATH)/jsdoc - @touch $(JSDOC_TARGET) - -.PHONY: jsdoc -jsdoc: $(JSDOC_TARGET) - @export PATH=$(PATH):$(JSDOC_PATH) - # extend npm dev packages NPM_DEV_PACKAGES+=jsdoc # extend sphinx requirements and docs targets DOCS_REQUIREMENTS+=sphinx_js -DOCS_TARGETS+=jsdoc - -# extend default targets -INSTALL_TARGETS+=$(JSDOC_TARGET) diff --git a/src/mxmake/topics/js/karma.mk b/src/mxmake/topics/js/karma.mk index 7c22a84..4a519d5 100644 --- a/src/mxmake/topics/js/karma.mk +++ b/src/mxmake/topics/js/karma.mk @@ -27,4 +27,4 @@ NPM_DEV_PACKAGES+=\ .PHONY: karma karma: $(NPM_TARGET) - @$(NPM_PREFIX)/node_modules/.bin/karma start $(KARMA_CONFIG) $(KARMA_OPTIONS) + @karma start $(KARMA_CONFIG) $(KARMA_OPTIONS) diff --git a/src/mxmake/topics/js/npm.mk b/src/mxmake/topics/js/npm.mk index 7873ba9..4b858aa 100644 --- a/src/mxmake/topics/js/npm.mk +++ b/src/mxmake/topics/js/npm.mk @@ -41,6 +41,8 @@ # npm ############################################################################## +export PATH:=$(shell pwd)/$(NPM_PREFIX)/node_modules/.bin/:$(PATH) + # case `system.dependencies` domain is included SYSTEM_DEPENDENCIES+=npm diff --git a/src/mxmake/topics/js/rollup.mk b/src/mxmake/topics/js/rollup.mk index 282af89..c3c163e 100644 --- a/src/mxmake/topics/js/rollup.mk +++ b/src/mxmake/topics/js/rollup.mk @@ -22,4 +22,4 @@ NPM_DEV_PACKAGES+=\ .PHONY: rollup rollup: $(NPM_TARGET) - @$(NPM_PREFIX)/node_modules/.bin/rollup --config $(ROLLUP_CONFIG) + @rollup --config $(ROLLUP_CONFIG) diff --git a/src/mxmake/topics/js/scss.mk b/src/mxmake/topics/js/scss.mk index 3f0b444..31c269f 100644 --- a/src/mxmake/topics/js/scss.mk +++ b/src/mxmake/topics/js/scss.mk @@ -31,7 +31,5 @@ NPM_DEV_PACKAGES+=sass .PHONY: scss scss: $(NPM_TARGET) - @$(NPM_PREFIX)/node_modules/.bin/sass \ - $(SCSS_OPTIONS) $(SCSS_SOURCE) $(SCSS_TARGET) - @$(NPM_PREFIX)/node_modules/.bin/sass \ - $(SCSS_OPTIONS) --style compressed $(SCSS_SOURCE) $(SCSS_MIN_TARGET) + @sass $(SCSS_OPTIONS) $(SCSS_SOURCE) $(SCSS_TARGET) + @sass $(SCSS_OPTIONS) --style compressed $(SCSS_SOURCE) $(SCSS_MIN_TARGET) diff --git a/src/mxmake/topics/js/wtr.mk b/src/mxmake/topics/js/wtr.mk index 3ef1281..8f00403 100644 --- a/src/mxmake/topics/js/wtr.mk +++ b/src/mxmake/topics/js/wtr.mk @@ -25,4 +25,4 @@ NPM_DEV_PACKAGES+=\ .PHONY: wtr wtr: $(NPM_TARGET) - @$(NPM_PREFIX)/node_modules/.bin/web-test-runner $(WTR_OPTIONS) --config $(WTR_CONFIG) + @web-test-runner $(WTR_OPTIONS) --config $(WTR_CONFIG)