Merge branch 'scheibelp-features/externaldeps' into develop

This commit is contained in:
Todd Gamblin 2015-11-23 17:50:49 -08:00
commit cf3d236b9f
43 changed files with 61 additions and 44 deletions

View File

@ -38,6 +38,23 @@ SPACK_PREFIX = os.path.dirname(os.path.dirname(SPACK_FILE))
# Allow spack libs to be imported in our scripts # Allow spack libs to be imported in our scripts
SPACK_LIB_PATH = os.path.join(SPACK_PREFIX, "lib", "spack") SPACK_LIB_PATH = os.path.join(SPACK_PREFIX, "lib", "spack")
sys.path.insert(0, SPACK_LIB_PATH) sys.path.insert(0, SPACK_LIB_PATH)
SPACK_EXTERNAL_LIBS = os.path.join(SPACK_LIB_PATH, "external")
sys.path.insert(0, SPACK_EXTERNAL_LIBS)
# Quick and dirty check to clean orphaned .pyc files left over from
# previous revisions. These files were present in earlier versions of
# Spack, were removed, but shadow system modules that Spack still
# imports. If we leave them, Spack will fail in mysterious ways.
# TODO: more elegant solution for orphaned pyc files.
orphaned_pyc_files = [os.path.join(SPACK_EXTERNAL_LIBS, n)
for n in ('functools.pyc', 'ordereddict.pyc')]
for pyc_file in orphaned_pyc_files:
if not os.path.exists(pyc_file):
continue
try:
os.remove(pyc_file)
except OSError as e:
print "WARNING: Spack may fail mysteriously. Couldn't remove orphaned .pyc file: %s" % pyc
# If there is no working directory, use the spack prefix. # If there is no working directory, use the spack prefix.
try: try:

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty
import spack import spack
import spack.cmd import spack.cmd

View File

@ -24,7 +24,7 @@
############################################################################## ##############################################################################
import os import os
import re import re
from external import argparse import argparse
import hashlib import hashlib
from pprint import pprint from pprint import pprint
from subprocess import CalledProcessError from subprocess import CalledProcessError

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.tty.color import colorize from llnl.util.tty.color import colorize

View File

@ -23,7 +23,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
import sys import sys
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty

View File

@ -27,7 +27,7 @@
import hashlib import hashlib
import re import re
from external.ordereddict import OrderedDict from ordereddict_backport import OrderedDict
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.filesystem import mkdirp from llnl.util.filesystem import mkdirp

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty
import spack import spack

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty

View File

@ -24,7 +24,7 @@
############################################################################## ##############################################################################
import sys import sys
import os import os
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty

View File

@ -23,7 +23,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
import os import os
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty
import spack.cmd import spack.cmd
import spack.build_environment as build_env import spack.build_environment as build_env

View File

@ -23,7 +23,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
import sys import sys
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.tty.colify import colify from llnl.util.tty.colify import colify

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import spack import spack
import spack.cmd import spack.cmd

View File

@ -25,7 +25,7 @@
import sys import sys
import collections import collections
import itertools import itertools
from external import argparse import argparse
from StringIO import StringIO from StringIO import StringIO
import llnl.util.tty as tty import llnl.util.tty as tty

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import spack import spack
import spack.cmd import spack.cmd

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty

View File

@ -24,7 +24,7 @@
############################################################################## ##############################################################################
import sys import sys
import llnl.util.tty as tty import llnl.util.tty as tty
from external import argparse import argparse
from llnl.util.tty.colify import colify from llnl.util.tty.colify import colify
import spack import spack

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import spack.modules import spack.modules
description ="Add package to environment using modules." description ="Add package to environment using modules."

View File

@ -24,7 +24,7 @@
############################################################################## ##############################################################################
import os import os
import sys import sys
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.filesystem import join_path from llnl.util.filesystem import join_path

View File

@ -24,7 +24,7 @@
############################################################################## ##############################################################################
import os import os
import hashlib import hashlib
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.filesystem import * from llnl.util.filesystem import *

View File

@ -26,7 +26,7 @@
import sys import sys
from datetime import datetime from datetime import datetime
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.tty.colify import colify from llnl.util.tty.colify import colify

View File

@ -25,7 +25,7 @@
import sys import sys
import os import os
import shutil import shutil
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.lang import partition_list from llnl.util.lang import partition_list

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import spack.cmd import spack.cmd
import spack import spack

View File

@ -24,7 +24,7 @@
############################################################################## ##############################################################################
import os import os
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.tty.colify import colify from llnl.util.tty.colify import colify

View File

@ -23,7 +23,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
import os import os
from external import argparse import argparse
from llnl.util.tty.colify import colify from llnl.util.tty.colify import colify

View File

@ -25,7 +25,7 @@
import os import os
import sys import sys
import code import code
from external import argparse import argparse
import platform import platform
import spack import spack

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import spack import spack
description = "Rebuild Spack's package database." description = "Rebuild Spack's package database."

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import spack.cmd import spack.cmd
import llnl.util.tty as tty import llnl.util.tty as tty

View File

@ -23,7 +23,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
import os import os
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty
import spack import spack

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
import itertools import itertools
import re import re

View File

@ -23,7 +23,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
import sys import sys
from external import argparse import argparse
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.tty.colify import colify from llnl.util.tty.colify import colify

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import spack.modules import spack.modules
description ="Remove package from environment using module." description ="Remove package from environment using module."

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import spack.modules import spack.modules
description ="Remove package from environment using dotkit." description ="Remove package from environment using dotkit."

View File

@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software Foundation, # along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from external import argparse import argparse
import spack.modules import spack.modules
description ="Add package to environment using dotkit." description ="Add package to environment using dotkit."

View File

@ -90,12 +90,12 @@
import exceptions import exceptions
import sys import sys
from external.ordereddict import OrderedDict from ordereddict_backport import OrderedDict
from llnl.util.lang import memoized from llnl.util.lang import memoized
import spack.error import spack.error
from external import yaml import yaml
from external.yaml.error import MarkedYAMLError from yaml.error import MarkedYAMLError
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.filesystem import mkdirp from llnl.util.filesystem import mkdirp

View File

@ -43,8 +43,8 @@
import time import time
import socket import socket
from external import yaml import yaml
from external.yaml.error import MarkedYAMLError, YAMLError from yaml.error import MarkedYAMLError, YAMLError
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.filesystem import * from llnl.util.filesystem import *

View File

@ -29,7 +29,7 @@
import shutil import shutil
import glob import glob
import tempfile import tempfile
from external import yaml import yaml
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.filesystem import join_path, mkdirp from llnl.util.filesystem import join_path, mkdirp

View File

@ -96,8 +96,8 @@
import base64 import base64
from StringIO import StringIO from StringIO import StringIO
from operator import attrgetter from operator import attrgetter
from external import yaml import yaml
from external.yaml.error import MarkedYAMLError from yaml.error import MarkedYAMLError
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.lang import * from llnl.util.lang import *

View File

@ -34,7 +34,7 @@
import llnl.util.tty as tty import llnl.util.tty as tty
from external import pyqver2 import pyqver2
import spack import spack
spack_max_version = (2,6) spack_max_version = (2,6)

View File

@ -48,7 +48,7 @@
import re import re
from bisect import bisect_left from bisect import bisect_left
from functools import wraps from functools import wraps
from external.functools import total_ordering from functools_backport import total_ordering
# Valid version characters # Valid version characters
VALID_VERSION = r'[A-Za-z0-9_.-]' VALID_VERSION = r'[A-Za-z0-9_.-]'