|
48 | 48 | from easybuild.framework.easyconfig.templates import template_documentation |
49 | 49 | from easybuild.framework.easyconfig.tools import get_paths_for |
50 | 50 | from easybuild.framework.extension import Extension |
51 | | -from easybuild.tools import build_log, config, run # @UnusedImport make sure config is always initialized! |
| 51 | +from easybuild.tools import build_log, config, run # build_log should always stay there, to ensure EasyBuildLog |
52 | 52 | from easybuild.tools.build_log import EasyBuildError, raise_easybuilderror |
53 | 53 | from easybuild.tools.config import DEFAULT_LOGFILE_FORMAT, DEFAULT_MNS, DEFAULT_MODULE_SYNTAX, DEFAULT_MODULES_TOOL |
54 | | -from easybuild.tools.config import DEFAULT_MODULECLASSES, DEFAULT_PATH_SUBDIRS |
55 | | -from easybuild.tools.config import DEFAULT_PREFIX, DEFAULT_REPOSITORY |
| 54 | +from easybuild.tools.config import DEFAULT_MODULECLASSES, DEFAULT_PATH_SUBDIRS, DEFAULT_PREFIX, DEFAULT_REPOSITORY |
56 | 55 | from easybuild.tools.config import DEFAULT_STRICT, get_pretend_installpath, mk_full_default_path |
57 | 56 | from easybuild.tools.configobj import ConfigObj, ConfigObjError |
58 | 57 | from easybuild.tools.docs import FORMAT_RST, FORMAT_TXT, avail_easyconfig_params |
|
63 | 62 | from easybuild.tools.module_naming_scheme.utilities import avail_module_naming_schemes |
64 | 63 | from easybuild.tools.modules import Lmod |
65 | 64 | from easybuild.tools.ordereddict import OrderedDict |
66 | | -import easybuild.tools.package.utilities as packaging |
67 | | -from easybuild.tools.package.utilities import DEFAULT_PNS |
68 | | -from easybuild.tools.package.activepns import avail_package_naming_scheme |
| 65 | +from easybuild.tools.package.utilities import DEFAULT_PNS, avail_package_naming_schemes, check_pkg_support |
69 | 66 | from easybuild.tools.toolchain.utilities import search_toolchain |
70 | 67 | from easybuild.tools.repository.repository import avail_repositories |
71 | 68 | from easybuild.tools.version import this_is_easybuild |
@@ -267,7 +264,7 @@ def config_options(self): |
267 | 264 | 'packagepath': ("The destination path for the packages built by package-tool", |
268 | 265 | None, 'store', mk_full_default_path('packagepath')), |
269 | 266 | 'package-naming-scheme': ("Packaging naming scheme choice", |
270 | | - 'choice', 'store', DEFAULT_PNS, sorted(avail_package_naming_scheme().keys())), |
| 267 | + 'choice', 'store', DEFAULT_PNS, sorted(avail_package_naming_schemes().keys())), |
271 | 268 | 'prefix': (("Change prefix for buildpath, installpath, sourcepath and repositorypath " |
272 | 269 | "(used prefix for defaults %s)" % DEFAULT_PREFIX), |
273 | 270 | None, 'store', None), |
@@ -472,15 +469,12 @@ def postprocess(self): |
472 | 469 |
|
473 | 470 | self._postprocess_config() |
474 | 471 |
|
475 | | - #Check experimental option dependencies (for now packaging) |
476 | | - #print "Got config_options: %s" % packaging.config_options |
477 | | - package_options = [ getattr(self.options, x) for x in packaging.config_options if getattr(self.options, x) ] |
478 | | - if any( package_options ): |
479 | | - packaging.option_postprocess() |
| 472 | + # check whether packaging is supported when it's being used |
| 473 | + if any([self.options.package_tool, self.options.package_type]): |
| 474 | + check_pkg_support() |
480 | 475 | else: |
481 | 476 | self.log.debug("Didn't find any packaging options") |
482 | 477 |
|
483 | | - |
484 | 478 | def _postprocess_external_modules_metadata(self): |
485 | 479 | """Parse file(s) specifying metadata for external modules.""" |
486 | 480 | # leave external_modules_metadata untouched if no files are provided |
|
0 commit comments