mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
ci: Add Python 3.13 support
This commit is contained in:
parent
6efbd7986b
commit
f88231c7c1
@ -61,9 +61,16 @@ RUN if defined PIP_INDEX_URL ( \
|
||||
)
|
||||
|
||||
COPY host/python/requirements.txt C:/Temp/requirements.txt
|
||||
COPY host/python/requirements_np2.txt C:/Temp/requirements_np2.txt
|
||||
RUN pip config list && \
|
||||
python -m pip install --upgrade pip && \
|
||||
python -m pip install -r C:/Temp/requirements.txt
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command \
|
||||
"if ([version]('%PYTHON_VERSION%') -ge [version]('3.13')) { \
|
||||
pip install -r C:/Temp/requirements_np2.txt \
|
||||
} else { \
|
||||
pip install -r C:/Temp/requirements.txt \
|
||||
}; \
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }"
|
||||
|
||||
RUN setx VCPKG_INSTALL_DIR "c:\\vcpkg" /m
|
||||
RUN git clone https://github.com/microsoft/vcpkg %VCPKG_INSTALL_DIR% && \
|
||||
|
||||
@ -61,9 +61,16 @@ RUN if defined PIP_INDEX_URL ( \
|
||||
)
|
||||
|
||||
COPY host/python/requirements.txt C:/Temp/requirements.txt
|
||||
COPY host/python/requirements_np2.txt C:/Temp/requirements_np2.txt
|
||||
RUN pip config list && \
|
||||
python -m pip install --upgrade pip && \
|
||||
python -m pip install -r C:/Temp/requirements.txt
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command \
|
||||
"if ([version]('%PYTHON_VERSION%') -ge [version]('3.13')) { \
|
||||
pip install -r C:/Temp/requirements_np2.txt \
|
||||
} else { \
|
||||
pip install -r C:/Temp/requirements.txt \
|
||||
}; \
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }"
|
||||
|
||||
RUN setx VCPKG_INSTALL_DIR "c:\\vcpkg" /m
|
||||
RUN git clone https://github.com/microsoft/vcpkg %VCPKG_INSTALL_DIR% && \
|
||||
|
||||
@ -46,7 +46,7 @@ jobs:
|
||||
# PR runs also use fallback mode.
|
||||
# The behavior is implemented by derive_docker_image_matrix.py.
|
||||
docker_image_matrix_lin=$(python3 "$derive_script" --empty-on-error-non-ci --input "$artifact_file" --type build --os linux)
|
||||
docker_image_matrix_win=$(python3 "$derive_script" --empty-on-error-non-ci --input "$artifact_file" --type build --os windows --filter-out "VS2022-x64-py313-builder")
|
||||
docker_image_matrix_win=$(python3 "$derive_script" --empty-on-error-non-ci --input "$artifact_file" --type build --os windows)
|
||||
docker_image_matrix_ubuntu_deb=$(python3 "$derive_script" --empty-on-error-non-ci --input "$artifact_file" --type installer --os linux --package deb --filter-out "focal,questing")
|
||||
docker_image_matrix_source_package=$(python3 "$derive_script" --empty-on-error-non-ci --input "$artifact_file" --type source --os linux --select noble)
|
||||
docker_image_matrix_fedora_rpm=$(python3 "$derive_script" --empty-on-error-non-ci --input "$artifact_file" --type installer --os linux --package rpm)
|
||||
|
||||
@ -35,6 +35,20 @@ parameters:
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
setlocal enabledelayedexpansion
|
||||
echo pythonVersion=$(pythonVersion)
|
||||
if "$(pythonVersion)"=="python310" (
|
||||
set pyVersionType=1
|
||||
) else if "$(pythonVersion)"=="python311" (
|
||||
set pyVersionType=1
|
||||
) else if "$(pythonVersion)"=="python312" (
|
||||
set pyVersionType=1
|
||||
) else (
|
||||
set pyVersionType=2
|
||||
)
|
||||
echo pyVersionType=!pyVersionType!
|
||||
echo ##vso[task.setvariable variable=PYVERSIONTYPE]!pyVersionType!
|
||||
|
||||
echo environment var VCPKG_TARGET_TRIPLET=%VCPKG_TARGET_TRIPLET%
|
||||
call ${{ parameters.uhdSrcDir }}\.ci\utils\extract-vs-version.bat "$(cmakeCompiler)"
|
||||
copy /y ${{ parameters.uhdSrcDir }}\.ci\docker\vcpkg\%vcpkgManifestFile% vcpkg.json
|
||||
@ -45,7 +59,13 @@ steps:
|
||||
- script: |
|
||||
pip config list
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r ${{ parameters.uhdSrcDir }}\host\python\requirements.txt
|
||||
if "%PYVERSIONTYPE%"=="1" (
|
||||
pip install -r ${{ parameters.uhdSrcDir }}\host\python\requirements.txt
|
||||
) else (
|
||||
echo Using numpy 2.x requirements for python313 and above
|
||||
pip install -r ${{ parameters.uhdSrcDir }}\host\python\requirements_np2.txt
|
||||
pip install "pybind11>=2.12"
|
||||
)
|
||||
displayName: refresh python dependencies
|
||||
|
||||
- script: |
|
||||
|
||||
@ -18,7 +18,10 @@ exclude = [
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.10,<3.14"
|
||||
numpy = "^@UHD_NUMPY_MIN_VERSION@"
|
||||
numpy = [
|
||||
{version = ">=2.0.0", python = ">=3.13"},
|
||||
{version = ">=@UHD_NUMPY_MIN_VERSION@,<2.0.0", python = "<3.13"}
|
||||
]
|
||||
mako = ">=@UHD_PY_MAKO_MIN_VERSION@"
|
||||
ruamel-yaml = ">=@UHD_RUAMEL_YAML_MIN_VERSION@"
|
||||
|
||||
|
||||
16
host/python/requirements_np2.txt
Normal file
16
host/python/requirements_np2.txt
Normal file
@ -0,0 +1,16 @@
|
||||
# Python packages required to build UHD with Python support
|
||||
|
||||
# Process yaml files, e.g. for RFNoC image builder
|
||||
ruamel.yaml
|
||||
|
||||
# Numpy is used to generate or process IQ data
|
||||
numpy >= 2.0.0
|
||||
|
||||
# Mako is needed for generate source stubs (e.g. register maps)
|
||||
mako
|
||||
|
||||
# Needed for the image downloader
|
||||
requests
|
||||
|
||||
# Needed to build the Python bindings for UHD
|
||||
setuptools
|
||||
Loading…
Reference in New Issue
Block a user