Skip to content

Commit

Permalink
apipy: improve deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmuller committed Aug 26, 2022
1 parent f7bdb29 commit 1a99dae
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
21 changes: 12 additions & 9 deletions MMVII/apipy/Makefile_apipy_linux
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,32 @@ PY_FILES = $(I_SRCS:.i=.py)
WRAP_CXX_FILES = $(I_SRCS:.i=_wrap.cpp)
WRAP_O_FILES = $(I_SRCS:.i=_wrap.o)

PYTHON = python3
PIP = pip3

.PHONY: clean doc apipy

all: apipy doc

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

tmp/typemaps.i: gen_typemaps.py
python3 gen_typemaps.py
$(PYTHON) gen_typemaps.py

tmp/return_nonref.i tmp/ignore_nonconst_overloading.i tmp/h_to_include.i tmp/rename_nonref.i: gen_fix_classes.py
python3 gen_fix_classes.py
$(PYTHON) gen_fix_classes.py

doc: apipy
pydoc3 -w mmv2

clean:
rm -Rf $(PY_FILES) $(WRAP_CXX_FILES) $(WRAP_O_FILES) tmp
rm -Rf $(DOCDIR)/html build/ dist/ $(MODULE_NAME).egg-info/ __pycache__/
python3 setup.py clean
pip3 uninstall -y $(MODULE_NAME)
$(PYTHON) setup.py clean
$(PIP) uninstall -y $(MODULE_NAME)

4 changes: 2 additions & 2 deletions MMVII/apipy/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Dependencies:
- for documentation: doxygen and GraphViz, or pdoc3

On debian:
apt install swig python3-dev pkg-config python3-pip python3-numpy python3-wheel
pip3 install libclang
apt install swig python3-dev pkg-config python3-pip
pip3 install libclang wheel

First, compile MMv1 and MMv2.

Expand Down
3 changes: 2 additions & 1 deletion MMVII/apipy/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
data_files = [("mmv2/MMVII/bin", ['../bin/MMVII']),
("mmv2/include/XML_MicMac", xml_micmac_files),
("mmv2/include/XML_GEN", xml_gen_files)],
platforms = ['x86_64']
platforms = ['x86_64'],
install_requires=['numpy']
)

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

0 comments on commit 1a99dae

Please sign in to comment.