Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jswhit committed Jun 23, 2022
1 parent e6e7a57 commit 9dc076e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,11 +728,8 @@ def _populate_hdf5_info(dirstosearch, inc_dirs, libs, lib_dirs):
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Archiving :: Compression",
"Operating System :: OS Independent"],
#packages=['netCDF4'],
packages=find_namespace_packages(where="src"),
package_dir={'':'src'},
#data_files=[('netCDF4',data_files)], # doesn't work with pip install
#include_package_data = True,
package_data={"netCDF4.plugins": ["lib__nc*"]},
ext_modules=ext_modules,
**setuptools_extra_kwargs)
Expand Down
7 changes: 4 additions & 3 deletions src/netCDF4/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
__all__ =\
['Dataset','Variable','Dimension','Group','MFDataset','MFTime','CompoundType','VLType','date2num','num2date','date2index','stringtochar','chartostring','stringtoarr','getlibversion','EnumType','get_chunk_cache','set_chunk_cache']
# if HDF5_PLUGIN_PATH not set, point to package path if plugins live there
pluginpath = os.path.join(__path__[0],'plugins')
if 'HDF5_PLUGIN_PATH' not in os.environ and\
(os.path.exists(os.path.join(os.path.join(__path__[0],'plugins'),'lib__nczhdf5filters.so')) or\
os.path.exists(os.path.join(os.path.join(__path__[0],'plugins'),'lib__nczhdf5filters.dylib'))):
os.environ['HDF5_PLUGIN_PATH']=os.path.join(__path__[0],'plugins')
(os.path.exists(os.path.join(pluginpath,'lib__nczhdf5filters.so')) or\
os.path.exists(os.path.join(pluginpath,'lib__nczhdf5filters.dylib'))):
os.environ['HDF5_PLUGIN_PATH']=pluginpath

0 comments on commit 9dc076e

Please sign in to comment.