Пример #1
0
"""
Functions for dispatching to SLURM (https://computing.llnl.gov/linux/slurm/)
from scons.
"""

import re
import shlex
import subprocess

from bioscons import add_scons_lib
add_scons_lib()

from SCons.Script.SConscript import SConsEnvironment

# From py3.3 argparse
_find_unsafe = re.compile(r'[^\w@%+=:,./-]').search

# system path to the time function
_time = '/usr/bin/time --verbose --output ${TARGETS[0]}.time '


def check_srun():
    """
    Return the absolute path to the `srun` executable.
    """

    try:
        srun = subprocess.check_output(['which', 'srun']).strip()
    except subprocess.CalledProcessError:
        srun = None
Пример #2
0
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import glob

sys.path.insert(0, '..')
import bioscons
bioscons.add_scons_lib()

# try:
#     from SCons.Script import *
# except ImportError, err:
#     print "can't find SCons module. Perhaps you could try installing scons with '--standard-lib'"
#     raise err

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))

# get the version number from the package itself
VERSION = bioscons.__version__
RELEASE = VERSION
Пример #3
0
"""
Functions for dispatching to SLURM (https://computing.llnl.gov/linux/slurm/)
from scons.
"""

import re
import shlex
import subprocess

from bioscons import add_scons_lib
add_scons_lib()

from SCons.Script.SConscript import SConsEnvironment

# From py3.3 argparse
_find_unsafe = re.compile(r'[^\w@%+=:,./-]').search

# system path to the time function
_time = '/usr/bin/time --verbose --output ${TARGETS[0]}.time '


def check_srun():
    """
    Return the absolute path to the `srun` executable.
    """

    try:
        srun = subprocess.check_output(['which', 'srun']).strip()
    except subprocess.CalledProcessError:
        srun = None
Пример #4
0
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import glob

sys.path.insert(0, '..')
import bioscons
bioscons.add_scons_lib()

# try:
#     from SCons.Script import *
# except ImportError, err:
#     print "can't find SCons module. Perhaps you could try installing scons with '--standard-lib'"
#     raise err

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))

# get the version number from the package itself
VERSION = bioscons.__version__
RELEASE = VERSION