2020-11-30 16:39:29 +01:00
|
|
|
include src/options.mk
|
2020-11-24 09:57:35 +01:00
|
|
|
|
|
|
|
|
2022-10-25 16:24:23 +02:00
|
|
|
.PHONY: pybinding install devel venv doc clean _attrdict
|
2020-12-02 08:49:59 +01:00
|
|
|
|
|
|
|
|
2021-02-19 08:22:47 +01:00
|
|
|
pybinding:
|
2021-02-22 20:28:13 +01:00
|
|
|
@+$(INSIDE_VENV) $(MAKE) -C src pybinding
|
2020-11-24 09:57:35 +01:00
|
|
|
|
|
|
|
|
2021-01-12 12:20:13 +01:00
|
|
|
venv:
|
2021-02-22 20:28:13 +01:00
|
|
|
ifeq ($(NO_VENV),0)
|
2023-06-29 10:50:34 +02:00
|
|
|
# @virtualenv --python=$(PYTHON_EXE) --prompt="(msspec-$(VERSION)) " $(VENV_PATH)
|
|
|
|
$(PYTHON) -m venv $(VENV_PATH)
|
2022-10-27 14:45:38 +02:00
|
|
|
$(INSIDE_VENV) python -m ensurepip --upgrade
|
2023-06-29 10:50:34 +02:00
|
|
|
$(INSIDE_VENV) pip install -r src/pip.freeze
|
2021-02-22 20:28:13 +01:00
|
|
|
endif
|
2021-01-12 12:20:13 +01:00
|
|
|
|
2022-10-27 14:45:38 +02:00
|
|
|
# wget https://bootstrap.pypa.io/get-pip.py && \
|
|
|
|
# python get-pip.py && \
|
|
|
|
# rm -f get-pip.py
|
|
|
|
# pip install --upgrade setuptools && \
|
|
|
|
# pip install -r src/pip.freeze && \
|
|
|
|
|
2021-01-12 12:20:13 +01:00
|
|
|
|
2021-02-22 20:28:13 +01:00
|
|
|
install: venv pybinding wx
|
|
|
|
@+$(INSIDE_VENV) $(MAKE) -C src sdist
|
|
|
|
@+$(INSIDE_VENV) $(MAKE) -C src frontend
|
2023-06-29 10:50:34 +02:00
|
|
|
@+$(INSIDE_VENV) pip install --force-reinstall src/dist/msspec-$(VERSION)*.whl
|
2021-01-22 17:03:53 +01:00
|
|
|
@echo "Do not forget to check that $(INSTALL_PREFIX)/bin is set in your \$$PATH"
|
2020-12-02 18:18:47 +01:00
|
|
|
|
2021-01-12 12:20:13 +01:00
|
|
|
|
|
|
|
devel: VENV_PATH = ./_venv
|
2021-02-22 20:28:13 +01:00
|
|
|
devel: venv pybinding wx
|
|
|
|
@$(INSIDE_VENV) pip install -e src/
|
|
|
|
|
|
|
|
|
2022-10-05 13:40:22 +02:00
|
|
|
light: VENV_PATH = ./_venv
|
|
|
|
light: venv
|
|
|
|
@$(INSIDE_VENV) pip install src/
|
|
|
|
|
|
|
|
|
2022-10-25 16:24:23 +02:00
|
|
|
_attrdict:
|
|
|
|
# Check if virtualenv python version > 3.3.0
|
|
|
|
# If so, install the patched version of attrdict used to build the version 4.2.0 of wxPython
|
|
|
|
@$(INSIDE_VENV) if `python -c "import sys; exit(sys.version_info > (3,3))"`; then \
|
|
|
|
pip install --no-cache attrdict; \
|
|
|
|
else \
|
|
|
|
pip install thirdparty/attrdict-2.0.1.tar.gz; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
_build_wx/wxPython.target: _attrdict
|
2021-02-23 10:26:22 +01:00
|
|
|
@$(INSIDE_VENV) echo "Building wxPython for your `python --version 2>&1` under Linux $(DISTRO_RELEASE)..."
|
2021-02-22 20:28:13 +01:00
|
|
|
# Create a folder to build wx into
|
|
|
|
@mkdir -p _build_wx
|
|
|
|
# download the wheel or the source if it cannot find a wheel
|
2022-10-25 16:24:23 +02:00
|
|
|
$(INSIDE_VENV) cd _build_wx && pip download -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/$(DISTRO_RELEASE) wxPython
|
2021-02-22 20:28:13 +01:00
|
|
|
# Build the source if a tar.gz was downloaded
|
|
|
|
@$(INSIDE_VENV) cd _build_wx && \
|
2021-02-23 10:26:22 +01:00
|
|
|
if [ -e wxPython*.tar.gz ]; then \
|
|
|
|
tar -x --skip-old-files -vzf wxPython*.tar.gz; \
|
|
|
|
cd `ls -d wxPython*/`; \
|
2022-10-25 16:24:23 +02:00
|
|
|
pip install requests sip; \
|
2021-02-23 10:26:22 +01:00
|
|
|
python build.py dox etg --nodoc sip build bdist_wheel; \
|
2021-07-21 23:05:34 +02:00
|
|
|
ln -sf `readlink -f dist/wxPython*.whl` ../; \
|
2021-02-23 10:26:22 +01:00
|
|
|
fi;
|
2021-07-21 23:05:34 +02:00
|
|
|
# Finally touch a dummy file to avoid phony target
|
|
|
|
@touch _build_wx/wxPython.target
|
|
|
|
|
|
|
|
|
|
|
|
wx: _build_wx/wxPython.target
|
2021-02-22 20:28:13 +01:00
|
|
|
# Install the wheel
|
|
|
|
@$(INSIDE_VENV) cd _build_wx && pip install wxPython*.whl
|
2020-12-08 21:28:22 +01:00
|
|
|
|
2020-11-24 09:57:35 +01:00
|
|
|
|
2021-09-24 16:14:50 +02:00
|
|
|
doc: VENV_PATH = ./_venv
|
|
|
|
doc: venv
|
2020-11-24 09:57:35 +01:00
|
|
|
@echo "Building pdf and html documentation..."
|
2021-02-23 10:26:22 +01:00
|
|
|
@$(INSIDE_VENV) pip install sphinx
|
2021-09-24 16:14:50 +02:00
|
|
|
# @+$(INSIDE_VENV) $(MAKE) -C doc/ latexpdf
|
2021-02-23 10:26:22 +01:00
|
|
|
@+$(INSIDE_VENV) $(MAKE) -C doc/ html
|
2020-12-02 18:18:47 +01:00
|
|
|
|
2021-01-12 12:20:13 +01:00
|
|
|
|
2020-12-02 18:18:47 +01:00
|
|
|
clean::
|
|
|
|
@+$(MAKE) -C src/ clean
|
|
|
|
|
2021-01-13 18:26:08 +01:00
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "Top Makefile help message"
|
|
|
|
|