--- setup.py.old 2008-03-10 16:17:45.000000000 -0400 +++ setup.py 2008-03-10 16:20:47.000000000 -0400 @@ -433,9 +433,17 @@ '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'] = [] @@ -448,7 +456,15 @@ 'tables.tests', 'tables.numexpr.tests', 'tables.nodes.tests', 'tables.netcdf3.tests', 'tables.nra.tests'] setuptools_kwargs['scripts'] = [ - 'utils/ptdump', 'utils/ptrepack', 'utils/nctoh5'] + 'utils/ptdump', 'utils/ptrepack'] + # Create nctoh5 script only when ScientificPython is installed: + try: + import Scientific.IO.NetCDF + except ImportError: + pass + else: + setuptools_kwargs['scripts'].append('utils/nctoh5') + # Copy additional data for packages that need it. setuptools_kwargs['package_data'] = { 'tables.tests': ['*.h5'],