Loading CMakeLists.txt +14 −24 Original line number Diff line number Diff line Loading @@ -51,10 +51,10 @@ endfunction(find_python_module) if(NOT "find_python_module(PyQt4)") if(UNIX AND NOT APPLE) SET(MAKE_INSTALL_DIR_COMMAND "mkdir -p ${CMAKE_CURRENT_BINARY_DIR}" ) if(UNIX AND NOT APPLE) SET(PYTHON_CONFIGURE_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/cmake/bundle/linux/Miniconda2-latest-Linux-x86_64.sh -b -u -p ${CMAKE_CURRENT_BINARY_DIR}/conda" ) Loading @@ -62,19 +62,7 @@ if(NOT "find_python_module(PyQt4)") "${CMAKE_CURRENT_BINARY_DIR}/conda/bin/pip install -r ${CMAKE_CURRENT_SOURCE_DIR}/cmake/bundle/linux/requirements.txt --no-index --find-links file://${CMAKE_CURRENT_SOURCE_DIR}/cmake/bundle/linux" ) MESSAGE("Building Python via Miniconda") execute_process( COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/conda COMMAND bash -c ${PYTHON_CONFIGURE_COMMAND} OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/miniconda.log ) execute_process( COMMAND bash -c ${PYTHON_UPDATE_COMMAND} OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/update_miniconda.log ) else() SET(MAKE_INSTALL_DIR_COMMAND "mkdir -p ${CMAKE_CURRENT_BINARY_DIR}" ) SET(PYTHON_CONFIGURE_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/cmake/bundle/macos/Miniconda2-latest-MacOSX-x86_64.sh -b -u -p ${CMAKE_CURRENT_BINARY_DIR}/conda" ) Loading @@ -82,6 +70,7 @@ if(NOT "find_python_module(PyQt4)") "${CMAKE_CURRENT_BINARY_DIR}/conda/bin/pip install -r ${CMAKE_CURRENT_BINARY_DIR}/cmake/bundle/macos/requirements.txt --no-index --find-links file://${CMAKE_CURRENT_BINARY_DIR}/cmake/bundle/macos" ) MESSAGE("bash -c ${PYTHON_CONFIGURE_COMMAND}") endif() execute_process( COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/conda COMMAND bash -c ${PYTHON_CONFIGURE_COMMAND} Loading @@ -92,10 +81,11 @@ if(NOT "find_python_module(PyQt4)") OUTPUT_FILE${CMAKE_CURRENT_BINARY_DIR}/update_miniconda.log ) endif() endif() INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/conda DESTINATION ${CMAKE_INSTALL_PREFIX} USE_SOURCE_PERMISSIONS ) INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SubKit DESTINATION ${CMAKE_INSTALL_PREFIX} USE_SOURCE_PERMISSIONS ) INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/wasp DESTINATION ${CMAKE_INSTALL_PREFIX}/SubKit USE_SOURCE_PERMISSIONS ) INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/MANIFEST.in ${CMAKE_CURRENT_BINARY_DIR}/setup.py DESTINATION ${CMAKE_INSTALL_PREFIX} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ WORLD_WRITE) #INSTALL( FILES ${CMAKE_CURRENT_SOURCE_DIR}/runctf.sh DESTINATION ${CMAKE_INSTALL_PREFIX}/bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE ) add_subdirectory(tests) add_subdirectory(SubKit/build/workbench) doc/index.rst +61 −22 Original line number Diff line number Diff line Loading @@ -45,47 +45,86 @@ This documentation covers the following: Installation ************ The benefits of installing SubKit are: 1. All command-line tools will be available (used for building input files and post-processing simulation results), 2. When developing a script that will create an input through scripting mode, the SubKit modules can be imported without needing to append the Python path. SubKit is a Python package, but it does have a dependency on the Workbench Analysis Sequence Processor (WASP). To summarize: (WASP), which is a c++ code that must be compiled prior to installing SubKit. The WASP package and its dependencies have been conveniently snapshotted into SubKit so they will be available during the configure and build. To install, the user needs to have: 1. CMake (at least 2.8.11), 2. C++ compiler (at least version 5.4.0 of the GNU compilers will work). After these dependencies are met, the user should perform the following steps. Examples are given for a Unix-type environment and assume that the SubKit source is located in the user's home directory. 1. Create a build directory .. code-block:: bash mkdir ~/subkit_build 2. Copy the configure found in ``~/SubKit/config.sh`` to the build directory. The default install location will be ``~/subkit_build/install``. The config.sh file may be edited to change this location. 1. If only using scripting model scripting mode, the user only needs to install SubKit. 2. If using scripting mode and/or input mode, the user needs to install both WASP and SubKit. .. code-block:: bash If WASP will be installed, it is **critical** that it be installed according to these instructions before installing SubKit. cd ~/subkit_build cp ~/SubKit/config.sh . WASP ==== 3. Execute the configure file. WASP has conveniently been snapshot into this repository. To build, the user must have: .. code-block:: bash 1. cmake (tested for version 3.6.0) 2. A c++ compiler that supports C++ 11 ./config.sh Build instructions are as follows: 4. Run make install .. code-block:: bash cd <base_dir>/SubKit/wasp mkdir build cd build ln -s ../config.sh ./config.sh ../wasp make -j4 install SubKit ========= 5. After the install is finished, enter the install directory and run pip install to install SubKit to the Python site-packages directory. Prerequesites are : SubKit comes with its own Miniconda python environment for those users who do not have a Python interpreter installed on their system or who do not have an internet connection for installing module dependencies. If using this Python environment, SubKit can be installed as: .. code-block:: bash 1. Python 2.7 cd ~/subkit_build/install conda/bin/pip install . To install: If SubKit was installed in this way, the command line tools will be located in ``~/subkit_build/install/conda/bin`` after the install completes. This path can be added to the user's path to make them available at the command line. Additionally, the user will have to use the Python executable found in ``~/subkit_build/install/conda/bin/python`` when executing scripts that use SubKit so that the module may be found. Alternatively, instead of using the Python environment packaged with SubKit, the user may simply use their default Python interpreter installed on their system to do the install by specifying the following: .. code-block:: bash pip install <base_dir>/SubKit cd ~/subkit_build/install pip install . If SubKit is being installed to a system where the user does not have root privileges, the ``--user`` option can be added to the ``pip install`` command to do the install in the user's local home directory. If using the ``--user`` option, the user may still need to add the command line tools path to their user path. The location of Python site-packages on the user's system can be found by typing: .. code-block:: bash python -m site ***************** Loading Loading
CMakeLists.txt +14 −24 Original line number Diff line number Diff line Loading @@ -51,10 +51,10 @@ endfunction(find_python_module) if(NOT "find_python_module(PyQt4)") if(UNIX AND NOT APPLE) SET(MAKE_INSTALL_DIR_COMMAND "mkdir -p ${CMAKE_CURRENT_BINARY_DIR}" ) if(UNIX AND NOT APPLE) SET(PYTHON_CONFIGURE_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/cmake/bundle/linux/Miniconda2-latest-Linux-x86_64.sh -b -u -p ${CMAKE_CURRENT_BINARY_DIR}/conda" ) Loading @@ -62,19 +62,7 @@ if(NOT "find_python_module(PyQt4)") "${CMAKE_CURRENT_BINARY_DIR}/conda/bin/pip install -r ${CMAKE_CURRENT_SOURCE_DIR}/cmake/bundle/linux/requirements.txt --no-index --find-links file://${CMAKE_CURRENT_SOURCE_DIR}/cmake/bundle/linux" ) MESSAGE("Building Python via Miniconda") execute_process( COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/conda COMMAND bash -c ${PYTHON_CONFIGURE_COMMAND} OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/miniconda.log ) execute_process( COMMAND bash -c ${PYTHON_UPDATE_COMMAND} OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/update_miniconda.log ) else() SET(MAKE_INSTALL_DIR_COMMAND "mkdir -p ${CMAKE_CURRENT_BINARY_DIR}" ) SET(PYTHON_CONFIGURE_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/cmake/bundle/macos/Miniconda2-latest-MacOSX-x86_64.sh -b -u -p ${CMAKE_CURRENT_BINARY_DIR}/conda" ) Loading @@ -82,6 +70,7 @@ if(NOT "find_python_module(PyQt4)") "${CMAKE_CURRENT_BINARY_DIR}/conda/bin/pip install -r ${CMAKE_CURRENT_BINARY_DIR}/cmake/bundle/macos/requirements.txt --no-index --find-links file://${CMAKE_CURRENT_BINARY_DIR}/cmake/bundle/macos" ) MESSAGE("bash -c ${PYTHON_CONFIGURE_COMMAND}") endif() execute_process( COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/conda COMMAND bash -c ${PYTHON_CONFIGURE_COMMAND} Loading @@ -92,10 +81,11 @@ if(NOT "find_python_module(PyQt4)") OUTPUT_FILE${CMAKE_CURRENT_BINARY_DIR}/update_miniconda.log ) endif() endif() INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/conda DESTINATION ${CMAKE_INSTALL_PREFIX} USE_SOURCE_PERMISSIONS ) INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SubKit DESTINATION ${CMAKE_INSTALL_PREFIX} USE_SOURCE_PERMISSIONS ) INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/wasp DESTINATION ${CMAKE_INSTALL_PREFIX}/SubKit USE_SOURCE_PERMISSIONS ) INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/MANIFEST.in ${CMAKE_CURRENT_BINARY_DIR}/setup.py DESTINATION ${CMAKE_INSTALL_PREFIX} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ WORLD_WRITE) #INSTALL( FILES ${CMAKE_CURRENT_SOURCE_DIR}/runctf.sh DESTINATION ${CMAKE_INSTALL_PREFIX}/bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE ) add_subdirectory(tests) add_subdirectory(SubKit/build/workbench)
doc/index.rst +61 −22 Original line number Diff line number Diff line Loading @@ -45,47 +45,86 @@ This documentation covers the following: Installation ************ The benefits of installing SubKit are: 1. All command-line tools will be available (used for building input files and post-processing simulation results), 2. When developing a script that will create an input through scripting mode, the SubKit modules can be imported without needing to append the Python path. SubKit is a Python package, but it does have a dependency on the Workbench Analysis Sequence Processor (WASP). To summarize: (WASP), which is a c++ code that must be compiled prior to installing SubKit. The WASP package and its dependencies have been conveniently snapshotted into SubKit so they will be available during the configure and build. To install, the user needs to have: 1. CMake (at least 2.8.11), 2. C++ compiler (at least version 5.4.0 of the GNU compilers will work). After these dependencies are met, the user should perform the following steps. Examples are given for a Unix-type environment and assume that the SubKit source is located in the user's home directory. 1. Create a build directory .. code-block:: bash mkdir ~/subkit_build 2. Copy the configure found in ``~/SubKit/config.sh`` to the build directory. The default install location will be ``~/subkit_build/install``. The config.sh file may be edited to change this location. 1. If only using scripting model scripting mode, the user only needs to install SubKit. 2. If using scripting mode and/or input mode, the user needs to install both WASP and SubKit. .. code-block:: bash If WASP will be installed, it is **critical** that it be installed according to these instructions before installing SubKit. cd ~/subkit_build cp ~/SubKit/config.sh . WASP ==== 3. Execute the configure file. WASP has conveniently been snapshot into this repository. To build, the user must have: .. code-block:: bash 1. cmake (tested for version 3.6.0) 2. A c++ compiler that supports C++ 11 ./config.sh Build instructions are as follows: 4. Run make install .. code-block:: bash cd <base_dir>/SubKit/wasp mkdir build cd build ln -s ../config.sh ./config.sh ../wasp make -j4 install SubKit ========= 5. After the install is finished, enter the install directory and run pip install to install SubKit to the Python site-packages directory. Prerequesites are : SubKit comes with its own Miniconda python environment for those users who do not have a Python interpreter installed on their system or who do not have an internet connection for installing module dependencies. If using this Python environment, SubKit can be installed as: .. code-block:: bash 1. Python 2.7 cd ~/subkit_build/install conda/bin/pip install . To install: If SubKit was installed in this way, the command line tools will be located in ``~/subkit_build/install/conda/bin`` after the install completes. This path can be added to the user's path to make them available at the command line. Additionally, the user will have to use the Python executable found in ``~/subkit_build/install/conda/bin/python`` when executing scripts that use SubKit so that the module may be found. Alternatively, instead of using the Python environment packaged with SubKit, the user may simply use their default Python interpreter installed on their system to do the install by specifying the following: .. code-block:: bash pip install <base_dir>/SubKit cd ~/subkit_build/install pip install . If SubKit is being installed to a system where the user does not have root privileges, the ``--user`` option can be added to the ``pip install`` command to do the install in the user's local home directory. If using the ``--user`` option, the user may still need to add the command line tools path to their user path. The location of Python site-packages on the user's system can be found by typing: .. code-block:: bash python -m site ***************** Loading