Install statepoint.py script using distutils.

This commit is contained in:
Paul Romano 2014-01-20 19:58:59 -05:00
parent 60db2adf4a
commit 9b2741e1ab
3 changed files with 21 additions and 1 deletions

View file

@ -173,3 +173,10 @@ install(PROGRAMS utils/statepoint_meshplot.py
RENAME statepoint_meshplot)
install(FILES ../man/man1/openmc.1 DESTINATION share/man/man1)
install(FILES ../LICENSE DESTINATION "share/doc/${program}/copyright")
find_package(PythonInterp)
if(PYTHONINTERP_FOUND)
install(CODE "execute_process(
COMMAND ${PYTHON_EXECUTABLE} setup.py install --user
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/utils)")
endif()

View file

@ -6,5 +6,7 @@ clean:
make -s -C build clean
distclean:
rm -fr build
install:
make -s -C build install
.PHONY: all clean distclean
.PHONY: all clean distclean install

11
src/utils/setup.py Normal file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env python
from distutils.core import setup
setup(name='statepoint',
version='0.5.4',
description='OpenMC StatePoint',
author='Paul Romano',
author_email='paul.k.romano@gmail.com',
url='https://github.com/mit-crpg/openmc',
py_modules=['statepoint'])