Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 806e3bbf4bcf936490df06e225d8a732 > files > 2

python-tables-2.3.1-2.mga3.src.rpm

--- 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'] = []