Commit fe29d73a authored by eric pellegrini's avatar eric pellegrini

Bugfix with sphinx documentation

parent 72986960
...@@ -51,25 +51,14 @@ mkdir -p ${DEBIAN_DIST_DIR} ...@@ -51,25 +51,14 @@ mkdir -p ${DEBIAN_DIST_DIR}
cd ${CI_PROJECT_DIR} cd ${CI_PROJECT_DIR}
# Build API # Build API
${PYTHONEXE} setup.py install --prefix=${CI_TEMP_INSTALL_DIR} build_api ${PYTHONEXE} setup.py build_api build_help install --prefix=${CI_TEMP_INSTALL_DIR}
status=$? status=$?
if [ $status -ne 0 ]; then if [ $status -ne 0 ]; then
echo -e "${RED}" "Failed to build MDANSE API""${NORMAL}" echo -e "${RED}" "Failed to build MDANSE Documentation""${NORMAL}"
exit $status exit $status
fi fi
# Build embedded doc
${PYTHONEXE} setup.py install --prefix=${CI_TEMP_INSTALL_DIR} build_help
status=$?
if [ $status -ne 0 ]; then
echo -e "${RED}" "Failed to build MDANSE embedded documentation""${NORMAL}"
exit $status
fi
echo -e "${BLUE}""Installing MDANSE""${NORMAL}"
# Copy the localy installed ScientificPython, MMTK and MDANSE # Copy the localy installed ScientificPython, MMTK and MDANSE
cp -r ${CI_TEMP_INSTALL_DIR}/lib/python2.7/site-packages/Scientific ${DEBIAN_DIST_DIR} cp -r ${CI_TEMP_INSTALL_DIR}/lib/python2.7/site-packages/Scientific ${DEBIAN_DIST_DIR}
cp -r ${CI_TEMP_INSTALL_DIR}/lib/python2.7/site-packages/MMTK ${DEBIAN_DIST_DIR} cp -r ${CI_TEMP_INSTALL_DIR}/lib/python2.7/site-packages/MMTK ${DEBIAN_DIST_DIR}
......
...@@ -13,6 +13,15 @@ cd ${CI_PROJECT_DIR} ...@@ -13,6 +13,15 @@ cd ${CI_PROJECT_DIR}
export MDANSE_APP_DIR=${CI_TEMP_DIR}/dist/MDANSE.app export MDANSE_APP_DIR=${CI_TEMP_DIR}/dist/MDANSE.app
# Build API
${PYTHONEXE} setup.py build_api build_help install --prefix=${CI_TEMP_INSTALL_DIR}
status=$?
if [ $status -ne 0 ]; then
echo -e "${RED}" "Failed to build MDANSE Documentation""${NORMAL}"
exit $status
fi
############################# #############################
# PACKAGING # PACKAGING
############################# #############################
...@@ -89,3 +98,5 @@ hdiutil unmount /Volumes/MDANSE -force -quiet ...@@ -89,3 +98,5 @@ hdiutil unmount /Volumes/MDANSE -force -quiet
sleep 5 sleep 5
${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/Resources/dmg/create-dmg --background "${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/Resources/dmg/dmg_background.jpg" --volname "MDANSE" --window-pos 200 120 --window-size 800 400 --icon MDANSE.app 200 190 --hide-extension MDANSE.app --app-drop-link 600 185 "${MDANSE_DMG}" ${CI_TEMP_DIR}/dist ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/Resources/dmg/create-dmg --background "${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/Resources/dmg/dmg_background.jpg" --volname "MDANSE" --window-pos 200 120 --window-size 800 400 --icon MDANSE.app 200 190 --hide-extension MDANSE.app --app-drop-link 600 185 "${MDANSE_DMG}" ${CI_TEMP_DIR}/dist
mv ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/${MDANSE_DMG} ${CI_PROJECT_DIR}
#!/bin/bash #!/bin/bash
cd ${CI_TEMP_DIR} cd ${CI_PROJECT_DIR}
############################# #############################
# BUILDING DEPENDENCIES # BUILDING DEPENDENCIES
...@@ -12,7 +12,7 @@ git clone https://code.ill.fr/scientific-software/scientific-python.git ...@@ -12,7 +12,7 @@ git clone https://code.ill.fr/scientific-software/scientific-python.git
cd scientific-python cd scientific-python
git checkout master git checkout master
${PYTHONEXE} setup.py build --build-base=${CI_TEMP_BUILD_DIR} install --prefix=${CI_TEMP_INSTALL_DIR} ${PYTHONEXE} setup.py install --prefix=${CI_TEMP_INSTALL_DIR}
status=$? status=$?
if [ $status -ne 0 ]; then if [ $status -ne 0 ]; then
echo -e "${RED}" "Failed to build/install Scientific""${NORMAL}" echo -e "${RED}" "Failed to build/install Scientific""${NORMAL}"
...@@ -21,7 +21,7 @@ fi ...@@ -21,7 +21,7 @@ fi
cp ${CI_TEMP_INSTALL_DIR}/include/python2.7/Scientific/netcdf.h ${CI_TEMP_INSTALL_DIR}/include/python2.7/ cp ${CI_TEMP_INSTALL_DIR}/include/python2.7/Scientific/netcdf.h ${CI_TEMP_INSTALL_DIR}/include/python2.7/
cd ${CI_TEMP_DIR} cd ${CI_PROJECT_DIR}
# Build ILL version of MMTK # Build ILL version of MMTK
echo -e "${BLUE}""Building MMTK""${NORMAL}" echo -e "${BLUE}""Building MMTK""${NORMAL}"
...@@ -33,7 +33,7 @@ git checkout master ...@@ -33,7 +33,7 @@ git checkout master
# Env var needed by MMTK # Env var needed by MMTK
export NETCDF_HEADER_FILE_PATH=${CI_TEMP_INSTALL_DIR}/include/python2.7/ export NETCDF_HEADER_FILE_PATH=${CI_TEMP_INSTALL_DIR}/include/python2.7/
${PYTHONEXE} setup.py build --build-base=${CI_TEMP_BUILD_DIR} install --prefix=${CI_TEMP_INSTALL_DIR} ${PYTHONEXE} setup.py install --prefix=${CI_TEMP_INSTALL_DIR}
status=$? status=$?
if [ $status -ne 0 ]; then if [ $status -ne 0 ]; then
echo -e "${RED}" "Failed to build/install MMTK""${NORMAL}" echo -e "${RED}" "Failed to build/install MMTK""${NORMAL}"
...@@ -48,11 +48,11 @@ echo -e "${BLUE}""Building MDANSE""${NORMAL}" ...@@ -48,11 +48,11 @@ echo -e "${BLUE}""Building MDANSE""${NORMAL}"
cd ${CI_PROJECT_DIR} cd ${CI_PROJECT_DIR}
# Now build last version and install it # Now build last version and install it
${PYTHONEXE} setup.py build --build-base=${CI_TEMP_BUILD_DIR} install --prefix=${CI_TEMP_INSTALL_DIR} ${PYTHONEXE} setup.py install --prefix=${CI_TEMP_INSTALL_DIR}
status=$? status=$?
if [ $status -ne 0 ]; then if [ $status -ne 0 ]; then
echo -e "${RED}" "Failed to build/install MDANSE""${NORMAL}" echo -e "${RED}" "Failed to build MDANSE""${NORMAL}"
exit $status exit $status
fi fi
...@@ -7,10 +7,11 @@ fi ...@@ -7,10 +7,11 @@ fi
export CI_TEMP_DIR=${CI_PROJECT_DIR}/temp export CI_TEMP_DIR=${CI_PROJECT_DIR}/temp
export CI_TEMP_BUILD_DIR=${CI_PROJECT_DIR}/temp/build export CI_TEMP_BUILD_DIR=${CI_PROJECT_DIR}/temp/build
export CI_TEMP_BUILD_DIR=${CI_PROJECT_DIR}/build
export CI_TEMP_INSTALL_DIR=${CI_PROJECT_DIR}/temp/install export CI_TEMP_INSTALL_DIR=${CI_PROJECT_DIR}/temp/install
export PYTHONPATH=${CI_TEMP_INSTALL_DIR}/lib/python2.7/site-packages:${PYTHONPATH} export PYTHONPATH=${CI_TEMP_INSTALL_DIR}/lib/python2.7/site-packages/:${PYTHONPATH}
mkdir -p ${CI_TEMP_DIR} mkdir -p ${CI_TEMP_DIR}
...@@ -19,6 +20,8 @@ cd ${CI_PROJECT_DIR} ...@@ -19,6 +20,8 @@ cd ${CI_PROJECT_DIR}
# Get revision number from Git # Get revision number from Git
if [ -z ${CI_COMMIT_SHA} ]; then if [ -z ${CI_COMMIT_SHA} ]; then
export CI_COMMIT_ID=$(git rev-parse HEAD) export CI_COMMIT_ID=$(git rev-parse HEAD)
else
export CI_COMMIT_ID=${CI_COMMIT_SHA}
fi fi
export CI_COMMIT_ID=${CI_COMMIT_ID:0:8} export CI_COMMIT_ID=${CI_COMMIT_ID:0:8}
......
...@@ -32,19 +32,14 @@ rmdir /S /Q scientific-python ...@@ -32,19 +32,14 @@ rmdir /S /Q scientific-python
git clone https://code.ill.fr/scientific-software/scientific-python.git git clone https://code.ill.fr/scientific-software/scientific-python.git
cd scientific-python cd scientific-python
git checkout master git checkout master
%PYTHON_EXE% setup.py build --netcdf_prefix="%MDANSE_DEPENDENCIES_DIR%\\NetCDF" --netcdf_dll="%MDANSE_DEPENDENCIES_DIR%\\NetCDF" %PYTHON_EXE% setup.py build --netcdf_prefix="%MDANSE_DEPENDENCIES_DIR%\\NetCDF" --netcdf_dll="%MDANSE_DEPENDENCIES_DIR%\\NetCDF" install
set STATUS=%ERRORLEVEL% set STATUS=%ERRORLEVEL%
rem Exit now if unable to build rem Exit now if unable to build
if %STATUS% neq 0 ( if %STATUS% neq 0 (
echo "Failed to build Scientific" echo "Failed to build Scientific"
exit %STATUS% exit %STATUS%
) )
%PYTHON_EXE% setup.py install
rem Exit now if unable to install
if %STATUS% neq 0 (
echo "Failed to install Scientific"
exit %STATUS%
)
rem Copy netcdf dependencies rem Copy netcdf dependencies
copy "%MDANSE_DEPENDENCIES_DIR%\\NetCDF\\netcdf.dll" "%MDANSE_TEMPORARY_INSTALLATION_DIR%\\Lib\\site-packages\\Scientific\\" copy "%MDANSE_DEPENDENCIES_DIR%\\NetCDF\\netcdf.dll" "%MDANSE_TEMPORARY_INSTALLATION_DIR%\\Lib\\site-packages\\Scientific\\"
copy "%MDANSE_DEPENDENCIES_DIR%\\NetCDF\\netcdf.h" "%MDANSE_TEMPORARY_INSTALLATION_DIR%\\include\\Scientific\\" copy "%MDANSE_DEPENDENCIES_DIR%\\NetCDF\\netcdf.h" "%MDANSE_TEMPORARY_INSTALLATION_DIR%\\include\\Scientific\\"
...@@ -57,25 +52,20 @@ rmdir /S /Q mmtk ...@@ -57,25 +52,20 @@ rmdir /S /Q mmtk
git clone https://code.ill.fr/scientific-software/mmtk.git git clone https://code.ill.fr/scientific-software/mmtk.git
cd mmtk cd mmtk
git checkout master git checkout master
%PYTHON_EXE% setup.py build %PYTHON_EXE% setup.py build install
set STATUS=%ERRORLEVEL% set STATUS=%ERRORLEVEL%
rem Exit now if unable to build rem Exit now if unable to build
if %STATUS% neq 0 ( if %STATUS% neq 0 (
echo "Failed to build MMTK" echo "Failed to build MMTK"
exit %STATUS% exit %STATUS%
) )
%PYTHON_EXE% setup.py install
rem Exit now if unable to install
if %STATUS% neq 0 (
echo "Failed to install MMTK"
exit %STATUS%
)
cd .. cd ..
rmdir /S /Q mmtk rmdir /S /Q mmtk
rem Go back to the MDANSE source directory and build and install it rem Go back to the MDANSE source directory and build and install it
cd "%MDANSE_SOURCE_DIR%" cd "%MDANSE_SOURCE_DIR%"
%PYTHON_EXE% setup.py build %PYTHON_EXE% setup.py build install
set STATUS=%ERRORLEVEL% set STATUS=%ERRORLEVEL%
rem Exit now if unable to build rem Exit now if unable to build
if %STATUS% neq 0 ( if %STATUS% neq 0 (
......
...@@ -5,7 +5,7 @@ rem BUILD_TARGET ...@@ -5,7 +5,7 @@ rem BUILD_TARGET
rem MDANSE_DEPENDENCIES_DIR rem MDANSE_DEPENDENCIES_DIR
rem MDANSE_TEMPORARY_INSTALLATION_DIR rem MDANSE_TEMPORARY_INSTALLATION_DIR
cd "%MDANSE_SOURCE_DIR%" cd %MDANSE_SOURCE_DIR%
rem Set the path to python executable rem Set the path to python executable
set PYTHON_EXE=%MDANSE_TEMPORARY_INSTALLATION_DIR%\\python.exe set PYTHON_EXE=%MDANSE_TEMPORARY_INSTALLATION_DIR%\\python.exe
...@@ -16,28 +16,12 @@ rem For the sake of code safety, this should be the same framework used to build ...@@ -16,28 +16,12 @@ rem For the sake of code safety, this should be the same framework used to build
rem see http://p-nand-q.com/python/building-python-27-with-vs2010.html for more info rem see http://p-nand-q.com/python/building-python-27-with-vs2010.html for more info
set VS90COMNTOOLS=C:\Users\\ci\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\Common7\\Tools set VS90COMNTOOLS=C:\Users\\ci\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\Common7\\Tools
%PYTHON_EXE% setup.py build_api %PYTHON_EXE% setup.py build_api build_help install
set STATUS=%ERRORLEVEL%
rem Exit now if unable to build
if %STATUS% neq 0 (
echo "Failed to build MDANSE API"
exit %STATUS%
)
%PYTHON_EXE% setup.py build_help
set STATUS=%ERRORLEVEL% set STATUS=%ERRORLEVEL%
rem Exit now if unable to build rem Exit now if unable to build
if %STATUS% neq 0 ( if %STATUS% neq 0 (
echo "Failed to build MDANSE embedded documentation" echo "Failed to build MDANSE Documentation"
exit %STATUS%
)
%PYTHON_EXE% setup.py install
rem Exit now if unable to install
if %STATUS% neq 0 (
echo "Failed to install MDANSE"
exit %STATUS% exit %STATUS%
) )
......
...@@ -234,6 +234,7 @@ if sphinx: ...@@ -234,6 +234,7 @@ if sphinx:
for builder in builders: for builder in builders:
self.builder_target_dir = os.path.join(self.build_dir, builder) self.builder_target_dir = os.path.join(self.build_dir, builder)
sphinx.setup_command.BuildDoc.finalize_options(self)
sphinx.setup_command.BuildDoc.run(self) sphinx.setup_command.BuildDoc.run(self)
sys.path.pop(0) sys.path.pop(0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment