2014-01-20 19:58:59 -05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
2015-05-23 11:16:12 +07:00
|
|
|
import glob
|
2017-06-09 11:58:14 -05:00
|
|
|
import sys
|
2016-10-14 22:52:06 -04:00
|
|
|
import numpy as np
|
2014-01-20 19:58:59 -05:00
|
|
|
|
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
|
2016-02-24 11:01:12 -06:00
|
|
|
|
2017-05-01 12:17:09 -05:00
|
|
|
|
2017-06-09 11:58:14 -05:00
|
|
|
# Determine shared library suffix
|
|
|
|
|
if sys.platform == 'darwin':
|
|
|
|
|
suffix = 'dylib'
|
|
|
|
|
else:
|
|
|
|
|
suffix = 'so'
|
|
|
|
|
|
2017-05-01 12:17:09 -05:00
|
|
|
# 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,
|
2018-01-28 15:57:52 -06:00
|
|
|
'packages': find_packages(exclude=['tests*']),
|
2017-09-29 11:11:18 -05:00
|
|
|
'scripts': glob.glob('scripts/openmc-*'),
|
2015-05-23 11:16:12 +07:00
|
|
|
|
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-06-09 11:58: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',
|
2022-01-19 19:11:46 -06:00
|
|
|
'author_email': 'openmc@anl.gov',
|
2017-10-13 16:21:34 -05:00
|
|
|
'description': 'OpenMC',
|
2019-05-23 08:24:39 -05:00
|
|
|
'url': 'https://openmc.org',
|
|
|
|
|
'download_url': 'https://github.com/openmc-dev/openmc/releases',
|
|
|
|
|
'project_urls': {
|
|
|
|
|
'Issue Tracker': 'https://github.com/openmc-dev/openmc/issues',
|
2020-05-15 10:58:00 -05:00
|
|
|
'Documentation': 'https://docs.openmc.org',
|
2019-05-23 08:24:39 -05:00
|
|
|
'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'
|
2019-05-23 08:24:39 -05:00
|
|
|
'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',
|
2018-09-02 15:15:28 -05:00
|
|
|
'Programming Language :: Python :: 3.7',
|
2020-05-15 10:58:00 -05:00
|
|
|
'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
|
|
|
],
|
2015-05-23 11:16:12 +07:00
|
|
|
|
2019-05-23 08:24:39 -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': [
|
2024-03-23 17:29:09 -05:00
|
|
|
'numpy>=1.9', 'h5py', 'scipy', 'ipython', 'matplotlib',
|
2017-11-08 10:24:22 -06:00
|
|
|
'pandas', 'lxml', 'uncertainties'
|
2017-10-13 16:21:34 -05:00
|
|
|
],
|
2017-09-29 11:11:18 -05:00
|
|
|
'extras_require': {
|
2020-05-15 10:58:00 -05:00
|
|
|
'depletion-mpi': ['mpi4py'],
|
2020-06-16 16:09:23 -05:00
|
|
|
'docs': ['sphinx', 'sphinxcontrib-katex', 'sphinx-numfig', 'jupyter',
|
2021-06-18 15:40:30 +07:00
|
|
|
'sphinxcontrib-svg2pdfconverter', 'sphinx-rtd-theme'],
|
2024-01-19 15:32:43 -06:00
|
|
|
'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
|
|
|
}
|
2015-06-01 08:37:01 +07:00
|
|
|
|
|
|
|
|
setup(**kwargs)
|