msspec_python3/Makefile

65 lines
1.7 KiB
Makefile
Raw Normal View History

include src/options.mk
.PHONY: pybinding install devel venv doc clean
2020-12-02 08:49:59 +01:00
pybinding:
2021-02-22 20:28:13 +01:00
@+$(INSIDE_VENV) $(MAKE) -C src pybinding
venv:
2021-02-22 20:28:13 +01:00
ifeq ($(NO_VENV),0)
@virtualenv --python=$(PYTHON_EXE) --prompt="(msspec-$(VERSION)) " $(VENV_PATH)
2021-02-22 20:28:13 +01:00
@$(INSIDE_VENV) pip install --upgrade pip && pip install -r src/pip.freeze
endif
2021-02-22 20:28:13 +01:00
install: venv pybinding wx
@+$(INSIDE_VENV) $(MAKE) -C src sdist
@+$(INSIDE_VENV) $(MAKE) -C src frontend
@+$(INSIDE_VENV) 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
2021-02-22 20:28:13 +01:00
devel: venv pybinding wx
@$(INSIDE_VENV) pip install -e src/
wx:
@echo "Building wxPython for your `python --version` under Linux $(DISTRO_RELEASE)..."
# Create a folder to build wx into
@mkdir -p _build_wx
# download the wheel or the source if it cannot find a wheel
@$(INSIDE_VENV) cd _build_wx && pip download -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/$(DISTRO_RELEASE) wxPython
# Build the source if a tar.gz was downloaded
@$(INSIDE_VENV) cd _build_wx && \
if [ -e wxPython*.tar.gz ]; then \
tar -x --skip-old-files -vzf wxPython*.tar.gz; \
cd `ls -d wxPython*/`; \
pip install requests; \
python build.py dox etg --nodoc sip build bdist_wheel; \
ln -s `readlink -f dist/wxPython*.whl` ../; \
fi;
# Install the wheel
@$(INSIDE_VENV) cd _build_wx && pip install wxPython*.whl
doc:
@echo "Building pdf and html documentation..."
@mkdir -p package/
@+$(MAKE) -C doc/ latexpdf
@rm -rf package/*.pdf
@cp "doc/build/latex/MsSpec-python.pdf" "./package/MsSpec-$(VERSION).pdf"
@+$(MAKE) -C doc/ html
clean::
@+$(MAKE) -C src/ clean
2021-01-13 18:26:08 +01:00
help:
@echo "Top Makefile help message"