diff --git a/Makefile b/Makefile index 8f9a539..298f5fb 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ include src/options.mk -PYTHON = python +PYTHON = python3 # Checking Python version PYTHON_EXE := $(shell command -v $(PYTHON) 2> /dev/null) @@ -17,11 +17,15 @@ ifneq ($(shell test $(PYTHON_VERSION_MAJOR) -ge 3 -a $(PYTHON_VERSION_MINOR) -ge endif -.PHONY: venv doc +.PHONY: pybinding venv doc + + +pybinding: + @+$(MAKE) -C src pybinding venv: - virtualenv --python=python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) --system-site-packages --prompt="(msspec-$(VERSION)) " venv + virtualenv --python=$(PYTHON_EXE) --prompt="(msspec-$(VERSION)) " venv . ./venv/bin/activate && pip install --upgrade pip && pip install -r src/pip.freeze doc: diff --git a/src/Makefile b/src/Makefile index 66b7610..a6ac732 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,15 @@ include options.mk -.PHONY: pybinding results clean +.PHONY: sdist pybinding results clean + +install: sdist + @echo "Installing msspec python package" + @pip install dist/msspec-*.tar.gz + +sdist: pybinding + @echo "Creating Python source distribution..." + @python setup.py sdist + pybinding: @echo "Building Python binding for phagen and spec..."