1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-07-22 10:47:43 +02:00

python-install fails when SWIG is not installed

This commit is contained in:
Anthony Scemama 2022-03-31 14:19:41 +02:00
parent e43dde90d9
commit fe526ef8b9

View File

@ -253,10 +253,15 @@ $(pytrexio_py): $(pytrexio_c)
# Build Python module and C wrapper code for TREXIO using SWIG
# [?] swig -python -threads pytrexio.i ----> Add thread support for all the interface
$(pytrexio_c): $(ORG_FILES) $(GENERATOR_FILES) $(trexio_h) $(pytrexio_i) $(numpy_i)
cp $(trexio_h) src/
@if [[ $(SWIG).x != ".x" ]] ; then \
cp $(trexio_h) src/ ; \
cd src/ && \
$(SWIG) -python -py3 -o pytrexio_wrap.c pytrexio.i
$(RM) -- src/trexio.h
$(SWIG) -python -py3 -o pytrexio_wrap.c pytrexio.i ; \
$(RM) -- src/trexio.h ;\
else echo "Error: SWIG is not installed" ; \
exit 1 ; \
fi
$(numpy_i):
wget https://raw.githubusercontent.com/numpy/numpy/main/tools/swig/numpy.i -O $(numpy_i)