Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wheel building with scikit build core #3087

Open
wants to merge 112 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
e9101ab
draft scikit build core wheel
shimwell Jul 19, 2024
e857f45
renamed executable
shimwell Jul 19, 2024
61b7035
linking libopenmc with openmc in cmakelists
jon-proximafusion Jul 19, 2024
12cb43d
Merge branch 'scikit_build_core_wheel' of github.com:shimwell/openmc …
jon-proximafusion Jul 19, 2024
2541d50
updated docs for pip install that compiles
jon-proximafusion Jul 19, 2024
f15e80f
pip install with cmake args in ci
jon-proximafusion Jul 23, 2024
3c98d8a
added missing ,
jon-proximafusion Jul 23, 2024
0aafd44
no need for manual creation of build dir
jon-proximafusion Jul 23, 2024
12b4221
[skip ci] merged develop
shimwell Jul 26, 2024
9ef3beb
[skip ci] adding apt packages for read the docs
shimwell Jul 26, 2024
40ceaad
[skip ci] trying ubuntu 22.04
shimwell Jul 26, 2024
2c8cf71
[skip ci] added missing s
shimwell Jul 26, 2024
4c0075f
adding gha actions
shimwell Jul 26, 2024
4de0d94
upper case ON for cmake args
shimwell Jul 26, 2024
688d688
added quotes to cmake args
shimwell Jul 26, 2024
07a4dcd
keeping same filename
shimwell Jul 26, 2024
9253977
running just pytest
shimwell Jul 26, 2024
1f01694
[skip ci] corrected cmake arg passing example
shimwell Jul 26, 2024
6850217
added diagnosis prints
shimwell Jul 27, 2024
a601de8
Merge branch 'scikit_build_core_wheel' of github.com:shimwell/openmc …
shimwell Jul 27, 2024
97a3f22
removed 2nd pip install which was overwritting
shimwell Jul 27, 2024
3ae207d
Merge branch 'develop' into scikit_build_core_wheel
shimwell Aug 14, 2024
e40cf3b
merge in develop
shimwell Aug 14, 2024
0213392
matching simulation results from ci
jon-proximafusion Aug 14, 2024
6e3e47e
using debug instead of on for DCMAKE_BUILD_TYPE
shimwell Sep 12, 2024
b4b4e3a
scikit-build-core added
ahnaf-tahmid-chowdhury Sep 17, 2024
79ae016
Add rpath
ahnaf-tahmid-chowdhury Sep 20, 2024
394b0f9
Install by scikit-build-core
ahnaf-tahmid-chowdhury Sep 24, 2024
12aec22
update python install doc
ahnaf-tahmid-chowdhury Sep 24, 2024
564cb5f
add support for dev mode
ahnaf-tahmid-chowdhury Sep 24, 2024
1f1faca
update dev doc with skbuild support
ahnaf-tahmid-chowdhury Sep 24, 2024
f4e0faa
Merge branch 'openmc-dev:develop' into scikit_build_core_wheel
shimwell Sep 24, 2024
f88e5ef
Merge branch 'scikit-build-core' into scikit_build_core_wheel
ahnaf-tahmid-chowdhury Sep 24, 2024
f114265
back to -j4 for make
jon-proximafusion Sep 25, 2024
c577d50
adding cmake args to pip install command
jon-proximafusion Sep 25, 2024
ec7e11f
[skip ci] cmake args actual openmc options
jon-proximafusion Sep 25, 2024
03a6744
add manylinux docker
ahnaf-tahmid-chowdhury Sep 30, 2024
556adbb
add gcc and mpi build
ahnaf-tahmid-chowdhury Sep 30, 2024
ef1ca2f
Add openmc options and add more docs
ahnaf-tahmid-chowdhury Sep 30, 2024
ead096d
install openmpi on openmpi stage
ahnaf-tahmid-chowdhury Sep 30, 2024
8a7362e
add /usr/local/lib64 to path
ahnaf-tahmid-chowdhury Sep 30, 2024
9985fab
add workflow
ahnaf-tahmid-chowdhury Sep 30, 2024
65ae22c
remove setup.py
ahnaf-tahmid-chowdhury Sep 30, 2024
ac5648c
remove test stage
ahnaf-tahmid-chowdhury Oct 1, 2024
db8265f
add pypi
ahnaf-tahmid-chowdhury Oct 1, 2024
a205ef7
move python deps to last
ahnaf-tahmid-chowdhury Oct 1, 2024
7036ec6
fix pytest-cov issue
ahnaf-tahmid-chowdhury Oct 2, 2024
1d8e951
fix pytest-cov issue
ahnaf-tahmid-chowdhury Oct 2, 2024
0043634
no need abi
ahnaf-tahmid-chowdhury Oct 2, 2024
9e65e4a
fix path
ahnaf-tahmid-chowdhury Oct 2, 2024
1985003
move openmc to src
ahnaf-tahmid-chowdhury Oct 3, 2024
303f596
no need to copy lib to openmc
ahnaf-tahmid-chowdhury Oct 3, 2024
1813d6e
remove BUILD_EXAMPLES
ahnaf-tahmid-chowdhury Oct 3, 2024
2cbce3b
python deps stage
ahnaf-tahmid-chowdhury Oct 3, 2024
a88e926
Merge remote-tracking branch 'upstream/develop' into scikit_build_cor…
ahnaf-tahmid-chowdhury Oct 3, 2024
d588670
pip install numpy
ahnaf-tahmid-chowdhury Oct 3, 2024
4b08da7
fail-fast: false
ahnaf-tahmid-chowdhury Oct 3, 2024
db2bb3f
sdist.include = ["src/openmc/**"]
ahnaf-tahmid-chowdhury Oct 3, 2024
63e1b26
set DATAROOTDIR
ahnaf-tahmid-chowdhury Oct 4, 2024
cbca837
add vendor packages
ahnaf-tahmid-chowdhury Oct 4, 2024
995c840
add more dirs
ahnaf-tahmid-chowdhury Oct 4, 2024
d68bac5
CMAKE_INSTALL_DATADIR
ahnaf-tahmid-chowdhury Oct 4, 2024
07126a0
no need OpenMCTargets for skbuild
ahnaf-tahmid-chowdhury Oct 5, 2024
bf0f400
install rpath if var is defined
ahnaf-tahmid-chowdhury Oct 5, 2024
12acf73
eval $(ncrystal-config --setup)
ahnaf-tahmid-chowdhury Oct 5, 2024
bf334ce
sdist include *.h5
ahnaf-tahmid-chowdhury Oct 8, 2024
e3398a4
Merge remote-tracking branch 'upstream/develop' into scikit_build_cor…
ahnaf-tahmid-chowdhury Oct 8, 2024
4e69397
setup openmc lib for skbuild
ahnaf-tahmid-chowdhury Oct 17, 2024
4a69b09
prepare for merge
ahnaf-tahmid-chowdhury Oct 17, 2024
3b80c4c
Merge remote-tracking branch 'upstream/develop' into scikit_build_cor…
ahnaf-tahmid-chowdhury Oct 17, 2024
d0740ce
move openmc to src again
ahnaf-tahmid-chowdhury Oct 17, 2024
fbda530
update lib paths
ahnaf-tahmid-chowdhury Oct 17, 2024
0d3f6f2
add include
ahnaf-tahmid-chowdhury Oct 18, 2024
15e34f9
Merge remote-tracking branch 'upstream/develop' into scikit_build_cor…
ahnaf-tahmid-chowdhury Oct 19, 2024
af0f1d5
add openmc.in
ahnaf-tahmid-chowdhury Oct 19, 2024
e2802f3
use OpenMC targets
ahnaf-tahmid-chowdhury Oct 19, 2024
db1d8d1
install source version
ahnaf-tahmid-chowdhury Oct 19, 2024
7a0a56d
add SKBUILDScripts.cmake
ahnaf-tahmid-chowdhury Oct 20, 2024
8dabae4
update get_core_path
ahnaf-tahmid-chowdhury Oct 20, 2024
b8f634c
add /usr/local/lib/ to lib path
ahnaf-tahmid-chowdhury Oct 20, 2024
73cd266
remove file openmc_exec
ahnaf-tahmid-chowdhury Oct 20, 2024
ea6fab9
remove openmc_exec
ahnaf-tahmid-chowdhury Oct 20, 2024
e519189
Allow CMAKE_INSTALL_RPATH_USE_LINK_PATH
ahnaf-tahmid-chowdhury Oct 20, 2024
32d96e2
renamed to GenerateScript.cmake
ahnaf-tahmid-chowdhury Oct 20, 2024
f52ff64
remove SKBUILDScripts
ahnaf-tahmid-chowdhury Oct 20, 2024
d1f8ae3
revert
ahnaf-tahmid-chowdhury Oct 22, 2024
ddb6c96
update to 1.8
ahnaf-tahmid-chowdhury Oct 22, 2024
c1bcb8c
reduced diff
jon-proximafusion Nov 8, 2024
f7441af
Merge branch 'develop' into scikit_build_core_wheel
jon-proximafusion Nov 8, 2024
6065c69
reducing diff
jon-proximafusion Nov 8, 2024
2217521
prepare for merge
ahnaf-tahmid-chowdhury Nov 27, 2024
26c0367
Merge remote-tracking branch 'upstream/develop' into scikit_build_cor…
ahnaf-tahmid-chowdhury Nov 27, 2024
48b0ee5
mv openmc to src
ahnaf-tahmid-chowdhury Nov 27, 2024
6e8d1af
do not ignore .h5
ahnaf-tahmid-chowdhury Nov 27, 2024
b2abffb
make test
ahnaf-tahmid-chowdhury Nov 30, 2024
3ede515
Exclude src/openmc
ahnaf-tahmid-chowdhury Dec 2, 2024
1806f76
move openmc to python dir
ahnaf-tahmid-chowdhury Dec 3, 2024
d80e7df
python/openmc -> openmc
ahnaf-tahmid-chowdhury Dec 12, 2024
c760abf
Merge remote-tracking branch 'upstream/develop' into scikit_build_cor…
ahnaf-tahmid-chowdhury Dec 12, 2024
79e789b
openmc -> python/openmc
ahnaf-tahmid-chowdhury Dec 12, 2024
97eec30
add load the library from the installed module
ahnaf-tahmid-chowdhury Dec 13, 2024
97b26d0
python/openmc -> openmc
ahnaf-tahmid-chowdhury Dec 13, 2024
aeef2d6
python/openmc -> openmc
ahnaf-tahmid-chowdhury Dec 13, 2024
b0995b8
add fallback
ahnaf-tahmid-chowdhury Dec 13, 2024
e4878ae
rm openmc
ahnaf-tahmid-chowdhury Dec 13, 2024
d1a06fe
Add OPENMC_CORE_BASE_PATH
ahnaf-tahmid-chowdhury Dec 13, 2024
024855a
remove extra check
ahnaf-tahmid-chowdhury Dec 13, 2024
cc1ccfc
run tests on temp dir
ahnaf-tahmid-chowdhury Dec 16, 2024
98698bd
mv openmc python/openmc
ahnaf-tahmid-chowdhury Dec 17, 2024
3317476
rename openmc
ahnaf-tahmid-chowdhury Dec 18, 2024
34a6396
Merge branch 'develop' into scikit_build_core_wheel
jon-proximafusion Jan 9, 2025
e7a8165
fix merge
ahnaf-tahmid-chowdhury Jan 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,7 @@ jobs:

