-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathMakefile.wheel
57 lines (45 loc) · 1.53 KB
/
Makefile.wheel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
TOP = ..
TOP := $(shell (cd "$(TOP)"; pwd))
include $(TOP)/mk/config.make
PYTHON = ../ChimeraX.app/Contents/bin/python3.11
BUNDLE ?=
wheel: clean chimerax-copy pyproject.toml
$(APP_PYTHON_BIN) -I ../utils/wheel/filter_modules.py
$(APP_PYTHON_BIN) -I make_init.py
python -m build --wheel
pyproject.toml: ensure-chimerax pyproject.toml.in
$(APP_PYTHON_BIN) -I filter_deps.py
chimerax-link: ensure-chimerax
ln -s $(APP_PYSITEDIR)/chimerax .
chimerax-copy: ensure-chimerax
cp -r $(APP_PYSITEDIR)/chimerax .
copy-bundle: ensure-chimerax
cp -r $(APP_PYSITEDIR)/chimerax/${BUNDLE} chimerax/${BUNDLE}
bundle-diff:
diff -r chimerax/${BUNDLE} ../src/bundles/${BUNDLE}/src
ensure-chimerax:
@[ -e $(TOP)/$(APP_FILENAME) ] || (echo \
"ChimeraX not found; run 'make install' first before building the wheel." && exit 1)
chimerax-diff:
diff chimerax $(APP_PYSITEDIR)/chimerax
clean:
\rm -rf dist build chimerax.egg-info htmlcov chimerax
test:
python -m coverage run -m pytest --rootdir=. tests/core
python -m coverage run -m pytest --rootdir=. --ignore=tests/core
.PHONY: venv
venv:
if [ -x $(APP_PYTHON_BIN) ] && [ ! -x .venv ]; then \
$(APP_PYTHON_BIN) -m venv .venv; \
echo 'Virtual environment created in .venv' ; \
echo 'source .venv/bin/activate to activate it on Linux or macOS' ; \
echo 'or source .venv/Scripts/activate to activate it on Windows' ; \
exit ; \
else \
if [ -x .venv ]; then \
echo '.venv already exists' ; \
exit ; \
fi ; \
echo 'Build ChimeraX before creating your virtual environment'; \
exit ; \
fi