Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: requirements-ci.txt includes a frozen python deps #132

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tox_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
pip install -r requirements/requirements_conan.txt
pip install -r requirements/requirements-conan.txt
conan config init
conan config set general.revisions_enabled=1
conan profile new default --detect
Expand All @@ -62,7 +62,7 @@ jobs:
if: ${{ !contains(matrix.os, 'windows') && steps.cache.outputs.cache-hit != 'true' }}
run: |
cc --version && cc -dumpfullversion -dumpversion
pip install -r requirements/requirements_conan.txt
pip install -r requirements/requirements-conan.txt
if conan profile show default; then echo 'profile exists'; else conan profile new default --detect; fi
conan config init
conan config set general.revisions_enabled=1
Expand Down
8 changes: 4 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def getMacDevpiTestStages(packageName, packageVersion, pythonVersions, devpiServ
script: '''python3 -m venv venv
. ./venv/bin/activate
python -m pip install pip --upgrade
python -m pip install devpi_client -r requirements/requirements_tox.txt
python -m pip install devpi_client -r requirements/requirements-tox.txt
'''
)
},
Expand Down Expand Up @@ -147,7 +147,7 @@ def getMacDevpiTestStages(packageName, packageVersion, pythonVersions, devpiServ
script: '''python3 -m venv venv
. ./venv/bin/activate
python -m pip install pip --upgrade
python -m pip install devpi_client -r requirements/requirements_tox.txt
python -m pip install devpi_client -r requirements/requirements-tox.txt
'''
)
},
Expand Down Expand Up @@ -945,7 +945,7 @@ pipeline {
sh(label: 'Running Tox',
script: """python${pythonVersion} -m venv venv
./venv/bin/python -m pip install --upgrade pip
./venv/bin/pip install -r requirements/requirements_tox.txt
./venv/bin/pip install -r requirements/requirements-tox.txt
./venv/bin/tox --installpkg ${it.path} -e py${pythonVersion.replace('.', '')}"""
)
}
Expand Down Expand Up @@ -983,7 +983,7 @@ pipeline {
sh(label: 'Running Tox',
script: """python${pythonVersion} -m venv venv
./venv/bin/python -m pip install --upgrade pip
./venv/bin/pip install -r requirements/requirements_tox.txt
./venv/bin/pip install -r requirements/requirements-tox.txt
./venv/bin/tox --installpkg ${it.path} -e py${pythonVersion.replace('.', '')}"""
)
}
Expand Down
28 changes: 17 additions & 11 deletions ci/docker/linux/jenkins/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG SONAR_SCANNER_VERSION=4.7.0.2747
ARG PYTHON_VERSION=3.11
ARG CONAN_USER_HOME=/conan
ARG PIP_FIND_LINKS=/wheels/
FROM python:${PYTHON_VERSION} as base_python
RUN apt-get update -y && \
apt-get install -y --no-install-recommends ca-certificates git && \
Expand All @@ -13,20 +14,21 @@ ARG PIP_INDEX_URL
RUN mkdir -p /.cache/pip && \
chmod -R 777 /.cache

COPY requirements/requirements_conan.txt /tmp/requirements_conan.txt
COPY requirements/requirements-conan.txt /tmp/requirements-conan.txt
RUN python -m pip --no-cache-dir install --upgrade pip && \
pip install --no-cache-dir wheel cmake && \
pip install --no-cache-dir setuptools && \
pip install --no-cache-dir -r /tmp/requirements_conan.txt

COPY ci/docker/shared/python/requirements-ci.txt ci/docker/shared/python/requirements-extras.txt /requirements/
COPY requirements/ /requirements/requirements/
pip install --no-cache-dir -r /tmp/requirements-conan.txt

FROM base_python as wheel_builder
ARG PIP_EXTRA_INDEX_URL
ARG PIP_INDEX_URL
RUN pip wheel -r /requirements/requirements-ci.txt --no-cache --wheel-dir /wheels/ && \
pip wheel -r /requirements/requirements-extras.txt --no-cache --wheel-dir /wheels/
COPY requirements-ci.txt /requirements/
COPY requirements/ /requirements/requirements/

ARG PIP_FIND_LINKS
RUN mkdir -p ${PIP_FIND_LINKS} && \
pip wheel --wheel-dir=${PIP_FIND_LINKS} --no-cache-dir -r /requirements/requirements-ci.txt

FROM base_python as conan_builder
ARG CONAN_USER_HOME
Expand Down Expand Up @@ -98,9 +100,15 @@ RUN chmod -R 777 $SONAR_USER_HOME

ENV SONAR_SCANNER_OPTS="-server"

