mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge pull request #2254 from shimwell/cython_is_build_requirment
assume cython is installed
This commit is contained in:
commit
98322dfeb9
1 changed files with 4 additions and 12 deletions
16
setup.py
16
setup.py
|
|
@ -5,11 +5,7 @@ import sys
|
|||
import numpy as np
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
try:
|
||||
from Cython.Build import cythonize
|
||||
have_cython = True
|
||||
except ImportError:
|
||||
have_cython = False
|
||||
from Cython.Build import cythonize
|
||||
|
||||
|
||||
# Determine shared library suffix
|
||||
|
|
@ -76,13 +72,9 @@ kwargs = {
|
|||
'test': ['pytest', 'pytest-cov', 'colorama'],
|
||||
'vtk': ['vtk'],
|
||||
},
|
||||
# Cython is used to add resonance reconstruction and fast float_endf
|
||||
'ext_modules': cythonize('openmc/data/*.pyx'),
|
||||
'include_dirs': [np.get_include()]
|
||||
}
|
||||
|
||||
# If Cython is present, add resonance reconstruction and fast float_endf
|
||||
if have_cython:
|
||||
kwargs.update({
|
||||
'ext_modules': cythonize('openmc/data/*.pyx'),
|
||||
'include_dirs': [np.get_include()]
|
||||
})
|
||||
|
||||
setup(**kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue