Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use PYPI_SOURCE constant in generic PythonPackage easyblock + custom easyblock for Python #3410

Merged
merged 1 commit into from
Aug 30, 2024
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
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
Loading