From c5187e3c4bed27e531dc1ec0387f25dc4a84ecfb Mon Sep 17 00:00:00 2001 From: Sylvain Tricot Date: Fri, 6 Dec 2019 13:43:31 +0100 Subject: [PATCH] Fix bug in Jenkinsfile. The PYTHONPATH variable is passed in the stage steps to tell Python where to find the msspec package. --- Jenkinsfile | 4 ++-- src/msspec/phagen/fortran/Makefile | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fcec8ed..cbfa2fc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,12 +10,12 @@ pipeline { stage('Build the code and generate tests results...') { steps { - sh '. ./ci_venv/bin/activate && make -C src results VERBOSE=1' + sh '. ./ci_venv/bin/activate && make -C src results VERBOSE=1 PYTHONPATH=$PWD/src' } } stage('Create a setup file...') { steps { - sh '. ~/.profile && make selfex VERBOSE=1' + sh '. ~/.profile && make selfex VERBOSE=1 PYTHONPATH=$PWD/src' } } stage('Test installation...') { diff --git a/src/msspec/phagen/fortran/Makefile b/src/msspec/phagen/fortran/Makefile index 6665315..19a4272 100644 --- a/src/msspec/phagen/fortran/Makefile +++ b/src/msspec/phagen/fortran/Makefile @@ -17,13 +17,12 @@ endif .PHONY: clean -pybinding: libphagen +pybinding: libphagen.target -libphagen: $(objects) main.f +libphagen.target: $(objects) main.f @echo "building Python binding..." @$(F2PY) -I. $(objects) $(F2PY_OPTS)-c -m libphagen main.f -# @cp libphagen.cpython*.so ../ -# @mv libphagen.cpython*.so libphagen.so + @touch $@ $(objects): $(objects_src) @echo "compiling subroutines and functions for phagen..." @@ -32,3 +31,5 @@ $(objects): $(objects_src) clean: @echo "cleaning..." @rm -rf *.o *.mod + @rm -rf $(objects) + @rm -f libphagen.target