Changes on Makefile to be compatible with Docker.
This commit is contained in:
parent
527ad80b03
commit
d7f004ebec
19
Makefile
19
Makefile
|
@ -11,7 +11,7 @@ ifndef PYTHON_EXE
|
|||
$(error Unable to find the $(PYTHON) executable!)
|
||||
endif
|
||||
|
||||
ifeq ($(shell python -c "import sys; exit(sys.version_info >= ($(PYMAJ),$(PYMIN)))"; echo $$?),0)
|
||||
ifeq ($(shell $(PYTHON_EXE) -c "import sys; exit(sys.version_info >= ($(PYMAJ),$(PYMIN)))"; echo $$?),0)
|
||||
$(error Python version >= $(PYMAJ).$(PYMIN) is needed!)
|
||||
endif
|
||||
|
||||
|
@ -19,19 +19,20 @@ endif
|
|||
.PHONY: pybinding install devel venv doc clean
|
||||
|
||||
|
||||
pybinding:
|
||||
@+$(MAKE) -C src pybinding
|
||||
pybinding: venv
|
||||
@+. $(VENV_PATH)/bin/activate && $(MAKE) -C src pybinding
|
||||
|
||||
|
||||
venv:
|
||||
virtualenv --python=$(PYTHON_EXE) --prompt="(msspec-$(VERSION)) " $(VENV_PATH)
|
||||
. $(VENV_PATH)/bin/activate && pip install --upgrade pip && pip install -r src/pip.freeze
|
||||
@virtualenv --python=$(PYTHON_EXE) --prompt="(msspec-$(VERSION)) " $(VENV_PATH)
|
||||
@. $(VENV_PATH)/bin/activate && pip install --upgrade pip && pip install -r src/pip.freeze
|
||||
|
||||
|
||||
install: pybinding venv
|
||||
@+$(MAKE) -C src sdist
|
||||
@+$(MAKE) -C src frontend
|
||||
@. $(VENV_PATH)/bin/activate && pip install src/dist/msspec-$(VERSION).tar.gz
|
||||
install: pybinding
|
||||
@+. $(VENV_PATH)/bin/activate && $(MAKE) -C src sdist
|
||||
@+. $(VENV_PATH)/bin/activate && $(MAKE) -C src frontend
|
||||
@+. $(VENV_PATH)/bin/activate && pip install src/dist/msspec-$(VERSION).tar.gz
|
||||
@echo "Do not forget to check that $(INSTALL_PREFIX)/bin is set in your \$$PATH"
|
||||
|
||||
|
||||
devel: VENV_PATH = ./_venv
|
||||
|
|
|
@ -16,7 +16,9 @@ dist/msspec-$(VERSION).tar.gz: VERSION
|
|||
|
||||
$(INSTALL_PREFIX)/bin/msspec: msspec.sh.template VERSION
|
||||
@echo "Installing frontend command..."
|
||||
@cat $< | sed 's/__VERSION__/$(VERSION)/' > $@
|
||||
@mkdir -p $(dir $@)
|
||||
@cat $< | sed -e 's/__VERSION__/$(VERSION)/' -e 's#__VENV_PATH__#$(VENV_PATH)#' > $@
|
||||
#@cat $< | sed 's/__VERSION__/$(VERSION)/' > $@
|
||||
@chmod u+x $@
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
SCRIPT_PATH="$0"
|
||||
SCRIPT_NAME=$(basename "$SCRIPT_PATH")
|
||||
VERSION="__VERSION__"
|
||||
VENV_PATH="$HOME/.local/src/msspec_venv_$VERSION"
|
||||
VENV_PATH="__VENV_PATH__"
|
||||
|
||||
# Check venv path
|
||||
if ! [ -d "$VENV_PATH" ]; then
|
||||
|
|
Loading…
Reference in New Issue