Skip to content

Commit

Permalink
Use new constant dicts instead of list
Browse files Browse the repository at this point in the history
Required after the conversion in easybuilders/easybuild-framework#4595
  • Loading branch information
Flamefire committed Aug 30, 2024
1 parent 63ad773 commit 856f0bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions easybuild/easyblocks/generic/pythonpackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from easybuild.easyblocks.python import EBPYTHONPREFIXES, EXTS_FILTER_PYTHON_PACKAGES
from easybuild.framework.easyconfig import CUSTOM
from easybuild.framework.easyconfig.default import DEFAULT_CONFIG
from easybuild.framework.easyconfig.templates import TEMPLATE_CONSTANTS
from easybuild.framework.easyconfig.templates import PYPI_SOURCE
from easybuild.framework.extensioneasyblock import ExtensionEasyBlock
from easybuild.tools.build_log import EasyBuildError, print_msg
from easybuild.tools.config import build_option
Expand Down Expand Up @@ -372,7 +372,7 @@ def extra_options(extra_vars=None):
if 'source_urls' not in extra_vars:
# Create a copy so the defaults are not modified by the following line
src_urls = DEFAULT_CONFIG['source_urls'][:]
src_urls[0] = [url for name, url, _ in TEMPLATE_CONSTANTS if name == 'PYPI_SOURCE']
src_urls[0] = [PYPI_SOURCE]
extra_vars['source_urls'] = src_urls

return ExtensionEasyBlock.extra_options(extra_vars=extra_vars)
Expand Down
4 changes: 2 additions & 2 deletions easybuild/easyblocks/p/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import easybuild.tools.environment as env
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyconfig import CUSTOM
from easybuild.framework.easyconfig.templates import TEMPLATE_CONSTANTS
from easybuild.framework.easyconfig.templates import PYPI_SOURCE
from easybuild.tools.build_log import EasyBuildError, print_warning
from easybuild.tools.config import build_option, ERROR, log_path
from easybuild.tools.modules import get_software_libdir, get_software_root, get_software_version
Expand Down Expand Up @@ -149,7 +149,7 @@ def __init__(self, *args, **kwargs):

ext_defaults = {
# Use PYPI_SOURCE as the default for source_urls of extensions.
'source_urls': [url for name, url, _ in TEMPLATE_CONSTANTS if name == 'PYPI_SOURCE'],
'source_urls': [PYPI_SOURCE],
# We should enable this (by default) for all extensions because the only installed packages at this point
# (i.e. those in the site-packages folder) are the default installed ones, e.g. pip & setuptools.
# And we must upgrade them cleanly, i.e. uninstall them first. This also applies to any other package
Expand Down

0 comments on commit 856f0bc

Please sign in to comment.