From 18695c2878a0750814af0e4a7d9ace0da9bdebd8 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 29 Jan 2018 16:30:57 -0600 Subject: [PATCH] Don't install Python package from CMakeLists.txt --- CMakeLists.txt | 16 ---------------- tools/ci/travis-install.py | 6 +++--- tools/ci/travis-install.sh | 6 +++--- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78db0ab453..7ab012ef6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -506,19 +506,3 @@ install(TARGETS ${program} libopenmc install(DIRECTORY src/relaxng DESTINATION share/openmc) install(FILES man/man1/openmc.1 DESTINATION share/man/man1) install(FILES LICENSE DESTINATION "share/doc/${program}" RENAME copyright) - -find_package(PythonInterp) -if(PYTHONINTERP_FOUND) - if(debian) - install(CODE "execute_process( - COMMAND ${PYTHON_EXECUTABLE} setup.py install - --root=debian/openmc --install-layout=deb - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})") - else() - install(CODE "set(ENV{PYTHONPATH} \"${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages\")") - install(CODE "execute_process( - COMMAND ${PYTHON_EXECUTABLE} setup.py install - --prefix=${CMAKE_INSTALL_PREFIX} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})") - endif() -endif() diff --git a/tools/ci/travis-install.py b/tools/ci/travis-install.py index 8fda09b093..bd7f886dbc 100644 --- a/tools/ci/travis-install.py +++ b/tools/ci/travis-install.py @@ -49,9 +49,9 @@ def install(omp=False, mpi=False, phdf5=False): # Build and install cmake_cmd.append('..') print(' '.join(cmake_cmd)) - subprocess.call(cmake_cmd) - subprocess.call(['make', '-j']) - subprocess.call(['sudo', 'make', 'install']) + subprocess.check_call(cmake_cmd) + subprocess.check_call(['make', '-j']) + subprocess.check_call(['sudo', 'make', 'install']) def main(): diff --git a/tools/ci/travis-install.sh b/tools/ci/travis-install.sh index 3ee54af76c..3723315a4e 100755 --- a/tools/ci/travis-install.sh +++ b/tools/ci/travis-install.sh @@ -20,8 +20,8 @@ if [[ "$TRAVIS_PYTHON_VERSION" == "3.4" ]]; then pip install pandas==0.20.3 fi -# Build and install +# Build and install OpenMC executable python tools/ci/travis-install.py -# Install OpenMC in editable mode -pip install -e .[test] +# Install Python API +pip install .[test]