|
1 | 1 | # init for netCDF4. package |
| 2 | +# if HDF5_PLUGIN_PATH not set, point to package path if plugins live there |
| 3 | +import os |
| 4 | +pluginpath = os.path.join(__path__[0],'plugins') |
| 5 | +if 'HDF5_PLUGIN_PATH' not in os.environ and\ |
| 6 | + (os.path.exists(os.path.join(pluginpath,'lib__nczhdf5filters.so')) or\ |
| 7 | + os.path.exists(os.path.join(pluginpath,'__nczhdf5filters.dll')) or\ |
| 8 | + os.path.exists(os.path.join(pluginpath,'lib__nczhdf5filters.dylib'))): |
| 9 | + os.environ['HDF5_PLUGIN_PATH']=pluginpath |
2 | 10 | # Docstring comes from extension module _netCDF4. |
3 | 11 | from ._netCDF4 import * |
4 | 12 | # Need explicit imports for names beginning with underscores |
|
11 | 19 | __has_quantization_support__, __has_zstandard_support__, |
12 | 20 | __has_bzip2_support__, __has_blosc_support__, __has_szip_support__, |
13 | 21 | __has_set_alignment__, __has_parallel_support__, __has_ncfilter__, __has_nc_rc_set__) |
14 | | -import os |
15 | 22 | __all__ = [ |
16 | 23 | 'Dataset', 'Variable', 'Dimension', 'Group', 'MFDataset', 'MFTime', 'CompoundType', |
17 | 24 | 'VLType', 'date2num', 'num2date', 'date2index', 'stringtochar', 'chartostring', |
18 | 25 | 'stringtoarr', 'getlibversion', 'EnumType', 'get_chunk_cache', 'set_chunk_cache', |
19 | 26 | 'set_alignment', 'get_alignment', 'rc_get', 'rc_set', |
20 | 27 | ] |
21 | 28 | __pdoc__ = {'utils': False} |
22 | | -# if HDF5_PLUGIN_PATH not set, point to package path if plugins live there |
23 | | -pluginpath = os.path.join(__path__[0],'plugins') |
24 | | -if 'HDF5_PLUGIN_PATH' not in os.environ and\ |
25 | | - (os.path.exists(os.path.join(pluginpath,'lib__nczhdf5filters.so')) or\ |
26 | | - os.path.exists(os.path.join(pluginpath,'lib__nczhdf5filters.dylib'))): |
27 | | - os.environ['HDF5_PLUGIN_PATH']=pluginpath |
|
0 commit comments