Skip to content

Commit

Permalink
Adjustments to environment variables and paths
Browse files Browse the repository at this point in the history
  • Loading branch information
alopezz committed Jan 26, 2024
1 parent f6c9eaa commit ebd3909
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions .builders/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 0 additions & 3 deletions .builders/images/linux-x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"]
3 changes: 2 additions & 1 deletion .builders/scripts/build_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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)
Expand Down

0 comments on commit ebd3909

Please sign in to comment.