|
|
@ -14,6 +14,7 @@ from .config import (
|
|
|
|
|
|
|
|
|
|
|
|
from .host_configs import (
|
|
|
|
from .host_configs import (
|
|
|
|
PosixConfig,
|
|
|
|
PosixConfig,
|
|
|
|
|
|
|
|
DockerConfig,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
from .util import (
|
|
|
|
from .util import (
|
|
|
@ -55,8 +56,14 @@ def run_pypi_proxy(args: EnvironmentConfig, targets_use_pypi: bool) -> None:
|
|
|
|
return # user has overridden the proxy endpoint, there is nothing to provision
|
|
|
|
return # user has overridden the proxy endpoint, there is nothing to provision
|
|
|
|
|
|
|
|
|
|
|
|
versions_needing_proxy: tuple[str, ...] = tuple() # preserved for future use, no versions currently require this
|
|
|
|
versions_needing_proxy: tuple[str, ...] = tuple() # preserved for future use, no versions currently require this
|
|
|
|
|
|
|
|
containers_needing_proxy: set[str] = {'centos7'}
|
|
|
|
posix_targets = [target for target in args.targets if isinstance(target, PosixConfig)]
|
|
|
|
posix_targets = [target for target in args.targets if isinstance(target, PosixConfig)]
|
|
|
|
need_proxy = targets_use_pypi and any(target.python.version in versions_needing_proxy for target in posix_targets)
|
|
|
|
need_proxy = targets_use_pypi and any(
|
|
|
|
|
|
|
|
target.python.version in versions_needing_proxy or
|
|
|
|
|
|
|
|
(isinstance(target, DockerConfig) and target.name in containers_needing_proxy)
|
|
|
|
|
|
|
|
for target in posix_targets
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
use_proxy = args.pypi_proxy or need_proxy
|
|
|
|
use_proxy = args.pypi_proxy or need_proxy
|
|
|
|
|
|
|
|
|
|
|
|
if not use_proxy:
|
|
|
|
if not use_proxy:
|
|
|
|