зеркало из https://github.com/microsoft/Oryx.git
Williamhe/Python.h error workaround (#1865)
* Update requirementstxt * Update requirementstxt * Add python cffi libary * Add additional libaries to python * Remove libffi6, not supported * Add new library * Update libraries * Update pip gcc flags * Add packages to build all optional python modules * Add additional python module requirements * Add integration test * Update to test version 3.11.1 * Update after running generateConstants.sh script which distributes constants.yaml constants across Oryx repo * Add python 3.11.1 * Remove bad package causing pipeline failure * Remove bad package and add comments * Remove unnecessary flag * Remove sandbox storage account * Remove additional packages for runtime * Update dependencies * Revert dependencies * Update python runtime tag * Update python version * Update python version * Add 3.8.16 python back * Update runtime tag * Update runtime tag
This commit is contained in:
Родитель
32681a73b6
Коммит
a21a42ccbb
|
@ -1,6 +1,6 @@
|
|||
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
|
||||
|
||||
PYTHON_RUNTIME_BASE_TAG='20221116.1'
|
||||
PYTHON_RUNTIME_BASE_TAG='20230208.7'
|
||||
PIP_VERSION='21.2.4'
|
||||
PYTHON27_VERSION='2.7.18'
|
||||
PYTHON36_VERSION='3.6.15'
|
||||
|
@ -8,4 +8,4 @@ PYTHON37_VERSION='3.7.15'
|
|||
PYTHON38_VERSION='3.8.16'
|
||||
PYTHON39_VERSION='3.9.15'
|
||||
PYTHON310_VERSION='3.10.8'
|
||||
PYTHON311_VERSION='3.11.0'
|
||||
PYTHON311_VERSION='3.11.1'
|
||||
|
|
|
@ -37,17 +37,31 @@ buildPythonfromSource()
|
|||
apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
# Adding additional python packages to support all optional python modules:
|
||||
# https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies
|
||||
build-essential \
|
||||
tk-dev \
|
||||
libgeos-dev \
|
||||
libssl-dev \
|
||||
libncurses5-dev \
|
||||
libsqlite3-dev \
|
||||
libreadline-dev \
|
||||
libbz2-dev \
|
||||
libgdm-dev \
|
||||
gdb \
|
||||
lcov \
|
||||
libbluetooth-dev \
|
||||
libbz2-dev \
|
||||
libffi-dev \
|
||||
libgdbm-dev \
|
||||
libgdm-dev \
|
||||
libgeos-dev \
|
||||
liblzma-dev \
|
||||
libncurses5-dev \
|
||||
libreadline-dev \
|
||||
libreadline6-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
lzma \
|
||||
lzma-dev \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
tk-dev \
|
||||
uuid-dev
|
||||
uuid-dev \
|
||||
zlib1g-dev \
|
||||
|
||||
# Try getting the keys 5 times at most
|
||||
/tmp/receiveGpgKeys.sh $gpgKey
|
||||
|
|
|
@ -142,15 +142,15 @@
|
|||
file-name-prefix: __
|
||||
- name: python-versions
|
||||
constants:
|
||||
python-runtime-base-tag: 20221116.1
|
||||
python-runtime-base-tag: 20230208.7
|
||||
pip-version: 21.2.4
|
||||
python27-version: 2.7.18
|
||||
python36-version: 3.6.15
|
||||
python37-version: 3.7.15
|
||||
python38-version: 3.8.15
|
||||
python38-version: 3.8.16
|
||||
python39-version: 3.9.15
|
||||
python310-version: 3.10.8
|
||||
python311-version: 3.11.0
|
||||
python311-version: 3.11.1
|
||||
runtime-versions:
|
||||
- 2.7
|
||||
- 3.6
|
||||
|
|
|
@ -960,6 +960,7 @@
|
|||
- 3.7.15
|
||||
- 3.8.6
|
||||
- 3.8.12
|
||||
- 3.8.15
|
||||
- 3.8.16
|
||||
- 3.9.0
|
||||
- 3.9.1rc1
|
||||
|
@ -971,6 +972,7 @@
|
|||
- 3.10.8
|
||||
- 3.11.0b1
|
||||
- 3.11.0
|
||||
- 3.11.1
|
||||
|
||||
### buster
|
||||
|
||||
|
@ -981,6 +983,7 @@
|
|||
- 3.7.15
|
||||
- 3.8.6
|
||||
- 3.8.12
|
||||
- 3.8.15
|
||||
- 3.8.16
|
||||
- 3.9.0
|
||||
- 3.9.1rc1
|
||||
|
@ -1000,6 +1003,7 @@
|
|||
- 3.7.15
|
||||
- 3.8.6
|
||||
- 3.8.12
|
||||
- 3.8.15
|
||||
- 3.8.16
|
||||
- 3.9.0
|
||||
- 3.9.1rc1
|
||||
|
@ -1045,6 +1049,7 @@
|
|||
- 3.8.5
|
||||
- 3.8.6
|
||||
- 3.8.12
|
||||
- 3.8.15
|
||||
- 3.8.16
|
||||
- 3.9.0
|
||||
- 3.9.1rc1
|
||||
|
|
|
@ -28,15 +28,28 @@ RUN set -ex \
|
|||
# Install Python SDKs
|
||||
# Upgrade system python
|
||||
&& PYTHONIOENCODING="UTF-8" \
|
||||
# It's not clear whether these are needed at runtime...
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
# Adding additional python packages to support all optional python modules:
|
||||
# https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies
|
||||
build-essential \
|
||||
python3-pip \
|
||||
swig \
|
||||
tk-dev \
|
||||
uuid-dev \
|
||||
python3-dev \
|
||||
libffi-dev \
|
||||
gdb \
|
||||
lcov \
|
||||
pkg-config \
|
||||
libgdbm-dev \
|
||||
liblzma-dev \
|
||||
libreadline6-dev \
|
||||
lzma \
|
||||
lzma-dev \
|
||||
zlib1g-dev \
|
||||
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN set -ex \
|
||||
|
|
|
@ -33,6 +33,19 @@ RUN apt-get update \
|
|||
# For .NET Core 1.1
|
||||
libuuid1 \
|
||||
libunwind8 \
|
||||
# Adding additional python packages to support all optional python modules:
|
||||
# https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies
|
||||
python3-dev \
|
||||
libffi-dev \
|
||||
gdb \
|
||||
lcov \
|
||||
pkg-config \
|
||||
libgdbm-dev \
|
||||
liblzma-dev \
|
||||
libreadline6-dev \
|
||||
lzma \
|
||||
lzma-dev \
|
||||
zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
# This is the folder containing 'links' to benv and build script generator
|
||||
&& mkdir -p /opt/oryx
|
||||
|
|
|
@ -37,6 +37,19 @@ RUN LANG="C.UTF-8" \
|
|||
libproj-dev \
|
||||
gdal-bin \
|
||||
libgdal-dev \
|
||||
# Adding additional python packages to support all optional python modules:
|
||||
# https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies
|
||||
python3-dev \
|
||||
libffi-dev \
|
||||
gdb \
|
||||
lcov \
|
||||
pkg-config \
|
||||
libgdbm-dev \
|
||||
liblzma-dev \
|
||||
libreadline6-dev \
|
||||
lzma \
|
||||
lzma-dev \
|
||||
zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& pip install pip --upgrade \
|
||||
&& pip3 install pip --upgrade \
|
||||
|
|
|
@ -32,6 +32,19 @@ RUN apt-get update \
|
|||
libproj-dev \
|
||||
gdal-bin \
|
||||
libgdal-dev \
|
||||
# Adding additional python packages to support all optional python modules:
|
||||
# https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies
|
||||
python3-dev \
|
||||
libffi-dev \
|
||||
gdb \
|
||||
lcov \
|
||||
pkg-config \
|
||||
libgdbm-dev \
|
||||
liblzma-dev \
|
||||
libreadline6-dev \
|
||||
lzma \
|
||||
lzma-dev \
|
||||
zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& pip install pip --upgrade \
|
||||
&& pip3 install pip --upgrade \
|
||||
|
|
|
@ -40,6 +40,19 @@ RUN apt-get update \
|
|||
sqlite3 \
|
||||
libsqlite3-dev \
|
||||
software-properties-common \
|
||||
# Adding additional python packages to support all optional python modules:
|
||||
# https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies
|
||||
python3-dev \
|
||||
libffi-dev \
|
||||
gdb \
|
||||
lcov \
|
||||
pkg-config \
|
||||
libgdbm-dev \
|
||||
liblzma-dev \
|
||||
libreadline6-dev \
|
||||
lzma \
|
||||
lzma-dev \
|
||||
zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
# This is the folder containing 'links' to benv and build script generator
|
||||
&& apt-get update \
|
||||
|
|
|
@ -41,6 +41,19 @@ RUN apt-get update \
|
|||
sqlite3 \
|
||||
libsqlite3-dev \
|
||||
software-properties-common \
|
||||
# Adding additional python packages to support all optional python modules:
|
||||
# https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies
|
||||
python3-dev \
|
||||
libffi-dev \
|
||||
gdb \
|
||||
lcov \
|
||||
pkg-config \
|
||||
libgdbm-dev \
|
||||
liblzma-dev \
|
||||
libreadline6-dev \
|
||||
lzma \
|
||||
lzma-dev \
|
||||
zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
# This is the folder containing 'links' to benv and build script generator
|
||||
&& apt-get update \
|
||||
|
|
|
@ -218,6 +218,15 @@ benv-resolve() {
|
|||
export LIBRARY_PATH="$platformDir/lib:$LIBRARY_PATH"
|
||||
export LD_LIBRARY_PATH="$platformDir/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
# C_INCLUDE_PATH tells gcc where to find C header files
|
||||
# CPLUS_INCLUDE_PATH tells gcc where to find C++ header files
|
||||
# This is a workaround solution for Python.h error which arises
|
||||
# when python can't find specific header files:
|
||||
# https://stackoverflow.com/questions/24391964/how-can-i-get-python-h-into-my-python-virtualenv-on-mac-osx/47956013#47956013
|
||||
# Since Oryx dynamically installs SDKs in /tmp
|
||||
export C_INCLUDE_PATH="$platformDir/include/python$majorAndMinorParts"
|
||||
export CPLUS_INCLUDE_PATH="$platformDir/include/python$majorAndMinorParts"
|
||||
|
||||
local binDir="$platformDir/bin"
|
||||
updatePath "$binDir"
|
||||
export python="$binDir/python$majorAndMinorParts"
|
||||
|
|
|
@ -33,7 +33,7 @@ ADD build ${BUILD_DIR}
|
|||
RUN find ${IMAGES_DIR} -type f -iname "*.sh" -exec chmod +x {} \;
|
||||
RUN find ${BUILD_DIR} -type f -iname "*.sh" -exec chmod +x {} \;
|
||||
|
||||
ENV PYTHON_VERSION 3.11.0
|
||||
ENV PYTHON_VERSION 3.11.1
|
||||
RUN true
|
||||
COPY build/__pythonVersions.sh ${BUILD_DIR}
|
||||
RUN true
|
||||
|
@ -53,7 +53,7 @@ RUN ${BUILD_DIR}/buildPythonSdkByVersion.sh $PYTHON_VERSION $DEBIAN_FLAVOR
|
|||
|
||||
RUN set -ex \
|
||||
&& cd /opt/python/ \
|
||||
&& ln -s 3.11.0 3.11 \
|
||||
&& ln -s 3.11.1 3.11 \
|
||||
&& ln -s 3.11 3 \
|
||||
&& echo /opt/python/3/lib >> /etc/ld.so.conf.d/python.conf \
|
||||
&& ldconfig \
|
||||
|
|
|
@ -30,24 +30,28 @@ PYTHON_GET_PIP_URL="https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2d
|
|||
libgdm-dev \
|
||||
libbluetooth-dev \
|
||||
tk-dev \
|
||||
uuid-dev
|
||||
|
||||
if [ "${PYTHON_VERSION[0]}" == "3" ] && [ "${PYTHON_VERSION[1]}" -ge "10" ]
|
||||
then
|
||||
apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
uuid-dev \
|
||||
# Adding additional python packages to support all optional python modules:
|
||||
# https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies
|
||||
build-essential \
|
||||
libgeos-dev \
|
||||
PYTHON_GET_PIP_URL="https://bootstrap.pypa.io/get-pip.py"
|
||||
fi
|
||||
gdb \
|
||||
lcov \
|
||||
pkg-config \
|
||||
libffi-dev \
|
||||
libgdbm-dev \
|
||||
liblzma-dev \
|
||||
libsqlite3-dev \
|
||||
lzma \
|
||||
lzma-dev \
|
||||
zlib1g-dev
|
||||
|
||||
PYTHON_GET_PIP_URL="https://bootstrap.pypa.io/get-pip.py"
|
||||
|
||||
if [ "$debianFlavor" == "stretch" ]; then
|
||||
# Use default python sdk file name
|
||||
echo "Hack flavor is: "$debianHackFlavor
|
||||
|
||||
pythonSdkFileName=python-$PYTHON_VERSION.tar.gz
|
||||
PYTHON_GET_PIP_URL="https://bootstrap.pypa.io/get-pip.py"
|
||||
|
||||
if [[ $PYTHON_VERSION == 3.6* ]]; then
|
||||
PYTHON_GET_PIP_URL="https://bootstrap.pypa.io/pip/3.6/get-pip.py"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
3.8.6, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.8.12, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.8.15, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.8.16, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
|
||||
3.9.0, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.9.1rc1, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
|
@ -19,5 +20,6 @@
|
|||
|
||||
3.11.0b1, A035C8C19219BA821ECEA86B64E628F8D684696D,
|
||||
3.11.0, A035C8C19219BA821ECEA86B64E628F8D684696D
|
||||
3.11.1, A035C8C19219BA821ECEA86B64E628F8D684696D
|
||||
|
||||
# NOTE: Make sure to set the default version in 'defaultVersion.txt' file
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
3.8.6, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.8.12, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.8.15, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.8.16, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
|
||||
3.9.0, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.9.1rc1, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
3.8.6, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.8.12, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.8.15, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.8.16, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
|
||||
3.9.0, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.9.1rc1, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
3.8.6, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.8.12, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.8.15, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.8.16, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
|
||||
3.9.0, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
3.9.1rc1, E3FF2839C048B25C084DEBE9B26995E310250568,
|
||||
|
|
|
@ -46,14 +46,28 @@ namespace Microsoft.Oryx.BuildScriptGenerator
|
|||
stringBuilder.AppendAptGetInstallPackages(
|
||||
"make",
|
||||
"unzip",
|
||||
"build-essential",
|
||||
"libpq-dev",
|
||||
"moreutils",
|
||||
"python3-pip",
|
||||
"swig",
|
||||
"tk-dev",
|
||||
"unixodbc-dev",
|
||||
"uuid-dev");
|
||||
"build-essential", // Adding additional python 3 packages to support all optional python modules: https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies
|
||||
"gdb",
|
||||
"lcov",
|
||||
"pkg-config",
|
||||
"libbz2-dev",
|
||||
"libffi-dev",
|
||||
"libgdbm-dev",
|
||||
"liblzma-dev",
|
||||
"libncurses5-dev",
|
||||
"libreadline6-dev",
|
||||
"libsqlite3-dev",
|
||||
"libssl-dev",
|
||||
"lzma",
|
||||
"lzma-dev",
|
||||
"tk-dev",
|
||||
"uuid-dev",
|
||||
"zlib1g-dev");
|
||||
|
||||
// Install Python 3.8
|
||||
stringBuilder.AppendLine("tmpDir=\"/opt/tmp\"");
|
||||
|
@ -195,17 +209,6 @@ namespace Microsoft.Oryx.BuildScriptGenerator
|
|||
.AppendLine($" fi")
|
||||
.AppendLine("fi")
|
||||
|
||||
// Required for python 3.10 and 3.11
|
||||
.AppendLine($"PIP_GCC_FLAGS=\"\"")
|
||||
.AppendLine($"if [ \"$platformName\" = \"python\" ]; then")
|
||||
.AppendLine($" if [[ '{version}' == 3.10* ]] || [[ '{version}' == 3.11* ]]; then")
|
||||
.AppendLine($" echo \"Enabling --global-option to pip for gcc modules...\"")
|
||||
.AppendLine($" pythonMajorMinorVersion={version.Substring(0, version.LastIndexOf('.'))}")
|
||||
.AppendLine($" dynamicInstallationPythonIncludeDirectory={versionDirInTemp}/include/python$pythonMajorMinorVersion")
|
||||
.AppendLine($" PIP_GCC_FLAGS=\"--global-option=build_ext --global-option=-I$dynamicInstallationPythonIncludeDirectory\"")
|
||||
.AppendLine($" fi")
|
||||
.AppendLine("fi")
|
||||
|
||||
// Write out a sentinel file to indicate download and extraction was successful
|
||||
.AppendLine($"echo > {Path.Combine(versionDirInTemp, SdkStorageConstants.SdkDownloadSentinelFileName)}");
|
||||
|
||||
|
|
|
@ -70,14 +70,6 @@ fi
|
|||
output=$( ( python -m pip install --cache-dir $PIP_CACHE_DIR --prefer-binary -r $REQUIREMENTS_TXT_FILE | ts $TS_FMT; exit ${PIPESTATUS[0]} ) 2>&1; exit ${PIPESTATUS[0]} )
|
||||
pipInstallExitCode=${PIPESTATUS[0]}
|
||||
|
||||
if [[ $pipInstallExitCode != 0 ]]; then
|
||||
echo "Retrying pip install with additional flags: \"$PIP_GCC_FLAGS\"..."
|
||||
InstallCommand="python -m pip install $PIP_GCC_FLAGS --cache-dir $PIP_CACHE_DIR --prefer-binary -r $REQUIREMENTS_TXT_FILE | ts $TS_FMT"
|
||||
printf %s " , $InstallCommand" >> "$COMMAND_MANIFEST_FILE"
|
||||
output=$( ( python -m pip install $PIP_GCC_FLAGS --cache-dir $PIP_CACHE_DIR --prefer-binary -r $REQUIREMENTS_TXT_FILE | ts $TS_FMT; exit ${PIPESTATUS[0]} ) 2>&1; exit ${PIPESTATUS[0]} )
|
||||
pipInstallExitCode=${PIPESTATUS[0]}
|
||||
fi
|
||||
|
||||
set -e
|
||||
echo "${output}"
|
||||
if [[ $pipInstallExitCode != 0 ]]
|
||||
|
@ -138,14 +130,6 @@ fi
|
|||
output=$( ( $python -m pip install --cache-dir $PIP_CACHE_DIR --prefer-binary -r $REQUIREMENTS_TXT_FILE --target="{{ PackagesDirectory }}" --upgrade | ts $TS_FMT; exit ${PIPESTATUS[0]} ) 2>&1; exit ${PIPESTATUS[0]} )
|
||||
pipInstallExitCode=${PIPESTATUS[0]}
|
||||
|
||||
if [[ $pipInstallExitCode != 0 ]]; then
|
||||
echo "Retrying pip install with additional flags: \"$PIP_GCC_FLAGS\"..."
|
||||
InstallCommand="$python -m pip install $PIP_GCC_FLAGS --cache-dir $PIP_CACHE_DIR --prefer-binary -r $REQUIREMENTS_TXT_FILE --target="{{ PackagesDirectory }}" --upgrade | ts $TS_FMT"
|
||||
printf %s " , $InstallCommand" >> "$COMMAND_MANIFEST_FILE"
|
||||
output=$( ( $python -m pip install $PIP_GCC_FLAGS --cache-dir $PIP_CACHE_DIR --prefer-binary -r $REQUIREMENTS_TXT_FILE --target="{{ PackagesDirectory }}" --upgrade | ts $TS_FMT; exit ${PIPESTATUS[0]} ) 2>&1; exit ${PIPESTATUS[0]} )
|
||||
pipInstallExitCode=${PIPESTATUS[0]}
|
||||
fi
|
||||
|
||||
ELAPSED_TIME=$(($SECONDS - $START_TIME))
|
||||
echo "Done in $ELAPSED_TIME sec(s)."
|
||||
set -e
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Common
|
|||
{
|
||||
public static class PythonVersions
|
||||
{
|
||||
public const string PythonRuntimeBaseTag = "20221116.1";
|
||||
public const string PythonRuntimeBaseTag = "20230208.7";
|
||||
public const string PipVersion = "21.2.4";
|
||||
public const string Python27Version = "2.7.18";
|
||||
public const string Python36Version = "3.6.15";
|
||||
|
@ -14,7 +14,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Common
|
|||
public const string Python38Version = "3.8.16";
|
||||
public const string Python39Version = "3.9.15";
|
||||
public const string Python310Version = "3.10.8";
|
||||
public const string Python311Version = "3.11.0";
|
||||
public const string Python311Version = "3.11.1";
|
||||
public static readonly List<string> RuntimeVersions = new List<string> { "2.7", "3.6", "3.8", "3.9", "3.10", "3.11" };
|
||||
}
|
||||
}
|
|
@ -86,7 +86,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Tests.Python
|
|||
// Assert
|
||||
Assert.NotEmpty(text);
|
||||
Assert.NotNull(text);
|
||||
Assert.Contains("python -m pip install $PIP_GCC_FLAGS --cache-dir $PIP_CACHE_DIR --prefer-binary -r $REQUIREMENTS_TXT_FILE", text);
|
||||
Assert.Contains("python -m pip install --cache-dir $PIP_CACHE_DIR --prefer-binary -r $REQUIREMENTS_TXT_FILE", text);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -66,6 +66,52 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
});
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-3.11")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRun_DjangoRegex()
|
||||
{
|
||||
// Arrange
|
||||
var appName = "django-regex-example-app";
|
||||
var volume = CreateAppVolume(appName);
|
||||
var appDir = volume.ContainerDir;
|
||||
var appOutputDirVolume = CreateAppOutputDirVolume();
|
||||
var appOutputDir = appOutputDirVolume.ContainerDir;
|
||||
var buildScript = new ShellScriptBuilder()
|
||||
.AddCommand($"oryx build {appDir} -i /tmp/int -o {appOutputDir} " +
|
||||
$"--platform {PythonConstants.PlatformName} --platform-version {PythonVersions.Python311Version}")
|
||||
.ToString();
|
||||
var runScript = new ShellScriptBuilder()
|
||||
.AddCommand($"oryx create-script -appPath {appOutputDir} -bindPort {ContainerPort}")
|
||||
.AddCommand(DefaultStartupFilePath)
|
||||
.ToString();
|
||||
|
||||
await EndToEndTestHelper.BuildRunAndAssertAppAsync(
|
||||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBullseye),
|
||||
"/bin/bash",
|
||||
new[]
|
||||
{
|
||||
"-c",
|
||||
buildScript
|
||||
},
|
||||
_imageHelper.GetRuntimeImage("python", "3.11"),
|
||||
ContainerPort,
|
||||
"/bin/bash",
|
||||
new[]
|
||||
{
|
||||
"-c",
|
||||
runScript
|
||||
},
|
||||
async (hostPort) =>
|
||||
{
|
||||
var data = await _httpClient.GetStringAsync($"http://localhost:{hostPort}/");
|
||||
Assert.Contains("Hello world from Django!", data);
|
||||
});
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
|
|
|
@ -1,3 +1,113 @@
|
|||
Django==3.1.14
|
||||
whitenoise==5.1.0
|
||||
regex==2021.8.3 # required module for integration tests
|
||||
amqp==5.1.1
|
||||
asgiref==3.4.1
|
||||
async-generator==1.10
|
||||
async-timeout==4.0.2
|
||||
attrs==21.2.0
|
||||
azure-common==1.1.27
|
||||
azure-core==1.17.0
|
||||
azure-identity==1.5.0
|
||||
azure-keyvault-secrets==4.2.0
|
||||
azure-storage-blob==2.1.0
|
||||
azure-storage-common==2.1.0
|
||||
Babel==2.9.1
|
||||
beautifulsoup4==4.10.0
|
||||
billiard==3.6.4.0
|
||||
bleach==4.1.0
|
||||
celery==5.2.7
|
||||
certifi==2022.12.7
|
||||
cffi==1.14.6
|
||||
charset-normalizer==2.0.4
|
||||
click==8.1.3
|
||||
click-didyoumean==0.3.0
|
||||
click-plugins==1.1.1
|
||||
click-repl==0.2.0
|
||||
crispy-bootstrap5==0.6
|
||||
cryptography==3.3.2
|
||||
cssselect==1.1.0
|
||||
data-wizard==1.3.0
|
||||
dateparser==1.0.0
|
||||
defusedxml==0.7.1
|
||||
Deprecated==1.2.13
|
||||
diff-match-patch==20200713
|
||||
Django==3.2.16
|
||||
django-appconf==1.0.4
|
||||
django-axes==5.8.0
|
||||
django-compressor==2.4
|
||||
django-crispy-forms==1.14.0
|
||||
django-csp==3.7
|
||||
django-csp-reports==1.4
|
||||
django-formtools==2.3
|
||||
django-import-export==3.0.1
|
||||
django-ipware==3.0.7
|
||||
django-libsass==0.9
|
||||
django-otp==1.0.6
|
||||
django-phonenumber-field==3.0.1
|
||||
django-recaptcha==2.0.6
|
||||
django-reversion==3.0.8
|
||||
django-six==1.0.5
|
||||
django-storages==1.11.1
|
||||
django-two-factor-auth==1.13
|
||||
djangorestframework==3.12.4
|
||||
et-xmlfile==1.1.0
|
||||
factory-boy==3.2.1
|
||||
Faker==15.3.2
|
||||
graphlib-backport==1.0.3
|
||||
h11==0.12.0
|
||||
html-json-forms==1.1.1
|
||||
idna==3.2
|
||||
isodate==0.6.0
|
||||
itertable==2.0.0
|
||||
kombu==5.2.4
|
||||
libsass==0.21.0
|
||||
lxml==4.9.1
|
||||
MarkupPy==1.14
|
||||
msal==1.13.0
|
||||
msal-extensions==0.3.0
|
||||
msrest==0.6.21
|
||||
natural-keys==1.6.0
|
||||
oauthlib==3.2.1
|
||||
odfpy==1.4.1
|
||||
openpyxl==3.0.10
|
||||
outcome==1.1.0
|
||||
packaging==21.3
|
||||
phonenumberslite==8.12.29
|
||||
portalocker==1.7.1
|
||||
prompt-toolkit==3.0.31
|
||||
psycopg2==2.8.6
|
||||
pycparser==2.20
|
||||
PyJWT==2.4.0
|
||||
pyOpenSSL==21.0.0
|
||||
pyparsing==3.0.9
|
||||
python-dateutil==2.8.2
|
||||
python3-openid==3.2.0
|
||||
pytz==2022.5
|
||||
PyYAML==6.0
|
||||
qrcode==6.1
|
||||
rcssmin==1.0.6
|
||||
redis==4.3.4
|
||||
regex==2021.8.3
|
||||
requests==2.26.0
|
||||
requests-oauthlib==1.3.0
|
||||
rjsmin==1.1.0
|
||||
selenium==4.1.0
|
||||
six==1.16.0
|
||||
sniffio==1.2.0
|
||||
social-auth-app-django==4.0.0
|
||||
social-auth-core==4.1.0
|
||||
sortedcontainers==2.4.0
|
||||
soupsieve==2.3.1
|
||||
sqlparse==0.4.2
|
||||
tablib==3.2.1
|
||||
tblib==1.7.0
|
||||
trio==0.19.0
|
||||
trio-websocket==0.9.2
|
||||
tzlocal==2.1
|
||||
urllib3==1.26.6
|
||||
vine==5.0.0
|
||||
wcwidth==0.2.5
|
||||
whitenoise==6.3.0
|
||||
webencodings==0.5.1
|
||||
wrapt==1.14.1
|
||||
wsproto==1.0.0
|
||||
xlrd==2.0.1
|
||||
xlwt==1.3.0
|
Загрузка…
Ссылка в новой задаче