(self)
| 2778 | default_include_dirs=include_dirs) |
| 2779 | |
| 2780 | def calc_info(self): |
| 2781 | try: |
| 2782 | module = __import__(self.modulename) |
| 2783 | except ImportError: |
| 2784 | return |
| 2785 | info = {} |
| 2786 | macros = [] |
| 2787 | for v in ['__version__', 'version']: |
| 2788 | vrs = getattr(module, v, None) |
| 2789 | if vrs is None: |
| 2790 | continue |
| 2791 | macros = [(self.modulename.upper() + '_VERSION', |
| 2792 | _c_string_literal(vrs)), |
| 2793 | (self.modulename.upper(), None)] |
| 2794 | break |
| 2795 | dict_append(info, define_macros=macros) |
| 2796 | include_dirs = self.get_include_dirs() |
| 2797 | inc_dir = None |
| 2798 | for d in include_dirs: |
| 2799 | if self.combine_paths(d, |
| 2800 | os.path.join(self.modulename, |
| 2801 | 'arrayobject.h')): |
| 2802 | inc_dir = d |
| 2803 | break |
| 2804 | if inc_dir is not None: |
| 2805 | dict_append(info, include_dirs=[inc_dir]) |
| 2806 | if info: |
| 2807 | self.set_info(**info) |
| 2808 | return |
| 2809 | |
| 2810 | |
| 2811 | class numarray_info(_numpy_info): |
nothing calls this directly
no test coverage detected