Skip to content

Commit 1a99dae

Browse files
committed
apipy: improve deps
1 parent f7bdb29 commit 1a99dae

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

MMVII/apipy/Makefile_apipy_linux

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,32 @@ PY_FILES = $(I_SRCS:.i=.py)
77
WRAP_CXX_FILES = $(I_SRCS:.i=_wrap.cpp)
88
WRAP_O_FILES = $(I_SRCS:.i=_wrap.o)
99

10+
PYTHON = python3
11+
PIP = pip3
12+
1013
.PHONY: clean doc apipy
1114

1215
all: apipy doc
1316

1417
apipy: clean tmp/typemaps.i tmp/h_to_include.i tmp/rename_nonref.i tmp/return_nonref.i tmp/ignore_nonconst_overloading.i
15-
python3 setup.py build
16-
python3 setup.py bdist_wheel
17-
pip3 install --user dist/*.whl
18-
#python3 setup.py install --user
19-
@if python3 -c "import mmv2" ; then echo "APIPY OK" ; else echo "APIPY error! Use c++filt to demangle missing symbols." ; fi
18+
$(PYTHON) setup.py build
19+
$(PYTHON) setup.py bdist_wheel
20+
$(PIP) install --user dist/*.whl
21+
#$(PYTHON) setup.py install --user
22+
@if $(PYTHON) -c "import mmv2" ; then echo "APIPY OK" ; else echo "APIPY error! Use c++filt to demangle missing symbols." ; fi
2023

2124
tmp/typemaps.i: gen_typemaps.py
22-
python3 gen_typemaps.py
25+
$(PYTHON) gen_typemaps.py
2326

2427
tmp/return_nonref.i tmp/ignore_nonconst_overloading.i tmp/h_to_include.i tmp/rename_nonref.i: gen_fix_classes.py
25-
python3 gen_fix_classes.py
28+
$(PYTHON) gen_fix_classes.py
2629

2730
doc: apipy
2831
pydoc3 -w mmv2
2932

3033
clean:
3134
rm -Rf $(PY_FILES) $(WRAP_CXX_FILES) $(WRAP_O_FILES) tmp
3235
rm -Rf $(DOCDIR)/html build/ dist/ $(MODULE_NAME).egg-info/ __pycache__/
33-
python3 setup.py clean
34-
pip3 uninstall -y $(MODULE_NAME)
36+
$(PYTHON) setup.py clean
37+
$(PIP) uninstall -y $(MODULE_NAME)
3538

MMVII/apipy/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Dependencies:
4242
- for documentation: doxygen and GraphViz, or pdoc3
4343

4444
On debian:
45-
apt install swig python3-dev pkg-config python3-pip python3-numpy python3-wheel
46-
pip3 install libclang
45+
apt install swig python3-dev pkg-config python3-pip
46+
pip3 install libclang wheel
4747

4848
First, compile MMv1 and MMv2.
4949

MMVII/apipy/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
data_files = [("mmv2/MMVII/bin", ['../bin/MMVII']),
3838
("mmv2/include/XML_MicMac", xml_micmac_files),
3939
("mmv2/include/XML_GEN", xml_gen_files)],
40-
platforms = ['x86_64']
40+
platforms = ['x86_64'],
41+
install_requires=['numpy']
4142
)
4243

4344
#https://docs.python.org/3/extending/building.html

0 commit comments

Comments
 (0)