Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ addons:
packages:
# for environment modules/Lmod
- tcl8.5
# for EasyBuild
- python-setuptools
# for GitPython, python-hglib
- git
- mercurial
Expand Down Expand Up @@ -115,6 +113,9 @@ script:
- export PYTHONPATH=/tmp/$TRAVIS_JOB_ID/lib/python$TRAVIS_PYTHON_VERSION/site-packages
# install easybuild-framework to unique temporary location using prepared sdist tarball
- mkdir -p $PYTHONPATH; easy_install --prefix /tmp/$TRAVIS_JOB_ID $TRAVIS_BUILD_DIR/dist/easybuild-framework*tar.gz
# actively break "import setuptools", since EasyBuild should not have a runtime requirement on setuptools
- echo 'raise NotImplementedError("setuptools is not available")' > /tmp/$TRAVIS_JOB_ID/setuptools.py
- export PYTHONPATH=/tmp/$TRAVIS_JOB_ID:$PYTHONPATH
# move outside of checkout of easybuild-framework repository,
# to run tests on an *installed* version of the EasyBuild framework;
# this is done to catch possible packaging issues
Expand Down
3 changes: 1 addition & 2 deletions easybuild/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@
:author: Jens Timmerman (Ghent University)
:author: Kenneth Hoste (Ghent University)
"""
import pkg_resources
pkg_resources.declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
2 changes: 1 addition & 1 deletion easybuild/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
from easybuild.tools.package.utilities import package
from easybuild.tools.py2vs3 import extract_method_name, string_type
from easybuild.tools.repository.repository import init_repository
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.systemtools import det_parallelism, use_group
from easybuild.tools.utilities import INDENT_4SPACES, get_class_for, quote_str, remove_unwanted_chars, trace_msg
from easybuild.tools.version import this_is_easybuild, VERBOSE_VERSION, VERSION
Expand Down
4 changes: 2 additions & 2 deletions easybuild/framework/easyconfig/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@
from easybuild.tools.filetools import EASYBLOCK_CLASS_PREFIX
from easybuild.tools.filetools import copy_file, decode_class_name, encode_class_name, read_file, write_file
from easybuild.tools.hooks import PARSE, load_hooks, run_hook
from easybuild.tools.module_naming_scheme import DEVEL_MODULE_SUFFIX
from easybuild.tools.module_naming_scheme.mns import DEVEL_MODULE_SUFFIX
from easybuild.tools.module_naming_scheme.utilities import avail_module_naming_schemes, det_full_ec_version
from easybuild.tools.module_naming_scheme.utilities import det_hidden_modname, is_valid_module_name
from easybuild.tools.modules import modules_tool
from easybuild.tools.py2vs3 import OrderedDict, string_type
from easybuild.tools.systemtools import check_os_dependency
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME, DUMMY_TOOLCHAIN_VERSION
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME, DUMMY_TOOLCHAIN_VERSION
from easybuild.tools.toolchain.toolchain import TOOLCHAIN_CAPABILITIES, TOOLCHAIN_CAPABILITY_CUDA
from easybuild.tools.toolchain.utilities import get_toolchain, search_toolchain
from easybuild.tools.utilities import flatten, get_class_for, nub, quote_py_str, remove_unwanted_chars
Expand Down
2 changes: 1 addition & 1 deletion easybuild/framework/easyconfig/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
from easybuild.tools.github import fetch_easyconfigs_from_pr, download_repo
from easybuild.tools.multidiff import multidiff
from easybuild.tools.py2vs3 import OrderedDict
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.utilities import search_toolchain
from easybuild.tools.utilities import only_if_module_is_available, quote_str
from easybuild.tools.version import VERSION as EASYBUILD_VERSION
Expand Down
2 changes: 1 addition & 1 deletion easybuild/framework/easyconfig/tweak.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
from easybuild.tools.filetools import read_file, write_file
from easybuild.tools.module_naming_scheme.utilities import det_full_ec_version
from easybuild.tools.robot import resolve_dependencies, robot_find_easyconfig
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import TOOLCHAIN_CAPABILITIES
from easybuild.tools.utilities import flatten, nub, quote_str

Expand Down
3 changes: 1 addition & 2 deletions easybuild/toolchains/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@
:author: Stijn De Weirdt (Ghent University)
:author: Kenneth Hoste (Ghent University)
"""
import pkg_resources
pkg_resources.declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
4 changes: 1 addition & 3 deletions easybuild/toolchains/clanggcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@

:author: Dmitri Gribenko (National Technical University of Ukraine "KPI")
"""

import os
from easybuild.toolchains.compiler.clang import Clang
from easybuild.toolchains.compiler.gcc import Gcc
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME


TC_CONSTANT_CLANGGCC = "ClangGCC"
Expand Down
3 changes: 1 addition & 2 deletions easybuild/toolchains/compiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@
:author: Stijn De Weirdt (Ghent University)
:author: Kenneth Hoste (Ghent University)
"""
import pkg_resources
pkg_resources.declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
2 changes: 1 addition & 1 deletion easybuild/toolchains/craycce.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from easybuild.toolchains.compiler.craype import CrayPECray
from easybuild.toolchains.linalg.libsci import LibSci
from easybuild.toolchains.mpi.craympich import CrayMPICH
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME


