remove wildcards from make spack core and packages
- This removes all wildcard imports EXCEPT `from spack import *` in packages
This commit is contained in:
		@@ -22,10 +22,10 @@
 | 
			
		||||
# License along with this program; if not, write to the Free Software
 | 
			
		||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 | 
			
		||||
##############################################################################
 | 
			
		||||
import os
 | 
			
		||||
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.package_test import *
 | 
			
		||||
from spack.util.executable import Executable
 | 
			
		||||
import os.path
 | 
			
		||||
from spack.package_test import compile_c_and_execute, compare_output_file
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Atlas(Package):
 | 
			
		||||
 
 | 
			
		||||
@@ -52,14 +52,16 @@
 | 
			
		||||
# - Combining +parmgridgen with +float32 probably won't work.
 | 
			
		||||
#
 | 
			
		||||
##############################################################################
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.environment import *
 | 
			
		||||
 | 
			
		||||
import glob
 | 
			
		||||
import re
 | 
			
		||||
import shutil
 | 
			
		||||
import os
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import *
 | 
			
		||||
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import OpenfoamArch
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import add_extra_files
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import write_environ
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import rewrite_environ_files
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class FoamExtend(Package):
 | 
			
		||||
 
 | 
			
		||||
@@ -35,12 +35,12 @@
 | 
			
		||||
# OpenFOAM distribution.
 | 
			
		||||
#
 | 
			
		||||
##############################################################################
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.environment import *
 | 
			
		||||
import os
 | 
			
		||||
 | 
			
		||||
import llnl.util.tty as tty
 | 
			
		||||
 | 
			
		||||
import os
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import *
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import add_extra_files
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class OfAdiosWrite(Package):
 | 
			
		||||
 
 | 
			
		||||
@@ -22,11 +22,12 @@
 | 
			
		||||
# License along with this program; if not, write to the Free Software
 | 
			
		||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 | 
			
		||||
##############################################################################
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.package_test import *
 | 
			
		||||
import spack.architecture
 | 
			
		||||
import os
 | 
			
		||||
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.package_test import compare_output_file, compile_c_and_execute
 | 
			
		||||
import spack.architecture
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Openblas(MakefilePackage):
 | 
			
		||||
    """OpenBLAS: An optimized BLAS library"""
 | 
			
		||||
 
 | 
			
		||||
@@ -58,15 +58,15 @@
 | 
			
		||||
# WM_PROJECT_VERSION=plus naming internally.
 | 
			
		||||
#
 | 
			
		||||
##############################################################################
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.environment import *
 | 
			
		||||
import llnl.util.tty as tty
 | 
			
		||||
 | 
			
		||||
import glob
 | 
			
		||||
import re
 | 
			
		||||
import shutil
 | 
			
		||||
import os
 | 
			
		||||
 | 
			
		||||
from spack import *
 | 
			
		||||
import llnl.util.tty as tty
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Not the nice way of doing things, but is a start for refactoring
 | 
			
		||||
__all__ = [
 | 
			
		||||
    'add_extra_files',
 | 
			
		||||
 
 | 
			
		||||
@@ -53,15 +53,19 @@
 | 
			
		||||
# - Combining +mgridgen with +int64 or +float32 probably won't work.
 | 
			
		||||
#
 | 
			
		||||
##############################################################################
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.environment import *
 | 
			
		||||
import llnl.util.tty as tty
 | 
			
		||||
 | 
			
		||||
import glob
 | 
			
		||||
import re
 | 
			
		||||
import shutil
 | 
			
		||||
import os
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import *
 | 
			
		||||
 | 
			
		||||
import llnl.util.tty as tty
 | 
			
		||||
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import add_extra_files
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import write_environ
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import rewrite_environ_files
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import mplib_content
 | 
			
		||||
from spack.pkg.builtin.openfoam_com import OpenfoamArch
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class OpenfoamOrg(Package):
 | 
			
		||||
 
 | 
			
		||||
@@ -22,10 +22,10 @@
 | 
			
		||||
# License along with this program; if not, write to the Free Software
 | 
			
		||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 | 
			
		||||
##############################################################################
 | 
			
		||||
import os
 | 
			
		||||
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.package_test import *
 | 
			
		||||
import os
 | 
			
		||||
from spack.package_test import compile_c_and_execute, compare_output_file
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Pocl(CMakePackage):
 | 
			
		||||
 
 | 
			
		||||
@@ -27,14 +27,13 @@
 | 
			
		||||
import platform
 | 
			
		||||
import re
 | 
			
		||||
import sys
 | 
			
		||||
from contextlib import closing
 | 
			
		||||
 | 
			
		||||
import spack
 | 
			
		||||
import llnl.util.tty as tty
 | 
			
		||||
from llnl.util.lang import match_predicate
 | 
			
		||||
from llnl.util.filesystem import force_remove
 | 
			
		||||
 | 
			
		||||
import spack
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.util.environment import *
 | 
			
		||||
from spack.util.prefix import Prefix
 | 
			
		||||
import spack.util.spack_json as sjson
 | 
			
		||||
 | 
			
		||||
@@ -587,7 +586,7 @@ def write_easy_install_pth(self, exts):
 | 
			
		||||
            if not os.path.isfile(easy_pth):
 | 
			
		||||
                continue
 | 
			
		||||
 | 
			
		||||
            with closing(open(easy_pth)) as f:
 | 
			
		||||
            with open(easy_pth) as f:
 | 
			
		||||
                for line in f:
 | 
			
		||||
                    line = line.rstrip()
 | 
			
		||||
 | 
			
		||||
@@ -610,7 +609,7 @@ def write_easy_install_pth(self, exts):
 | 
			
		||||
                os.remove(main_pth)
 | 
			
		||||
 | 
			
		||||
        else:
 | 
			
		||||
            with closing(open(main_pth, 'w')) as f:
 | 
			
		||||
            with open(main_pth, 'w') as f:
 | 
			
		||||
                f.write("import sys; sys.__plen = len(sys.path)\n")
 | 
			
		||||
                for path in paths:
 | 
			
		||||
                    f.write("{0}\n".format(path))
 | 
			
		||||
 
 | 
			
		||||
@@ -22,10 +22,8 @@
 | 
			
		||||
# License along with this program; if not, write to the Free Software
 | 
			
		||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 | 
			
		||||
##############################################################################
 | 
			
		||||
 | 
			
		||||
from spack import *
 | 
			
		||||
from spack.util.environment import *
 | 
			
		||||
import shutil
 | 
			
		||||
from spack import *
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class R(AutotoolsPackage):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user