-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
# setup | ||
FROM tobix/pywine:3.12 | ||
ENV WINEARCH=win64 | ||
# python version to install | ||
ENV PYVER=3.12.0-amd64 | ||
WORKDIR /code | ||
VOLUME /code/docker_output | ||
# installing depencies | ||
RUN apt update -y && apt install git -y | ||
RUN apt update -y && apt install wget xvfb git -y | ||
# installing python | ||
RUN wget -O /tmp/python-$PYVER.exe https://www.python.org/ftp/python/$PYVER/python-$PYVER.exe | ||
RUN xvfb-run wine /tmp/python-$PYVER.exe /quiet InstallAllUsers=1 TargetDir=C:\\py Include_doc=0 Include_launcher=0 Include_test=0 PrependPath=1 | ||
# hack to bypass missing implementation of CopyFile2 in Wine(needed for python 3.12.0 and above) | ||
RUN sed -i 's/"CopyFile2"/"CopyFile2_xx_invalid_disabled"/' /opt/wineprefix/drive_c/py/Lib/shutil.py | ||
# copying code | ||
COPY . /code | ||
# installing pip depencies | ||
RUN wine python -m pip install --disable-pip-version-check --no-cache-dir -U wheel pip | ||
RUN wine python -m pip install --disable-pip-version-check --no-cache-dir -r requirements.txt -r buildrequirements.txt | ||
RUN wine C:\\py\\python.exe -m pip install --disable-pip-version-check --no-cache-dir -U wheel pip | ||
RUN wine C:\\py\\python.exe -m pip install --disable-pip-version-check --no-cache-dir -r requirements.txt -r buildrequirements.txt | ||
# build | ||
CMD ["sh", "-c", "wine python build.py --compiled --release --zip --docker --githash $(git rev-parse --short HEAD)"] | ||
CMD ["sh", "-c", "wine C:\\py\\python.exe build.py --compiled --release --zip --docker --githash $(git rev-parse --short HEAD) --winever $(wine --version)"] |