Author: bugman Date: Fri Sep 19 09:13:03 2014 New Revision: 25906 URL: http://svn.gna.org/viewcvs/relax?rev=25906&view=rev Log: The lib.spectrum.nmrpipe has been made independent of the relax source code. This was discussed at http://thread.gmane.org/gmane.science.nmr.relax.scm/23357/focus=7103. The change allows the software verification tests pass. The dep_check module cannot be used in the relax lib package. Only modules from within lib are allowed to be imported into modules of lib. The fix now allows the full test suite to pass and hence new relax releases are once again possible. Modified: trunk/lib/spectrum/nmrpipe.py Modified: trunk/lib/spectrum/nmrpipe.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=25906&r1=25905&r2=25906&view=diff ============================================================================== --- trunk/lib/spectrum/nmrpipe.py (original) +++ trunk/lib/spectrum/nmrpipe.py Fri Sep 19 09:13:03 2014 @@ -1,6 +1,7 @@ ############################################################################### # # # Copyright (C) 2013 Troels E. Linnet # +# Copyright (C) 2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -28,17 +29,18 @@ from glob import glob from os import sep from os.path import abspath +subprocess_module = False +try: + import subprocess + subprocess_module = True +except ImportError: + pass from warnings import warn # relax module imports. -import dep_check from lib.errors import RelaxError from lib.io import file_root, get_file_path, open_write_file, sort_filenames, write_data from lib.warnings import RelaxWarning - -# Check subprocess is available. -if dep_check.subprocess_module: - import subprocess def read_seriestab(peak_list=None, file_data=None, int_col=None): @@ -212,7 +214,7 @@ # Get the file path. file_path = get_file_path(file_name=file_name, dir=dir) - if not dep_check.subprocess_module: + if not subprocess_module: raise RelaxError("Python module 'subprocess' not found, cannot call showApod.") # Call function.