class CrayCCE(CrayPECray, CrayMPICH, LibSci):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/toolchains/craygnu.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from easybuild.toolchains.compiler.craype import CrayPEGCC
from easybuild.toolchains.linalg.libsci import LibSci
from easybuild.toolchains.mpi.craympich import CrayMPICH
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME


class CrayGNU(CrayPEGCC, CrayMPICH, LibSci):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/toolchains/crayintel.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from easybuild.toolchains.compiler.craype import CrayPEIntel
from easybuild.toolchains.linalg.libsci import LibSci
from easybuild.toolchains.mpi.craympich import CrayMPICH
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME


class CrayIntel(CrayPEIntel, CrayMPICH, LibSci):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/toolchains/craypgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"""
from easybuild.toolchains.compiler.craype import CrayPEPGI
from easybuild.toolchains.mpi.craympich import CrayMPICH
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME

class CrayPGI(CrayPEPGI, CrayMPICH):
"""Compiler toolchain for Cray Programming Environment for Cray Compiling Environment (PGI) (PrgEnv-pgi)."""
Expand Down
3 changes: 1 addition & 2 deletions easybuild/toolchains/fft/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@
:author: Stijn De Weirdt (Ghent University)
:author: Kenneth Hoste (Ghent University)
"""
import pkg_resources
pkg_resources.declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
2 changes: 1 addition & 1 deletion easybuild/toolchains/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"""

from easybuild.toolchains.gcccore import GCCcore
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME

class GccToolchain(GCCcore):
"""Simple toolchain with just the GCC compilers."""
Expand Down
3 changes: 2 additions & 1 deletion easybuild/toolchains/gcccore.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"""

from easybuild.toolchains.compiler.gcc import Gcc
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME


class GCCcore(Gcc):
"""Compiler-only toolchain, including only GCC and binutils."""
Expand Down
1 change: 0 additions & 1 deletion easybuild/toolchains/gcccuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

from easybuild.toolchains.compiler.cuda import Cuda
from easybuild.toolchains.gcc import GccToolchain
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME


class GccCUDA(GccToolchain, Cuda):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/toolchains/gnu.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"""

from easybuild.toolchains.compiler.gcc import Gcc
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME


class GNU(Gcc):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/toolchains/iccifort.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

from easybuild.toolchains.compiler.inteliccifort import IntelIccIfort
from easybuild.toolchains.gcccore import GCCcore
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME


class IccIfort(IntelIccIfort):
Expand Down
3 changes: 1 addition & 2 deletions easybuild/toolchains/linalg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@
:author: Stijn De Weirdt (Ghent University)
:author: Kenneth Hoste (Ghent University)
"""
import pkg_resources
pkg_resources.declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
3 changes: 1 addition & 2 deletions easybuild/toolchains/mpi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@
:author: Stijn De Weirdt (Ghent University)
:author: Kenneth Hoste (Ghent University)
"""
import pkg_resources
pkg_resources.declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
2 changes: 1 addition & 1 deletion easybuild/toolchains/pgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

from easybuild.toolchains.compiler.pgi import Pgi
from easybuild.toolchains.gcccore import GCCcore
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME


class PgiToolchain(Pgi):
Expand Down
3 changes: 1 addition & 2 deletions easybuild/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@
:author: Pieter De Baets (Ghent University)
:author: Jens Timmerman (Ghent University)
"""
import pkg_resources
pkg_resources.declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
36 changes: 0 additions & 36 deletions easybuild/tools/deprecated/__init__.py
Original file line number Diff line number Diff line change
@@ -1,36 +0,0 @@
##
# Copyright 2009-2019 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (FWO) (http://www.fwo.be/en)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# https://github.com/easybuilders/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
##
"""
This declares the namespace for the tools.deprecated submodule of EasyBuild,
which provides deprecated functionality.

:author: Stijn De Weirdt (Ghent University)
:author: Dries Verdegem (Ghent University)
:author: Kenneth Hoste (Ghent University)
:author: Pieter De Baets (Ghent University)
:author: Jens Timmerman (Ghent University)
"""
import pkg_resources
pkg_resources.declare_namespace(__name__)
2 changes: 1 addition & 1 deletion easybuild/tools/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
from easybuild.tools.filetools import read_file
from easybuild.tools.modules import modules_tool
from easybuild.tools.py2vs3 import OrderedDict, ascii_lowercase
from easybuild.tools.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.toolchain import DUMMY_TOOLCHAIN_NAME
from easybuild.tools.toolchain.utilities import search_toolchain
from easybuild.tools.utilities import INDENT_2SPACES, INDENT_4SPACES
from easybuild.tools.utilities import import_available_modules, mk_rst_table, nub, quote_str
Expand Down
15 changes: 6 additions & 9 deletions easybuild/tools/include.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,13 @@
# body for __init__.py file in package directory, which takes care of making sure the package can be distributed
# across multiple directories
PKG_INIT_BODY = """
import pkg_resources
pkg_resources.declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
"""

