Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 27 lines (21 sloc) 0.65 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
import glob

from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext

try:
    from numpy.distutils.misc_util import get_numpy_include_dirs
    numpy_include_dirs = get_numpy_include_dirs()
except:
    numpy_include_dirs = []

ext_modules=[
    Extension("primes", ["primes.pyx"]),
    Extension("spam", ["spam.pyx"]),
]

for file in glob.glob("*.pyx"):
    if file != "numeric_demo.pyx":
        ext_modules.append(Extension(file[:-4], [file], include_dirs = numpy_include_dirs))

setup(
  name = 'Demos',
  cmdclass = {'build_ext': build_ext},
  ext_modules = ext_modules,
)
Something went wrong with that request. Please try again.