Skip to content

Commit

Permalink
Make nxutils numpy-only
Browse files Browse the repository at this point in the history
svn path=/trunk/matplotlib/; revision=3478
  • Loading branch information
efiring committed Jul 8, 2007
1 parent 806079e commit 156f3b2
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 158 deletions.
23 changes: 0 additions & 23 deletions lib/matplotlib/nxutils.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def havegtk():

if 1: # I don't think we need to make these optional
build_contour(ext_modules, packages)
build_nxutils(ext_modules, packages, NUMERIX)
build_nxutils(ext_modules, packages)

for mod in ext_modules:
if VERBOSE:
Expand Down
44 changes: 9 additions & 35 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,43 +860,17 @@ def build_contour(ext_modules, packages):
BUILT_CONTOUR = True


def build_nxutils(ext_modules, packages, numerix):
def build_nxutils(ext_modules, packages):
global BUILT_NXUTILS
if BUILT_NXUTILS: return # only build it if you you haven't already

if 'numarray' in numerix: # Build for numarray
temp_copy('src/nxutils.c', 'src/_na_nxutils.c')
module = Extension(
'matplotlib._na_nxutils',
[ 'src/_na_nxutils.c',],
include_dirs=numarray_inc_dirs,
)
module.extra_compile_args.append('-DNUMARRAY=1')
add_base_flags(module)
ext_modules.append(module)

if 'Numeric' in numerix: # Build for Numeric
temp_copy('src/nxutils.c', 'src/_nc_nxutils.c')
module = Extension(
'matplotlib._nc_nxutils',
[ 'src/_nc_nxutils.c'],
include_dirs=numeric_inc_dirs,
)
module.extra_compile_args.append('-DNUMERIC=1')
add_base_flags(module)
ext_modules.append(module)
if 'numpy' in numerix: # Build for numpy
temp_copy('src/nxutils.c', 'src/_ns_nxutils.c')
module = Extension(
'matplotlib._ns_nxutils',
[ 'src/_ns_nxutils.c'],
include_dirs=numeric_inc_dirs,
)
add_numpy_flags(module)
module.extra_compile_args.append('-DSCIPY=1')
add_base_flags(module)
ext_modules.append(module)

module = Extension(
'matplotlib.nxutils',
[ 'src/nxutils.c'],
include_dirs=numeric_inc_dirs,
)
add_numpy_flags(module)
add_base_flags(module)
ext_modules.append(module)

BUILT_NXUTILS = True

Expand Down
Loading

0 comments on commit 156f3b2

Please sign in to comment.