--- setup.py.bak 2010-07-01 15:19:00.000000000 -0400 +++ setup.py 2010-07-01 15:20:57.000000000 -0400 @@ -507,9 +507,19 @@ 'console_scripts': [ 'ptdump = tables.scripts.ptdump:main', 'ptrepack = tables.scripts.ptrepack:main', - 'nctoh5 = tables.netcdf3.scripts.nctoh5:main [netCDF]', ], } + + # Create nctoh5 script only when ScientificPython is installed: + try: + import Scientific.IO.NetCDF + except ImportError: + pass + else: + setuptools_kwargs['entry_points']['console_scripts'].append( + 'nctoh5 = tables.netcdf3.scripts.nctoh5:main [netCDF]' + ) + # Test suites. setuptools_kwargs['test_suite'] = 'tables.tests.test_all.suite' setuptools_kwargs['scripts'] = []