forked from openmc-dev/openmc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving most of setup.py to pyproject.toml (openmc-dev#3074)
Co-authored-by: Jon Shimwell <[email protected]> Co-authored-by: Paul Romano <[email protected]>
- Loading branch information
1 parent
cbec1ab
commit 2107af5
Showing
5 changed files
with
80 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,74 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel", "numpy", "cython"] | ||
|
||
[project] | ||
name = "openmc" | ||
authors = [ | ||
{name = "The OpenMC Development Team", email = "[email protected]"}, | ||
] | ||
description = "OpenMC" | ||
version = "0.15.1-dev" | ||
requires-python = ">=3.10" | ||
license = {file = "LICENSE"} | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"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++", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
dependencies = [ | ||
"numpy", | ||
"h5py", | ||
"scipy", | ||
"ipython", | ||
"matplotlib", | ||
"pandas", | ||
"lxml", | ||
"uncertainties", | ||
"setuptools", | ||
] | ||
|
||
[project.optional-dependencies] | ||
depletion-mpi = ["mpi4py"] | ||
docs = [ | ||
"sphinx==5.0.2", | ||
"sphinxcontrib-katex", | ||
"sphinx-numfig", | ||
"jupyter", | ||
"sphinxcontrib-svg2pdfconverter", | ||
"sphinx-rtd-theme==1.0.0" | ||
] | ||
test = ["pytest", "pytest-cov", "colorama", "openpyxl"] | ||
vtk = ["vtk"] | ||
|
||
[project.urls] | ||
Homepage = "https://openmc.org" | ||
Documentation = "https://docs.openmc.org" | ||
Repository = "https://github.com/openmc-dev/openmc" | ||
Issues = "https://github.com/openmc-dev/openmc/issues" | ||
|
||
[tool.setuptools.packages.find] | ||
include = ['openmc*', 'scripts*'] | ||
exclude = ['tests*'] | ||
|
||
[tool.setuptools.package-data] | ||
"openmc.data.effective_dose" = ["*.txt"] | ||
"openmc.data" = ["*.txt", "*.DAT", "*.json", "*.h5"] | ||
"openmc.lib" = ["libopenmc.dylib", "libopenmc.so"] | ||
|
||
[project.scripts] | ||
openmc-ace-to-hdf5 = "scripts.openmc_ace_to_hdf5:main" | ||
openmc-plot-mesh-tally = "scripts.openmc_plot_mesh_tally:main" | ||
openmc-track-combine = "scripts.openmc_track_combine:main" | ||
openmc-track-to-vtk = "scripts.openmc_track_to_vtk:main" | ||
openmc-update-inputs = "scripts.openmc_update_inputs:main" | ||
openmc-update-mgxs = "scripts.openmc_update_mgxs:main" | ||
openmc-voxel-to-vtk = "scripts.openmc_voxel_to_vtk:main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,11 @@ | ||
#!/usr/bin/env python | ||
|
||
import glob | ||
import sys | ||
import numpy as np | ||
|
||
from setuptools import setup, find_packages | ||
from setuptools import setup | ||
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("'") | ||
|
||
kwargs = { | ||
'name': 'openmc', | ||
'version': version, | ||
'packages': find_packages(exclude=['tests*']), | ||
'scripts': glob.glob('scripts/openmc-*'), | ||
|
||
# Data files and libraries | ||
'package_data': { | ||
'openmc.lib': ['libopenmc.{}'.format(suffix)], | ||
'openmc.data': ['mass_1.mas20.txt', 'BREMX.DAT', 'half_life.json', '*.h5'], | ||
'openmc.data.effective_dose': ['*.txt'] | ||
}, | ||
|
||
# Metadata | ||
'author': 'The OpenMC Development Team', | ||
'author_email': '[email protected]', | ||
'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', | ||
}, | ||
'classifiers': [ | ||
'Development Status :: 4 - Beta', | ||
'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++', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
'Programming Language :: Python :: 3.12', | ||
], | ||
|
||
# Dependencies | ||
'python_requires': '>=3.10', | ||
'install_requires': [ | ||
'numpy>=1.9', 'h5py', 'scipy', 'ipython', 'matplotlib', | ||
'pandas', 'lxml', 'uncertainties', 'setuptools' | ||
], | ||
'extras_require': { | ||
'depletion-mpi': ['mpi4py'], | ||
'docs': ['sphinx', 'sphinxcontrib-katex', 'sphinx-numfig', 'jupyter', | ||
'sphinxcontrib-svg2pdfconverter', 'sphinx-rtd-theme'], | ||
'test': ['pytest', 'pytest-cov', 'colorama', 'openpyxl'], | ||
'vtk': ['vtk'], | ||
}, | ||
# Cython is used to add resonance reconstruction and fast float_endf | ||
'ext_modules': cythonize('openmc/data/*.pyx'), | ||
'include_dirs': [np.get_include()] | ||
|