blob: f0c764955b2a85668ee12cfd5d05ed89bdcd65c9 (
plain)
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
27
28
29
30
|
#!/usr/bin/env python
from __future__ import division
from distutils.core import setup
from distutils.extension import Extension
import numpy
# Define a pyrex-based extension module, using the generated sources if pyrex
from Pyrex.Distutils import build_ext
pyx_sources = ['add.pyx']
cmdclass = {'build_ext': build_ext}
pyx_ext = Extension('add',
pyx_sources,
include_dirs = [numpy.get_include()])
pyx_ext2 = Extension('blur',
['blur.pyx'],
include_dirs = [numpy.get_include()])
# Call the routine which does the real work
setup(name = 'add',
description = 'Small example on using Pyrex to write a Numpy extension',
url = 'http://www.scipy.org/Cookbook/Pyrex_and_NumPy',
ext_modules = [pyx_ext, pyx_ext2],
cmdclass = cmdclass,
)
|