|
87 | 87 | BUILT_WINDOWING = False |
88 | 88 | BUILT_CONTOUR = False |
89 | 89 | BUILT_NXUTILS = False |
90 | | -BUILT_ENTHOUGHT = False |
| 90 | +BUILT_TRAITS = False |
91 | 91 | BUILT_CONTOUR = False |
92 | 92 | BUILT_GDK = False |
93 | 93 |
|
@@ -324,6 +324,23 @@ def check_for_cairo(): |
324 | 324 | else: |
325 | 325 | print_status("Cairo", cairo.version) |
326 | 326 |
|
| 327 | +def check_for_traits(): |
| 328 | + gotit = False |
| 329 | + try: |
| 330 | + from enthought import traits |
| 331 | + gotit = True |
| 332 | + try: |
| 333 | + from enthought.traits import version |
| 334 | + except: |
| 335 | + print_status("enthought.traits", "unknown and incompatible version: < 2.0") |
| 336 | + return gotit |
| 337 | + else: |
| 338 | + if version.version.endswith('mpl'): gotit = False |
| 339 | + print_status("enthought.traits", version.version) |
| 340 | + except ImportError: |
| 341 | + print_status("enthought.traits", "no") |
| 342 | + return gotit |
| 343 | + |
327 | 344 | def check_for_numpy(): |
328 | 345 | gotit = False |
329 | 346 | try: |
@@ -965,20 +982,41 @@ def build_transforms(ext_modules, packages): |
965 | 982 | add_base_flags(module) |
966 | 983 | ext_modules.append(module) |
967 | 984 |
|
968 | | -def build_enthought(ext_modules, packages): |
969 | | - global BUILT_ENTHOUGHT |
970 | | - if BUILT_ENTHOUGHT: return # only build it if you you haven't already |
971 | | - |
972 | | - ctraits = Extension('matplotlib.enthought.traits.ctraits', ['lib/matplotlib/enthought/traits/ctraits.c']) |
| 985 | +#def build_enthought(ext_modules, packages): |
| 986 | +# global BUILT_ENTHOUGHT |
| 987 | +# if BUILT_ENTHOUGHT: return # only build it if you you haven't already |
| 988 | +# |
| 989 | +# ctraits = Extension('matplotlib.enthought.traits.ctraits', ['lib/matplotlib/enthought/traits/ctraits.c']) |
| 990 | +# ext_modules.append(ctraits) |
| 991 | +# packages.extend(['matplotlib/enthought', |
| 992 | +# 'matplotlib/enthought/traits', |
| 993 | +# 'matplotlib/enthought/traits/ui', |
| 994 | +# 'matplotlib/enthought/traits/ui/null', |
| 995 | +# 'matplotlib/enthought/resource', |
| 996 | +# 'matplotlib/enthought/util', |
| 997 | +# ]) |
| 998 | +# BUILT_ENTHOUGHT = True |
| 999 | + |
| 1000 | +def build_traits(ext_modules, packages): |
| 1001 | + global BUILT_TRAITS |
| 1002 | + if BUILT_TRAITS: |
| 1003 | + return # only build it if you you haven't already |
| 1004 | + |
| 1005 | + ctraits = Extension('enthought.traits.ctraits', |
| 1006 | + ['lib/enthought/traits/ctraits.c']) |
973 | 1007 | ext_modules.append(ctraits) |
974 | | - packages.extend(['matplotlib/enthought', |
975 | | - 'matplotlib/enthought/traits', |
976 | | - 'matplotlib/enthought/traits/ui', |
977 | | - 'matplotlib/enthought/traits/ui/null', |
978 | | - 'matplotlib/enthought/resource', |
979 | | - 'matplotlib/enthought/util', |
| 1008 | + packages.extend(['enthought', |
| 1009 | + 'enthought/etsconfig', |
| 1010 | + 'enthought/traits', |
| 1011 | +# 'enthought/traits/plugins', |
| 1012 | + 'enthought/traits/ui', |
| 1013 | + 'enthought/traits/ui/extras', |
| 1014 | + 'enthought/traits/ui/null', |
| 1015 | +# 'enthought/traits/ui/tests', |
| 1016 | + 'enthought/traits/ui/tk', |
980 | 1017 | ]) |
981 | | - BUILT_ENTHOUGHT = True |
| 1018 | + BUILT_TRAITS = True |
| 1019 | + |
982 | 1020 |
|
983 | 1021 | def build_contour(ext_modules, packages): |
984 | 1022 | global BUILT_CONTOUR |
|
0 commit comments