diff --git a/.github/actions/build-test/action.yml b/.github/actions/build-test/action.yml index 00b79b9c71..9edac9dbad 100644 --- a/.github/actions/build-test/action.yml +++ b/.github/actions/build-test/action.yml @@ -5,10 +5,6 @@ inputs: description: The docker stage that will be used as the docker image for testing. required: true default: '' - hdf5: - description: Information about which version of HDF5 will be used for testing. - required: true - default: '' runs: using: "composite" steps: @@ -22,9 +18,6 @@ runs: if [[ "${{ inputs.stage }}" == "dagmc" ]]; then export ADD_FLAG="${ADD_FLAG} --dagmc /root/opt/dagmc" fi - if [[ "${{ inputs.hdf5 }}" == "_hdf5" ]]; then - export ADD_FLAG="${ADD_FLAG} --hdf5 /root/opt/hdf5/hdf5-1_14_3" - fi export ADD_FLAG="${ADD_FLAG} " echo "ADD_FLAG=${ADD_FLAG}" >> $GITHUB_ENV @@ -32,7 +25,7 @@ runs: shell: bash -l {0} run: | cd $GITHUB_WORKSPACE - python setup.py install --user --clean ${{ env.ADD_FLAG}} + python setup.py install --user --clean --hdf5 /root/opt/hdf5/hdf5-1_14_3 ${{ env.ADD_FLAG}} export PATH="$PATH:/github/home/.local/bin" cd ../ nuc_data_make diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 4fba83663e..60adf34262 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -45,4 +45,3 @@ jobs: uses: ./.github/actions/build-test with: stage: ${{ matrix.stage }} - hdf5: ${{ matrix.hdf5 }} diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index a66fb32131..1aca3b9085 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -7,12 +7,10 @@ on: paths: - 'docker/*' - '.github/workflows/docker_publish.yml' - - '.github/actions/build-test/action.yml' push: paths: - 'docker/*' - '.github/workflows/docker_publish.yml' - - '.github/actions/build-test/action.yml' env: DOCKER_IMAGE_BASENAME: ghcr.io/${{ github.repository_owner }}/pyne_ubuntu_22.04_py3 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 51e9864e8b..97175f07cb 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,7 @@ Next Version * new download location for KAERI data archive * do not try to download missing (super heavy) data from KAERI * update material_library writing interface + * reference python_executable rather than assuming `python` exists () v0.7.8 ====== diff --git a/scripts/ubuntu.sh b/scripts/ubuntu.sh index 09b2fa7233..c175fa6a9d 100644 --- a/scripts/ubuntu.sh +++ b/scripts/ubuntu.sh @@ -13,14 +13,12 @@ apt_package_list="software-properties-common \ gfortran \ libblas-dev \ liblapack-dev \ - libeigen3-dev \ - libhdf5-dev \ - hdf5-tools" + libeigen3-dev" # list of python package required for PyNE and its depedencies (installed using pip3 python package manager) pip_package_list="numpy==1.23 \ scipy \ - \'cython<3\' \ + cython \ nose \ pytest \ tables \ @@ -60,8 +58,7 @@ echo "export PATH=$HOME/.local/bin:\$PATH" >> ~/.bashrc # build HDF5 if necessary build_hdf5=$2 hdf5_libdir=$HOME/opt/hdf5/$build_hdf5 -if [ $build_hdf5 != "NO" ]; then \ - cd $install_dir \ +cd $install_dir \ && mkdir hdf5 \ && cd hdf5 \ && git clone --single-branch --branch $build_hdf5 https://github.com/HDFGroup/hdf5.git \ @@ -70,35 +67,26 @@ if [ $build_hdf5 != "NO" ]; then \ && make -j 3 \ && make install \ && cd .. \ - && rm -rf hdf5; \ -fi + && rm -rf hdf5; # put HDF5 on the path export LD_LIBRARY_PATH=$hdf5_libdir/lib:$LD_LIBRARY_PATH export LIBRARY_PATH=$hdf5_libdir/lib:$LIBRARY_PATH -# # need to put libhdf5.so on LD_LIBRARY_PATH (Making sure that LD_LIBRARY_PATH is defined first) -# if [ -z $LD_LIBRARY_PATH ]; then -# export LD_LIBRARY_PATH="${hdf5_libdir}" -# else -# export LD_LIBRARY_PATH="${hdf5_libdir}:$LD_LIBRARY_PATH" -# fi - +export PYNE_HDF5_ARGS="--hdf5 ${hdf5_libdir}"; \ ############ ### MOAB ### ############ # pre-setup -export MOAB_HDF5_ARGS="" -if [ $build_hdf5 != "NO" ]; then \ - export MOAB_HDF5_ARGS="-DHDF5_ROOT=$hdf5_libdir"; \ -fi +export MOAB_HDF5_ARGS="-DHDF5_ROOT=$hdf5_libdir" cd ${install_dir} check_repo moab mkdir -p moab cd moab # clone and version -git clone --depth 1 --single-branch -b 5.3.0 https://bitbucket.org/fathomteam/moab moab-repo +export moab_version=5.5.1 +git clone --depth 1 --single-branch -b ${moab_version} https://bitbucket.org/fathomteam/moab moab-repo cd moab-repo mkdir -p build cd build @@ -121,6 +109,7 @@ rm -rf moab-repo # Adding MOAB/lib to $LD_LIBRARY_PATH and $LIBRARY_PATH export LD_LIBRARY_PATH="${install_dir}/moab/lib:$LD_LIBRARY_PATH" export LIBRARY_PATH="${install_dir}/moab/lib:$LIBRARY_PATH" +export PYNE_MOAB_ARGS="--moab $HOME/opt/moab" ############# ### DAGMC ### @@ -154,6 +143,7 @@ rm -rf dagmc-repo # Adding DAGMC/lib to $LD_LIBRARY_PATH and $LIBRARY_PATH export LD_LIBRARY_PATH="${install_dir}/dagmc/lib:$LD_LIBRARY_PATH" +export PYNE_DAGMC_ARGS="--dagmc $HOME/opt/dagmc" # Adding dagmc/bin to $PATH export PATH="${install_dir}/dagmc/bin:$PATH" @@ -161,13 +151,11 @@ export PATH="${install_dir}/dagmc/bin:$PATH" #################### ### OpenMC API ##### #################### -if [ $build_hdf5 != "NO" ]; then \ - export HDF5_ROOT="$hdf5_libdir"; \ -fi +export HDF5_ROOT="$hdf5_libdir" +export openmc_version=v0.14.0 cd ${install_dir} -git clone https://github.com/openmc-dev/openmc.git +git clone --depth 1 --branch ${openmc_version} https://github.com/openmc-dev/openmc.git cd openmc -git checkout tags/v0.13.0 pip install --user . ############ @@ -175,10 +163,6 @@ pip install --user . ############ # pre-setup -export PYNE_HDF5_ARGS="" -if [ $build_hdf5 != "NO" ]; then \ - export PYNE_HDF5_ARGS="--hdf5 ${hdf5_libdir}"; \ -fi cd ${install_dir} check_repo pyne mkdir -p pyne @@ -192,8 +176,8 @@ if [ $1 == 'stable' ] ; then fi python setup.py install --user \ - --moab ${install_dir}/moab \ - --dagmc ${install_dir}/dagmc \ + ${PYNE_MOAB_ARGS} \ + ${PYNE_DAGMC_ARGS} \ ${PYNE_HDF5_ARGS} \ --clean -j 3 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cbd62cd2d5..f18ca5e88c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ set(PYNE_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}" ${PYNE_INCLUDE_DIRS} PARENT_SCOPE) -execute_process(COMMAND python "${CMAKE_CURRENT_LIST_DIR}/../pyne/pyne_version.py" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) +execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_LIST_DIR}/../pyne/pyne_version.py" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) pyne_download_platform() include_directories("${CMAKE_CURRENT_SOURCE_DIR}")