Skip to content

Commit

Permalink
Merge pull request #7 from sot/cython
Browse files Browse the repository at this point in the history
Allow setup.py --version to run without Cython, numpy
  • Loading branch information
taldcroft authored Apr 16, 2020
2 parents 0bfad6e + cc5edb4 commit ff4299a
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import sys
from setuptools import setup, Extension

import numpy as np
from Cython.Build import cythonize
# Special case here to allow `python setup.py --version` to run without
# requiring cython and numpy to be installed.
if '--version' in sys.argv[1:]:
cythonize = lambda arg: None
fastss_ext = None
else:
from Cython.Build import cythonize
import numpy as np
fastss_ext = Extension("Ska.Numpy.fastss",
['Ska/Numpy/fastss.pyx'],
include_dirs=[np.get_include()])

fastss_ext = Extension("Ska.Numpy.fastss",
['Ska/Numpy/fastss.pyx'],
include_dirs=[np.get_include()])
try:
from testr.setup_helper import cmdclass
except ImportError:
Expand Down

0 comments on commit ff4299a

Please sign in to comment.