From 3779db43b82b0e938c0bc104b1474a98ce581bc9 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 6 Oct 2022 14:55:01 +0100 Subject: [PATCH] assume cython is present --- setup.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/setup.py b/setup.py index 477f29dec9..eec3313536 100755 --- a/setup.py +++ b/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)