diff --git a/.builders/build.py b/.builders/build.py index f1cf092c82dff..838edb70e9000 100644 --- a/.builders/build.py +++ b/.builders/build.py @@ -107,6 +107,7 @@ def build_macos(): env = { **os.environ, 'DD_MOUNT_DIR': mount_dir, + 'DD_ENV_FILE': mount_dir / '.env', # Paths to pythons 'DD_PY3_BUILDENV_PATH': builder_root / 'py3' / 'bin' / 'python', 'DD_PY2_BUILDENV_PATH': builder_root / 'py2' / 'bin' / 'python', diff --git a/.builders/images/linux-x86_64/Dockerfile b/.builders/images/linux-x86_64/Dockerfile index d49e249ba7899..8e9846c46800e 100644 --- a/.builders/images/linux-x86_64/Dockerfile +++ b/.builders/images/linux-x86_64/Dockerfile @@ -21,7 +21,6 @@ ENV LD_LIBRARY_PATH="/opt/python/${PYTHON2_VERSION}/lib:${LD_LIBRARY_PATH}" # Set up virtual environment for Python 2 RUN /opt/python/${PYTHON2_VERSION}/bin/python -m pip install --no-warn-script-location virtualenv \ && /opt/python/${PYTHON2_VERSION}/bin/python -m virtualenv /py2 -ENV DD_PY2_BUILDENV_PATH=/py2/bin/python # openssl RUN yum install -y perl-IPC-Cmd && \ @@ -51,7 +50,6 @@ ENV LD_LIBRARY_PATH="/opt/python/${PYTHON_VERSION}/lib:${LD_LIBRARY_PATH}" RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-warn-script-location --upgrade pip \ && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-warn-script-location virtualenv \ && /opt/python/${PYTHON_VERSION}/bin/python3 -m virtualenv /py3 -ENV DD_PY3_BUILDENV_PATH=/py3/bin/python # Rust toolchain ENV RUST_VERSION="nightly-2022-05-15" @@ -167,6 +165,5 @@ RUN python3 -m pip install --no-warn-script-location -r /runner_dependencies.txt COPY build_script.sh /build_script.sh ENV DD_BUILD_COMMAND="bash /build_script.sh" -ENV DD_MOUNT_DIR="/home" ENTRYPOINT ["python3", "/home/scripts/build_wheels.py"] diff --git a/.builders/scripts/build_wheels.py b/.builders/scripts/build_wheels.py index cda64693a00cd..5f12950d9ce44 100644 --- a/.builders/scripts/build_wheels.py +++ b/.builders/scripts/build_wheels.py @@ -11,6 +11,7 @@ from dotenv import dotenv_values from utils import extract_metadata, normalize_project_name + if sys.platform == 'win32': PY3_PATH = Path('C:\\py3\\Scripts\\python.exe') PY2_PATH = Path('C:\\py2\\Scripts\\python.exe') @@ -29,7 +30,7 @@ def path_to_uri(path: str) -> str: PY3_PATH = Path(os.environ.get('DD_PY3_BUILDENV_PATH', '/py3/bin/python')) PY2_PATH = Path(os.environ.get('DD_PY2_BUILDENV_PATH', '/py2/bin/python')) MOUNT_DIR = Path(os.environ.get('DD_MOUNT_DIR', '/home')) - ENV_FILE = MOUNT_DIR / '.env' + ENV_FILE = Path(os.environ.get('DD_ENV_FILE', '/.env')) def join_command_args(args: list[str]) -> str: return shlex.join(args)