OpenMC/setup.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

83 lines
2.6 KiB
Python
Raw Permalink Normal View History

#!/usr/bin/env python
import glob
import sys
2016-10-14 22:52:06 -04:00
import numpy as np
2017-10-13 16:21:34 -05:00
from setuptools import setup, find_packages
2022-10-06 14:55:01 +01:00
from Cython.Build import cythonize
# Determine shared library suffix
if sys.platform == 'darwin':
suffix = 'dylib'
else:
suffix = 'so'
# Get version information from __init__.py. This is ugly, but more reliable than
# using an import.
with open('openmc/__init__.py', 'r') as f:
version = f.readlines()[-1].split()[-1].strip("'")
2017-09-29 11:11:18 -05:00
kwargs = {
'name': 'openmc',
'version': version,
'packages': find_packages(exclude=['tests*']),
2017-09-29 11:11:18 -05:00
'scripts': glob.glob('scripts/openmc-*'),
2022-03-03 23:06:37 -08:00
# Data files and libraries
2017-10-02 14:06:14 -05:00
'package_data': {
2019-09-05 07:31:13 -05:00
'openmc.lib': ['libopenmc.{}'.format(suffix)],
2022-10-26 18:33:26 +01:00
'openmc.data': ['mass_1.mas20.txt', 'BREMX.DAT', 'half_life.json', '*.h5'],
2020-05-26 11:33:36 -05:00
'openmc.data.effective_dose': ['*.txt']
2017-10-02 14:06:14 -05:00
},
2017-10-02 14:06:14 -05:00
# Metadata
2017-10-13 16:21:34 -05:00
'author': 'The OpenMC Development Team',
'author_email': 'openmc@anl.gov',
2017-10-13 16:21:34 -05:00
'description': 'OpenMC',
'url': 'https://openmc.org',
'download_url': 'https://github.com/openmc-dev/openmc/releases',
'project_urls': {
'Issue Tracker': 'https://github.com/openmc-dev/openmc/issues',
'Documentation': 'https://docs.openmc.org',
'Source Code': 'https://github.com/openmc-dev/openmc',
},
2017-09-29 11:11:18 -05:00
'classifiers': [
2017-10-02 14:06:14 -05:00
'Development Status :: 4 - Beta',
2017-09-29 11:11:18 -05:00
'Intended Audience :: Developers',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Topic :: Scientific/Engineering'
'Programming Language :: C++',
2017-10-02 14:06:14 -05:00
'Programming Language :: Python :: 3',
2022-10-06 15:57:48 +01:00
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
2021-07-19 16:13:10 -05:00
'Programming Language :: Python :: 3.9',
2022-10-04 21:00:17 +01:00
'Programming Language :: Python :: 3.10',
2023-03-21 07:14:07 -05:00
'Programming Language :: Python :: 3.11',
2017-09-29 11:11:18 -05:00
],
# Dependencies
2022-10-06 15:57:48 +01:00
'python_requires': '>=3.7',
2017-10-13 16:21:34 -05:00
'install_requires': [
'numpy>=1.9', 'h5py', 'scipy', 'ipython', 'matplotlib',
'pandas', 'lxml', 'uncertainties'
2017-10-13 16:21:34 -05:00
],
2017-09-29 11:11:18 -05:00
'extras_require': {
'depletion-mpi': ['mpi4py'],
'docs': ['sphinx', 'sphinxcontrib-katex', 'sphinx-numfig', 'jupyter',
'sphinxcontrib-svg2pdfconverter', 'sphinx-rtd-theme'],
'test': ['pytest', 'pytest-cov', 'colorama', 'openpyxl'],
2018-10-07 18:35:40 -05:00
'vtk': ['vtk'],
2017-09-29 11:11:18 -05:00
},
2022-10-06 14:55:01 +01:00
# Cython is used to add resonance reconstruction and fast float_endf
'ext_modules': cythonize('openmc/data/*.pyx'),
'include_dirs': [np.get_include()]
2017-09-29 11:11:18 -05:00
}
setup(**kwargs)