ARG PIP_EXTRA_INDEX_URL
ARG PIP_FIND_LINKS
ARG PIP_INDEX_URL
COPY --from=wheel_builder /wheels/* /wheels/
ARG PIP_EXTRA_INDEX_URL
ARG PIP_TRUSTED_HOST
COPY --from=wheel_builder ${PIP_FIND_LINKS}/* ${PIP_FIND_LINKS}/
COPY --from=wheel_builder requirements/ /requirements
RUN pip install --no-index --no-cache-dir --find-links=${PIP_FIND_LINKS} \
-r /requirements/requirements-ci.txt

ARG CONAN_USER_HOME
COPY --from=conan_builder ${CONAN_USER_HOME}/.conan/ ${CONAN_USER_HOME}/.conan/
ARG TARGETARCH
Expand All @@ -116,5 +124,3 @@ RUN conan install /tmp --build missing --no-import && \
conan remove --locks && \
chmod -R 777 ${CONAN_USER_HOME}

RUN pip install --no-cache-dir --no-index --find-links=/wheels/ \
-r /requirements/requirements-ci.txt
4 changes: 2 additions & 2 deletions ci/docker/linux/package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ RUN mkdir -p /.cache/pip && \
chmod -R 777 /.cache
ARG PIP_EXTRA_INDEX_URL
ARG PIP_INDEX_URL
COPY requirements/requirements_conan.txt /tmp/requirements_conan.txt
RUN python3 --version && python3 -m pip install --no-cache-dir -r /tmp/requirements_conan.txt
COPY requirements/requirements-conan.txt /tmp/requirements-conan.txt
RUN python3 --version && python3 -m pip install --no-cache-dir -r /tmp/requirements-conan.txt
ARG TARGETARCH
ARG CONAN_USER_HOME
COPY ci/docker/linux/package/conan/$TARGETARCH/profile.ini ${CONAN_USER_HOME}/.conan/profiles/default
Expand Down
12 changes: 6 additions & 6 deletions ci/docker/linux/tox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ RUN mkdir -p /.cache/pip && \

FROM wheel_builder_base as conan_builder
ARG CONAN_USER_HOME
COPY ci/docker/linux/tox/requirements-conan-build.txt /tmp/
COPY requirements/requirements_conan.txt /tmp/requirements_conan.txt
RUN pip3 install --no-cache-dir -r /tmp/requirements-conan-build.txt
COPY requirements/requirements-ci-freeze.txt /tmp/requirements-ci-freeze.txt
RUN python3 -m pip install pip --upgrade && pip3 install --no-cache-dir -r /tmp/requirements-ci-freeze.txt
RUN which conan
COPY ci/docker/shared/conan/remotes.json ${CONAN_USER_HOME}/.conan/remotes.json
ARG TARGETARCH
COPY ci/docker/linux/tox/conan/$TARGETARCH/profile.ini ${CONAN_USER_HOME}/profiles/default
Expand All @@ -44,9 +44,9 @@ ARG CONAN_USER_HOME
ARG PIP_EXTRA_INDEX_URL
ARG PIP_INDEX_URL

COPY requirements/ /tmp/requirements
COPY ci/docker/linux/tox/requirements-conan-build.txt /tmp/requirements
RUN pip3 install --no-cache-dir -r /tmp/requirements/requirements_tox.txt -r /tmp/requirements/requirements-conan-build.txt devpi-client twine
COPY requirements/ /tmp/requirements/requirements/
COPY requirements-ci.txt /tmp/requirements/requirements-ci.txt
RUN python3 -m pip install pip --upgrade && pip3 install --no-cache-dir -r /tmp/requirements/requirements-ci.txt


COPY --from=conan_builder ${CONAN_USER_HOME}/.conan/ ${CONAN_USER_HOME}/.conan/
Expand Down
4 changes: 0 additions & 4 deletions ci/docker/linux/tox/requirements-conan-build.txt

This file was deleted.

22 changes: 0 additions & 22 deletions ci/docker/shared/python/requirements-ci.txt

This file was deleted.

97 changes: 0 additions & 97 deletions ci/docker/windows/build/msvc/Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions ci/docker/windows/build/msvc/Profile.ps1

This file was deleted.

4 changes: 0 additions & 4 deletions ci/docker/windows/build/msvc/startup.bat

This file was deleted.

4 changes: 0 additions & 4 deletions ci/docker/windows/build/msvc/startup.reg

This file was deleted.

20 changes: 12 additions & 8 deletions ci/docker/windows/tox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ ARG PIP_INDEX_URL
COPY requirements c:/requirements/requirements
RUN python -m pip install --upgrade pip ; `
pip install wheel ; `
pip install -r c:/requirements/requirements/requirements_conan.txt cmake
pip install -r c:/requirements/requirements/requirements-conan.txt
COPY conanfile.py c:/temp/conanfile.py
COPY ci/docker/shared/conan/remotes.json ${CONAN_USER_HOME}/.conan/remotes.json
COPY ci/docker/windows/tox/conan/profile.ini ${CONAN_USER_HOME}/.conan/profiles/default
Expand All @@ -136,17 +136,21 @@ RUN conan install c:/temp/ --build missing --no-import; `
FROM CHOCOLATEY_BASE
RUN py -3.8 -m pip install --upgrade pip ; `
py -3.9 -m pip install --upgrade pip ; `
py -3.10 -m pip install --upgrade pip ; `
py -3.11 -m pip install --upgrade pip
COPY requirements c:/requirements/requirements
RUN python -m pip install pip --upgrade ; pip install -r c:/requirements/requirements/requirements_tox.txt -r c:/requirements/requirements/requirements_conan.txt cmake devpi_client
COPY --from=certsgen c:/roots.sst roots.sst
RUN certutil -addstore -f root roots.sst ; `
del roots.sst
ARG PIP_EXTRA_INDEX_URL
ARG PIP_INDEX_URL
COPY requirements-ci.txt c:/python_requirments/
COPY requirements/ c:/python_requirments/requirements
RUN py -3.8 -m pip install --upgrade pip ; `
py -3.9 -m pip install --upgrade pip ; `
py -3.10 -m pip install --upgrade pip ; `
py -3.11 -m pip install --upgrade pip ; `
python -m pip install pip --upgrade ; pip install --no-cache-dir -r c:/python_requirments/requirements-ci.txt
ARG CONAN_USER_HOME
COPY --from=CONAN_BUILDER ${CONAN_USER_HOME}/.conan/ ${CONAN_USER_HOME}/.conan/
ENV CONAN_USER_HOME=${CONAN_USER_HOME}
Expand Down
6 changes: 3 additions & 3 deletions ci/docker/windows/tox_no_vs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ RUN certutil -addstore -f root roots.sst ; `
ARG PIP_EXTRA_INDEX_URL
ARG PIP_INDEX_URL

FROM CHOCOLATEY_BASE
COPY requirements-ci.txt c:/python_requirments/
COPY requirements/ c:/python_requirments/requirements
RUN python -m pip install pip --upgrade ; pip install --no-cache-dir -r c:/python_requirments/requirements-ci.txt

COPY requirements c:/requirements/requirements
RUN python -m pip install pip --upgrade ; pip install install -r c:/requirements/requirements/requirements_tox.txt devpi_client
ARG PIP_DOWNLOAD_CACHE
RUN New-Item -type directory -path ${Env:PIP_DOWNLOAD_CACHE} -Force
WORKDIR C:/src
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ environment-pass = ["CONAN_COMPILER_LIBCXX", "CONAN_COMPILER_VERSION", "CONAN_US
[tool.cibuildwheel.windows]
before-all = [
'pip install wheel',
'pip install -r requirements/requirements_conan.txt cmake ninja',
'pip install -r requirements/requirements-conan.txt',
'conan profile new default --detect --force',
'conan config init',
'conan config set general.revisions_enabled=1',
Expand All @@ -59,7 +59,7 @@ CONAN_USER_HOME="$TEMP/conan"

[tool.cibuildwheel.macos]
before-all = [
"pip3 install -r requirements/requirements_conan.txt cmake ninja",
"pip3 install -r requirements/requirements-conan.txt",
'conan profile new $ENVTMPDIR/.conan/profiles/default --detect --force',
'conan config init',
'conan config set general.revisions_enabled=1',
Expand All @@ -85,7 +85,7 @@ CONAN_BUILD_INFO_DIR="/tmp/ciwheelbuilder/uiucprescon_ocr/build/"
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
before-all = [
'cc --version', 'cc -dumpfullversion -dumpversion',
'pip3 install -r requirements/requirements_conan.txt cmake ninja',
'pip3 install -r requirements/requirements-conan.txt',
'conan profile new /tmp/ciwheelbuilder/uiucprescon_ocr/.conan/profiles/default --detect',
'conan config set general.revisions_enabled=1',
'if [ -z \"$CONAN_COMPILER_LIBCXX\" ]; then : ; else conan profile update settings.compiler.libcxx=$CONAN_COMPILER_LIBCXX default; fi',
Expand Down
5 changes: 5 additions & 0 deletions requirements-ci.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-r requirements/requirements-ci-freeze.txt
-r requirements/requirements-tox.txt
-r requirements/requirements-dev.txt
-r requirements/requirements-ci.txt
-r requirements/requirements-extras.txt
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
-r requirements/requirements_tox.txt
-r requirements/requirements-tox.txt
-r requirements/requirements-dev.txt
Loading