# more extensive __init__.py specific to easybuild.easyblocks package;
# this is required because of the way in which the easyblock Python modules are organised in the easybuild-easyblocks
# repository, i.e. in first-letter subdirectories
EASYBLOCKS_PKG_INIT_BODY = """
import pkg_resources
import pkgutil

# extend path so Python finds our easyblocks in the subdirectories where they are located
Expand All @@ -75,8 +73,7 @@

del l, subdir, subdirs

# extend path so Python knows this is not the only place to look for modules in this package
pkg_resources.declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
"""


Expand All @@ -88,7 +85,7 @@ def create_pkg(path, pkg_init_body=None):
if not os.path.exists(path):
os.makedirs(path)

# put __init__.py files in place, with required pkg_resources.declare_namespace statement
# put __init__.py files in place, with required pkgutil.extend_path statement
# note: can't use write_file, since that required build options to be initialised
with open(init_path, 'w') as handle:
if pkg_init_body is None:
Expand Down Expand Up @@ -182,7 +179,7 @@ def include_easyblocks(tmpdir, paths):
import easybuild.easyblocks.generic

# hard inject location to included (generic) easyblocks into Python search path
# only prepending to sys.path is not enough due to 'declare_namespace' in easybuild/easyblocks/__init__.py
# only prepending to sys.path is not enough due to 'pkgutil.extend_path' in easybuild/easyblocks/__init__.py
new_path = os.path.join(easyblocks_path, 'easybuild', 'easyblocks')
easybuild.easyblocks.__path__.insert(0, new_path)
new_path = os.path.join(new_path, 'generic')
Expand Down Expand Up @@ -219,7 +216,7 @@ def include_module_naming_schemes(tmpdir, paths):
sys.path.insert(0, mns_path)

# hard inject location to included module naming schemes into Python search path
# only prepending to sys.path is not enough due to 'declare_namespace' in module_naming_scheme/__init__.py
# only prepending to sys.path is not enough due to 'pkgutil.extend_path' in module_naming_scheme/__init__.py
new_path = os.path.join(mns_path, 'easybuild', 'tools', 'module_naming_scheme')
easybuild.tools.module_naming_scheme.__path__.insert(0, new_path)

Expand Down Expand Up @@ -265,7 +262,7 @@ def include_toolchains(tmpdir, paths):
sys.path.insert(0, toolchains_path)

# reload toolchain modules and hard inject location to included toolchains into Python search path
# only prepending to sys.path is not enough due to 'declare_namespace' in toolchains/*/__init__.py
# only prepending to sys.path is not enough due to 'pkgutil.extend_path' in toolchains/*/__init__.py
easybuild.toolchains.__path__.insert(0, os.path.join(toolchains_path, 'easybuild', 'toolchains'))
for subpkg in toolchain_subpkgs:
tcpkg = 'easybuild.toolchains.%s' % subpkg
Expand Down
32 changes: 0 additions & 32 deletions easybuild/tools/job/__init__.py
Original file line number Diff line number Diff line change
@@ -1,32 +0,0 @@
##
# Copyright 2011-2019 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (FWO) (http://www.fwo.be/en)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# https://github.com/easybuilders/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
##
"""
Declares easybuild.tools.job namespace, in an extendable way.

:author: Jens Timmerman (Ghent University)
:author: Kenneth Hoste (Ghent University)
"""
import pkg_resources
pkg_resources.declare_namespace(__name__)
10 changes: 1 addition & 9 deletions easybuild/tools/module_naming_scheme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,4 @@
:author: Jens Timmerman (Ghent University)
:author: Kenneth Hoste (Ghent University)
"""
import pkg_resources

# required for backward compatibility
from easybuild.tools.module_naming_scheme.mns import ModuleNamingScheme

pkg_resources.declare_namespace(__name__)

# suffix for devel module filename
DEVEL_MODULE_SUFFIX = '-easybuild-devel'
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
2 changes: 1 addition & 1 deletion easybuild/tools/module_naming_scheme/categorized_mns.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import os
import re

from easybuild.tools.module_naming_scheme import ModuleNamingScheme
from easybuild.tools.module_naming_scheme.mns import ModuleNamingScheme
from easybuild.tools.module_naming_scheme.utilities import det_full_ec_version

class CategorizedModuleNamingScheme(ModuleNamingScheme):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/tools/module_naming_scheme/easybuild_mns.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import os

from easybuild.tools.module_naming_scheme import ModuleNamingScheme
from easybuild.tools.module_naming_scheme.mns import ModuleNamingScheme
from easybuild.tools.module_naming_scheme.utilities import det_full_ec_version


Expand Down
2 changes: 1 addition & 1 deletion easybuild/tools/module_naming_scheme/hierarchical_mns.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import re

from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.module_naming_scheme import ModuleNamingScheme
from easybuild.tools.module_naming_scheme.mns import ModuleNamingScheme
from easybuild.tools.module_naming_scheme.toolchain import det_toolchain_compilers, det_toolchain_mpi


Expand Down
Loading