- name: test
shell: bash
run: |
CTEST_OUTPUT_ON_FAILURE=1 make test -C $GITHUB_WORKSPACE/build/
shimwell marked this conversation as resolved.
Show resolved Hide resolved
$GITHUB_WORKSPACE/tools/ci/gha-script.sh
run: $GITHUB_WORKSPACE/tools/ci/gha-script.sh

- name: after_success
shell: bash
Expand Down
7 changes: 6 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
version: 2

build:
os: "ubuntu-20.04"
os: "ubuntu-22.04"
tools:
python: "3.10"
apt_packages:
- g++
- cmake
- libhdf5-dev
- libpng-dev

sphinx:
configuration: docs/source/conf.py
Expand Down
118 changes: 96 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
project(openmc C CXX)

# Set version numbers
Expand All @@ -16,6 +16,11 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Set module path
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)

# Conditionally find Python if building with scikit-build-core
if(SKBUILD)
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
endif()

# Enable correct usage of CXX_EXTENSIONS
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.22)
cmake_policy(SET CMP0128 NEW)
Expand All @@ -36,6 +41,17 @@ option(OPENMC_USE_MCPL "Enable MCPL"
option(OPENMC_USE_NCRYSTAL "Enable support for NCrystal scattering" OFF)
option(OPENMC_USE_UWUW "Enable UWUW" OFF)

message(STATUS "OPENMC_USE_OPENMP ${OPENMC_USE_OPENMP}")
message(STATUS "OPENMC_BUILD_TESTS ${OPENMC_BUILD_TESTS}")
message(STATUS "OPENMC_ENABLE_PROFILE ${OPENMC_ENABLE_PROFILE}")
message(STATUS "OPENMC_ENABLE_COVERAGE ${OPENMC_ENABLE_COVERAGE}")
message(STATUS "OPENMC_USE_DAGMC ${OPENMC_USE_DAGMC}")
message(STATUS "OPENMC_USE_LIBMESH ${OPENMC_USE_LIBMESH}")
message(STATUS "OPENMC_USE_MPI ${OPENMC_USE_MPI}")
message(STATUS "OPENMC_USE_MCPL ${OPENMC_USE_MCPL}")
message(STATUS "OPENMC_USE_NCRYSTAL ${OPENMC_USE_NCRYSTAL}")
message(STATUS "OPENMC_USE_UWUW ${OPENMC_USE_UWUW}")

# Warnings for deprecated options
shimwell marked this conversation as resolved.
Show resolved Hide resolved
foreach(OLD_OPT IN ITEMS "openmp" "profile" "coverage" "dagmc" "libmesh")
if(DEFINED ${OLD_OPT})
Expand Down Expand Up @@ -310,23 +326,58 @@ include(GNUInstallDirs)
# installed one in CMAKE_INSTALL_PREFIX. Ref:
# https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling

# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)

# when building, don't use the install RPATH already
# (but later on when installing)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
if(SKBUILD)
# Find necessary packages
find_package(
Python
COMPONENTS Interpreter
REQUIRED
)
# Scikit-build installs OpenMC to ${SKBUILD_PLATLIB_DIR}/openmc
# So, set bin directory to root environment (install prefix/bin)
set(CMAKE_INSTALL_BINDIR ${SKBUILD_SCRIPTS_DIR})
# Unfortunately, OpenMC has lib directory in the openmc/lib subdirectory
set(CMAKE_INSTALL_LIBDIR lib)
set(SKBUILD_LIB_DIR ${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/openmc/${CMAKE_INSTALL_LIBDIR})

# Auditwheel and Delocate need this when repairing the wheel
# Since OpenMC libs are installed in the openmc/core subdirectory
# Auditwheel and Delocate need this to find the OpenMC libs for openmc.data
# It's a bit of a hack, but it works
set(SKBUILD_REPAIR_WHEEL_PATCH openmc/${CMAKE_INSTALL_LIBDIR})
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
set(OPENMC_LIBRARY_RPATH "@loader_path")
set(OPENMC_PYTHON_MODULE_RPATH "@loader_path/${CMAKE_INSTALL_LIBDIR}")
set(OPENMC_BINARY_RPATH "@loader_path/../${SKBUILD_LIB_DIR};@loader_path/../${SKBUILD_REPAIR_WHEEL_PATCH};@loader_path/../../${SKBUILD_REPAIR_WHEEL_PATCH}")
elseif(UNIX)
set(OPENMC_LIBRARY_RPATH "$ORIGIN")
set(OPENMC_PYTHON_MODULE_RPATH "$ORIGIN/${CMAKE_INSTALL_LIBDIR}")
set(OPENMC_BINARY_RPATH "$ORIGIN/../${SKBUILD_LIB_DIR};$ORIGIN/../${SKBUILD_REPAIR_WHEEL_PATCH};$ORIGIN/../../${SKBUILD_REPAIR_WHEEL_PATCH}")
else()
set(OPENMC_LIBRARY_RPATH OFF)
set(OPENMC_PYTHON_MODULE_RPATH OFF)
set(OPENMC_BINARY_RPATH OFF)
endif()
else()
# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)

# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# when building, don't use the install RPATH already
# (but later on when installing)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

# the RPATH to be used when installing, but only if it's not a system directory
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_FULL_LIBDIR}" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
endif()
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# the RPATH to be used when installing, but only if it's not a system directory
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_FULL_LIBDIR}" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
endif()
endif()
#===============================================================================
# libopenmc
#===============================================================================
Expand Down Expand Up @@ -472,6 +523,14 @@ target_include_directories(libopenmc
# Set compile flags
target_compile_options(libopenmc PRIVATE ${cxxflags})

if(SKBUILD)
set_target_properties(
libopenmc
PROPERTIES
INSTALL_RPATH "${OPENMC_LIBRARY_RPATH}"
)
endif()

# Add include directory for configured version file
target_include_directories(libopenmc
PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
Expand Down Expand Up @@ -577,16 +636,25 @@ target_compile_features(openmc PUBLIC cxx_std_17)
target_compile_features(libopenmc PUBLIC cxx_std_17)
set_target_properties(openmc libopenmc PROPERTIES CXX_EXTENSIONS OFF)

if(SKBUILD)
set_target_properties(
openmc
PROPERTIES
INSTALL_RPATH "${OPENMC_BINARY_RPATH}"
)
endif()

#===============================================================================
# Python package
# Copy libopenmc to Python module directory for development
#===============================================================================

add_custom_command(TARGET libopenmc POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:libopenmc>
${CMAKE_CURRENT_SOURCE_DIR}/openmc/lib/$<TARGET_FILE_NAME:libopenmc>
COMMENT "Copying libopenmc to Python module directory")

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
add_custom_command(TARGET libopenmc POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:libopenmc>
${CMAKE_CURRENT_SOURCE_DIR}/openmc/lib/$<TARGET_FILE_NAME:libopenmc>
COMMENT "Copying libopenmc to Python module directory")
endif()
#===============================================================================
# Install executable, scripts, manpage, license
#===============================================================================
Expand All @@ -606,6 +674,12 @@ install(EXPORT openmc-targets
NAMESPACE OpenMC::
DESTINATION ${INSTALL_CONFIGDIR})

# Collect scripts
file(GLOB SCRIPTS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/*")

# Install scripts to bin directory
install(PROGRAMS ${SCRIPTS} DESTINATION ${CMAKE_INSTALL_BINDIR})

install(FILES
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenMCConfig.cmake"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenMCConfigVersion.cmake"
Expand Down
45 changes: 13 additions & 32 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -195,40 +195,21 @@ ENV LIBMESH_INSTALL_DIR=$HOME/LIBMESH
# clone and install openmc
RUN mkdir -p ${HOME}/OpenMC && cd ${HOME}/OpenMC \
&& git clone --shallow-submodules --recurse-submodules --single-branch -b ${openmc_branch} --depth=1 ${OPENMC_REPO} \
&& mkdir build && cd build ; \
if [ ${build_dagmc} = "on" ] && [ ${build_libmesh} = "on" ]; then \
cmake ../openmc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DOPENMC_USE_MPI=on \
-DHDF5_PREFER_PARALLEL=on \
-DOPENMC_USE_DAGMC=on \
-DOPENMC_USE_LIBMESH=on \
-DCMAKE_PREFIX_PATH="${DAGMC_INSTALL_DIR};${LIBMESH_INSTALL_DIR}" ; \
&& cd openmc ; \
export SKBUILD_CMAKE_ARGS="-DCMAKE_CXX_COMPILER=mpicxx; \
-DOPENMC_USE_MPI=on; \
-DHDF5_PREFER_PARALLEL=on" \
if [ ${build_dagmc} = "on" ]; then \
SKBUILD_CMAKE_ARGS="${SKBUILD_CMAKE_ARGS}; \
-DOPENMC_USE_DAGMC=on; \
-DCMAKE_PREFIX_PATH=${DAGMC_INSTALL_DIR}" ; \
fi ; \
if [ ${build_dagmc} = "on" ] && [ ${build_libmesh} = "off" ]; then \
cmake ../openmc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DOPENMC_USE_MPI=on \
-DHDF5_PREFER_PARALLEL=on \
-DOPENMC_USE_DAGMC=ON \
-DCMAKE_PREFIX_PATH=${DAGMC_INSTALL_DIR} ; \
if [ ${build_libmesh} = "on" ]; then \
SKBUILD_CMAKE_ARGS="${SKBUILD_CMAKE_ARGS}; \
-DOPENMC_USE_LIBMESH=on; \
-DCMAKE_PREFIX_PATH=${LIBMESH_INSTALL_DIR}" ; \
fi ; \
if [ ${build_dagmc} = "off" ] && [ ${build_libmesh} = "on" ]; then \
cmake ../openmc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DOPENMC_USE_MPI=on \
-DHDF5_PREFER_PARALLEL=on \
-DOPENMC_USE_LIBMESH=on \
-DCMAKE_PREFIX_PATH=${LIBMESH_INSTALL_DIR} ; \
fi ; \
if [ ${build_dagmc} = "off" ] && [ ${build_libmesh} = "off" ]; then \
cmake ../openmc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DOPENMC_USE_MPI=on \
-DHDF5_PREFER_PARALLEL=on ; \
fi ; \
make 2>/dev/null -j${compile_cores} install \
&& cd ../openmc && pip install .[test,depletion-mpi] \
pip -v install .[test,depletion-mpi] \
shimwell marked this conversation as resolved.
Show resolved Hide resolved
&& python -c "import openmc"

FROM build AS release
Expand Down
48 changes: 0 additions & 48 deletions MANIFEST.in

This file was deleted.

21 changes: 10 additions & 11 deletions docs/source/devguide/workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ features and bug fixes. The general steps for contributing are as follows:

.. code-block:: sh

git clone --recurse-submodules [email protected]:yourusername/openmc.git
cd openmc
git checkout -b newbranch develop
git clone --recurse-submodules [email protected]:yourusername/openmc.git
cd openmc
git checkout -b newbranch develop

3. Run ``tools/dev/install-commit-hooks.sh`` to install a post-commit hook that
runs clang-format on C++ files to apply :ref:`automatic code formatting
Expand Down Expand Up @@ -116,15 +116,14 @@ pip_. From the root directory of the OpenMC repository, run:

.. code-block:: sh

python -m pip install -e .[test]
python -m pip install --no-build-isolation \
-Ceditable.rebuild=true \
-Ccmake.build-type=Debug \
-Cbuild-dir=build \
-ve ".[test]"

This installs the OpenMC Python package in `"editable" mode
<https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs>`_ so that 1)
it can be imported from a Python interpreter and 2) any changes made are
immediately reflected in the installed version (that is, you don't need to keep
reinstalling it). While the same effect can be achieved using the
:envvar:`PYTHONPATH` environment variable, this is generally discouraged as it
can interfere with virtual environments.
This feature allows for rebuilding on initial import, providing
flexibility for iterative development or testing changes to the codebase.

.. _git: http://git-scm.com/
.. _GitHub: https://github.com/
Expand Down
Loading
Loading