Skip to content
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
11 changes: 7 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,17 @@ When building a Conan package, `aswfdocker build --use-conan` uses [common/packa
cache of local Conan package builds (similarly for the [ccache](https://ccache.dev/) persistent cache):

```
RUN --mount=type=cache,target=${CONAN_USER_HOME}/d \
RUN --mount=type=cache,target=${ASWF_CONAN_HOME}/d \
--mount=type=cache,target=${CCACHE_DIR} \
--mount=type=bind,rw,target=${CONAN_USER_HOME}/.conan2,source=packages/conan/settings \
--mount=type=bind,rw,target=${CONAN_USER_HOME}/recipes,source=packages/conan/recipes \
--mount=type=bind,rw,target=${ASWF_CONAN_HOME}/.conan2,source=packages/conan/settings \
--mount=type=bind,rw,target=${ASWF_CONAN_HOME}/recipes,source=packages/conan/recipes \
conan create \
...
```

By default the Conan cache lives in the `$CONAN_HOME/p` directory (where settings and profiles also live) but we relocate it to `${ASWF_CONAN_HOME}/d` by setting `core.cache:storage_path = /opt/conan_home/d` in `global.conf`
as per [Storage Configurations](https://docs.conan.io/2/reference/config_files/global_conf.html#storage-configurations).

During development it can be convenient to peek into the results of a Conan package build. You can use:

```
Expand All @@ -388,7 +391,7 @@ Mutable: true
Reclaimable: true
Shared: false
Size: 93.56GB
Description: cached mount /opt/conan_home/d from exec /bin/sh -c conan create ${ASWF_CONAN_KEEP_SOURCE} ${ASWF_CONAN_KEEP_BUILD} ${ASWF_CONAN_BUILD_MISSING} --profile:all ${CONAN_USER_HOME}/.conan2/profiles_${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} --name ${ASWF_PKG_NAME} --version ${ASWF_PKG_VERSION} --user ${ASWF_PKG_ORG} --channel ${ASWF_CONAN_CHANNEL} ${CONAN_USER_HOME}/recipes/${ASWF_PKG_NAME} with id "//opt/conan_home/d"
Description: cached mount /opt/conan_home/d from exec /bin/sh -c conan create ${ASWF_CONAN_KEEP_SOURCE} ${ASWF_CONAN_KEEP_BUILD} ${ASWF_CONAN_BUILD_MISSING} --profile:all ${ASWF_CONAN_HOME}/.conan2/profiles_${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} --name ${ASWF_PKG_NAME} --version ${ASWF_PKG_VERSION} --user ${ASWF_PKG_ORG} --channel ${ASWF_CONAN_CHANNEL} ${ASWF_CONAN_HOME}/recipes/${ASWF_PKG_NAME} with id "//opt/conan_home/d"
Usage count: 159
Last used: 14 minutes ago
Type: exec.cachemount
Expand Down
3 changes: 2 additions & 1 deletion ci-base/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ci-baseqt/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions ci-common/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ci-common/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ docker_commands: |
/tmp/install_conan.sh

COPY ../packages/conan/settings /opt/conan_home/.conan
ENV CONAN_USER_HOME=/opt/conan_home
ENV ASWF_CONAN_HOME=/opt/conan_home
3 changes: 2 additions & 1 deletion ci-materialx/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ci-ocio/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ci-oiio/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ci-opencue/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ci-openexr/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ci-openrv/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ci-openvdb/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ci-osl/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ci-otio/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ci-usd/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ci-vfxall/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions packages/common/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ ENV ASWF_DTS_VERSION=${ASWF_DTS_VERSION}
ARG ASWF_DTS_PREFIX
ENV ASWF_DTS_PREFIX=${ASWF_DTS_PREFIX}
ARG CI_COMMON_VERSION
ARG CONAN_USER_HOME
ARG ASWF_CONAN_HOME
ARG ASWF_PKG_NAME
ARG ASWF_PKG_ORG
ARG ASWF_PKG_VERSION
Expand Down Expand Up @@ -160,28 +160,28 @@ ENV ASWF_CONAN_ROOT=/opt/conan \
ENV GCC_INSTALL_PREFIX=/opt/rh/${ASWF_DTS_PREFIX}-${ASWF_DTS_VERSION}/root/usr

# With "conan create --profile" we no longer need to set a default profile
ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2
ENV CONAN_HOME=${ASWF_CONAN_HOME}/.conan2

RUN --mount=type=cache,target=${CONAN_USER_HOME}/d \
RUN --mount=type=cache,target=${ASWF_CONAN_HOME}/d \
--mount=type=cache,target=${CCACHE_DIR} \
--mount=type=bind,rw,target=${CONAN_USER_HOME}/.conan2,source=packages/conan/settings \
--mount=type=bind,rw,target=${CONAN_USER_HOME}/recipes,source=packages/conan/recipes \
--mount=type=bind,rw,target=${ASWF_CONAN_HOME}/.conan2,source=packages/conan/settings \
--mount=type=bind,rw,target=${ASWF_CONAN_HOME}/recipes,source=packages/conan/recipes \
conan create \
${ASWF_CONAN_KEEP_SOURCE} \
${ASWF_CONAN_KEEP_BUILD} \
${ASWF_CONAN_BUILD_MISSING} \
--profile:all ${CONAN_USER_HOME}/.conan2/profiles_${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} \
--profile:all ${ASWF_CONAN_HOME}/.conan2/profiles_${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} \
--name ${ASWF_PKG_NAME} \
--version ${ASWF_PKG_VERSION} \
--user ${ASWF_PKG_ORG} \
--channel ${ASWF_CONAN_CHANNEL} \
${CONAN_USER_HOME}/recipes/${ASWF_PKG_NAME}
${ASWF_CONAN_HOME}/recipes/${ASWF_PKG_NAME}

# Upload build to repository if called for
RUN --mount=type=cache,target=${CONAN_USER_HOME}/d \
RUN --mount=type=cache,target=${ASWF_CONAN_HOME}/d \
--mount=type=cache,target=${CCACHE_DIR} \
--mount=type=bind,rw,target=${CONAN_USER_HOME}/.conan2,source=packages/conan/settings \
--mount=type=bind,rw,target=${CONAN_USER_HOME}/recipes,source=packages/conan/recipes \
--mount=type=bind,rw,target=${ASWF_CONAN_HOME}/.conan2,source=packages/conan/settings \
--mount=type=bind,rw,target=${ASWF_CONAN_HOME}/recipes,source=packages/conan/recipes \
--mount=type=secret,id=conan_login_username,env=CONAN_LOGIN_USERNAME \
--mount=type=secret,id=conan_password,env=CONAN_PASSWORD \
if [ -n "${ASWF_CONAN_PUSH}" ] ; then \
Expand Down
2 changes: 2 additions & 0 deletions packages/conan/recipes/pyside/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@ patches:
base_path: "pyside_src"
- patch_file: "patches/shiboken_in_lib64.diff"
base_path: "pyside_src"
- patch_file: "patches/libpython_in_lib64.diff"
base_path: "pyside_src"
- patch_file: "patches/pyside_pysidesignal.diff"
base_path: "pyside_src"
11 changes: 11 additions & 0 deletions packages/conan/recipes/pyside/patches/libpython_in_lib64.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/build_scripts/build_info_collector.py
+++ b/build_scripts/build_info_collector.py
@@ -65,7 +65,7 @@
py_include_dir):
"""Helper for finding the Python library on UNIX"""
if py_libdir is None or not Path(py_libdir).exists():
- py_libdir = Path(py_prefix) / "lib"
+ py_libdir = Path(py_prefix) / "lib64"
if py_include_dir is None or not Path(py_include_dir).exists():
directory = f"include/python{py_version}"
py_include_dir = Path(py_prefix) / directory
14 changes: 7 additions & 7 deletions python/aswfdocker/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def make_bake_dict(
+ image.replace("ci-package-", "").upper().replace("-", "_")
+ "_VERSION"
),
"CONAN_USER_HOME": constants.CONAN_USER_HOME,
"ASWF_CONAN_HOME": constants.ASWF_CONAN_HOME,
"ASWF_CONAN_KEEP_SOURCE": "--keep-source"
if keep_source
else "",
Expand Down Expand Up @@ -180,8 +180,8 @@ def _run_in_docker(self, base_cmd, cmd, dry_run):

def _get_conan_env_vars(self, version_info):
envs = {
"CONAN_USER_HOME": constants.CONAN_USER_HOME,
"CONAN_HOME": os.path.join(constants.CONAN_USER_HOME, ".conan2"),
"ASWF_CONAN_HOME": constants.ASWF_CONAN_HOME,
"CONAN_HOME": os.path.join(constants.ASWF_CONAN_HOME, ".conan2"),
"CCACHE_DIR": "/tmp/ccache",
"CONAN_NON_INTERACTIVE": "1",
}
Expand All @@ -202,13 +202,13 @@ def _get_conan_vols(self):
conan_base = os.path.join(utils.get_git_top_level(), "packages", "conan")
vols = {
os.path.join(conan_base, "settings"): os.path.join(
constants.CONAN_USER_HOME, ".conan2"
constants.ASWF_CONAN_HOME, ".conan2"
),
os.path.join(conan_base, "data"): os.path.join(
constants.CONAN_USER_HOME, "d"
constants.ASWF_CONAN_HOME, "d"
),
os.path.join(conan_base, "recipes"): os.path.join(
constants.CONAN_USER_HOME, "recipes"
constants.ASWF_CONAN_HOME, "recipes"
),
os.path.join(conan_base, "ccache"): "/tmp/ccache",
}
Expand Down Expand Up @@ -243,7 +243,7 @@ def _build_conan_package(
# base_cmd = self._get_conan_base_cmd(version_info)
# if conan_login:
# # "conan remote auth" stores credentials in
# # ${CONAN_HOME]/.conan2/credentials.json but we don't have a simple way to persist
# # ${CONAN_HOME]/credentials.json but we don't have a simple way to persist
# # this file between build steps, since instead we will use the secrets mechanism
# # in the buildx bake file to pass the CONAN_LOGIN_USERNAME and CONAN_PASSWORD
# # values as environment variables to allow `conan upload" to authenticate on the fly.
Expand Down
Loading
Loading