From 092404bd33a0580a1ee8c184846c22eaa6027939 Mon Sep 17 00:00:00 2001
From: lewisc <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 10:03:58 +0100
Subject: [PATCH 01/20] Returning to roots

---
 Dockerfile       | 11 ++---------
 install_boost.sh | 15 ++++++---------
 2 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index aa46633..6da87da 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,13 +3,6 @@ ARG BASE_IMAGE
 FROM ${BASE_IMAGE}
 
 ARG PYTHON_VERS
-ARG BOOST_ROOT
-ARG BOOST_DIST
-
-ENV BOOST_ROOT=${BOOST_ROOT}
-ENV BOOST_DIST=${BOOST_DIST}
-RUN bash -c 'echo "set env BOOST_ROOT: ${BOOST_ROOT}"'
-RUN bash -c 'echo "set env BOOST_DIST: ${BOOST_DIST}"'
 
 # do a yum install
 RUN yum install -y automake autoconf libtool nano cppunit-devel
@@ -19,8 +12,8 @@ COPY . /io
 ADD https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.gz /io/boost.tgz
 
 # expand boost
-RUN mkdir ${BOOST_DIST}
-RUN tar -xzf /io/boost.tgz -C ${BOOST_DIST}
+RUN mkdir /boost
+RUN tar -xzf /io/boost.tgz -C /boost/
 
 ## run script
 RUN chmod +x /io/install_boost.sh
diff --git a/install_boost.sh b/install_boost.sh
index 5f6315e..03f08be 100755
--- a/install_boost.sh
+++ b/install_boost.sh
@@ -4,16 +4,12 @@ set -exu
 PY_VERSIONS_TO_BUILD="$*"
 
 # build all boost-python
-echo "Looking for boost sources within: ${BOOST_DIST}"
-BOOST_SRC_ROOT="$( find "${BOOST_DIST}" -maxdepth 2 -name bootstrap.sh | xargs dirname )"
-cd "${BOOST_SRC_ROOT}"
+BOOST_ROOT="$( find /boost/* -maxdepth 0 -type d -name 'boost*' )"
+echo "Found boost sources at: $BOOST_ROOT"
+cd "${BOOST_ROOT}"
 
-if [[ -d "${BOOST_ROOT}" ]]; then rm -rf "${BOOST_ROOT}"; fi
-mkdir "${BOOST_ROOT}"
+./bootstrap.sh --prefix=/usr --libdir=/usr/lib64 --includedir=/usr/include
 
-./bootstrap.sh --prefix="${BOOST_ROOT}" --with-libraries=python
-
-# cp -RL boost /usr/lib64/
 echo "will try building: ${PY_VERSIONS_TO_BUILD}"
 
 for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
@@ -54,7 +50,8 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
 
         ./b2 \
             --with-python \
-            --prefix="${BOOST_ROOT}" \
+            --libdir=/usr/lib64 \
+            --includedir=/usr/include \
             --user-config="/io/user-config.jam" \
             --python-buildid=${PY_BID} \
             python=${PYVER_DOT} \
-- 
GitLab


From 58fb3855e8703e5402bf1a161a2330060af863f5 Mon Sep 17 00:00:00 2001
From: lewisc <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 10:07:27 +0100
Subject: [PATCH 02/20] Trying to trigger idential branch name in libpsf

---
 .gitlab-ci.yml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 609cc1b..8cc6269 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -59,9 +59,13 @@ trigger_downstream:
     stage: trigger_downstream
     rules:
         - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+          trigger:
+            project: libpsf/manylinux-psf
+            branch: $CI_DEFAULT_BRANCH
+        - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
+          trigger:
+            project: libpsf/manylinux-psf
+            branch: $CI_COMMIT_REF_SLUG
     needs: 
         - build/build-legacy
         - build/build-modern
-    trigger:
-        project: libpsf/manylinux-psf
-        branch: $CI_DEFAULT_BRANCH
-- 
GitLab


From b61385d88460f6e8094fb2ee61b006f5b153dbbb Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 09:18:09 +0000
Subject: [PATCH 03/20] Updating downstream syntax

---
 .gitlab-ci.yml | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8cc6269..dec08e4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -56,16 +56,14 @@ build/build-modern:
     PYTHON_VERS: "3.6 3.7 3.8 3.9 3.10 3.11"
 
 trigger_downstream:
-    stage: trigger_downstream
-    rules:
-        - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
-          trigger:
-            project: libpsf/manylinux-psf
-            branch: $CI_DEFAULT_BRANCH
-        - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
-          trigger:
-            project: libpsf/manylinux-psf
-            branch: $CI_COMMIT_REF_SLUG
-    needs: 
-        - build/build-legacy
-        - build/build-modern
+  stage: trigger_downstream
+  rules:
+    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+      variables:
+        TRIGGER_BRANCH: $CI_DEFAULT_BRANCH
+    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
+      variables:
+        TRIGGER_BRANCH: $CI_COMMIT_REF_SLUG
+  trigger:
+    project: libpsf/manylinux-psf
+    branch: $TRIGGER_BRANCH
-- 
GitLab


From a9ac24ee18f280710ffbd5e3c07006b0d6d7ffac Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 10:29:31 +0000
Subject: [PATCH 04/20] Splitting trigger job into two

---
 .gitlab-ci.yml | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dec08e4..8193021 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -59,11 +59,14 @@ trigger_downstream:
   stage: trigger_downstream
   rules:
     - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
-      variables:
-        TRIGGER_BRANCH: $CI_DEFAULT_BRANCH
+  trigger:
+    project: libpsf/manylinux-psf
+    branch: $CI_DEFAULT_BRANCH
+
+trigger_downstream:
+  stage: trigger_downstream
+  rules:
     - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
-      variables:
-        TRIGGER_BRANCH: $CI_COMMIT_REF_SLUG
   trigger:
     project: libpsf/manylinux-psf
-    branch: $TRIGGER_BRANCH
+    branch: $CI_COMMIT_REF_SLUG
\ No newline at end of file
-- 
GitLab


From 49d371773a6f85d7644af4b0ea93b629ffa9282a Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 10:49:39 +0000
Subject: [PATCH 05/20] Bringing back boost copy command

---
 .gitlab-ci.yml   | 4 +---
 install_boost.sh | 2 ++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8193021..1265158 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,8 +19,6 @@ workflow:
       variables:
         TAG: $CI_COMMIT_REF_SLUG
 
-
-
 .build-common:
   stage: build
 
@@ -69,4 +67,4 @@ trigger_downstream:
     - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
   trigger:
     project: libpsf/manylinux-psf
-    branch: $CI_COMMIT_REF_SLUG
\ No newline at end of file
+    branch: $CI_COMMIT_REF_SLUG
diff --git a/install_boost.sh b/install_boost.sh
index 03f08be..b9de7c2 100755
--- a/install_boost.sh
+++ b/install_boost.sh
@@ -10,6 +10,8 @@ cd "${BOOST_ROOT}"
 
 ./bootstrap.sh --prefix=/usr --libdir=/usr/lib64 --includedir=/usr/include
 
+cp -RL boost /usr/lib64/
+
 echo "will try building: ${PY_VERSIONS_TO_BUILD}"
 
 for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
-- 
GitLab


From 83fca2844504c31bea8b7591e8abff79fdcb9616 Mon Sep 17 00:00:00 2001
From: lewisc <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 12:02:34 +0100
Subject: [PATCH 06/20] PYVER needs the 'u' on Python 2.7u

---
 install_boost.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install_boost.sh b/install_boost.sh
index 03f08be..c2b09d3 100755
--- a/install_boost.sh
+++ b/install_boost.sh
@@ -26,7 +26,7 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
         echo "no unicode suffix"
 
     elif [[ $python_version_2_build =~ [0-9][.][0-9]*u$ ]]; then
-        PYVER_DOT="$(echo $python_version_2_build | tr -d u)"
+        PYVER_DOT="$python_version_2_build"
         PYVER="$(echo $PYVER_DOT | tr -d .)"
         PY_BID="u"
         echo "with unicode suffix"
-- 
GitLab


From 75511997ec02827a8b01b0288ec257b88c61556e Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 11:14:46 +0000
Subject: [PATCH 07/20] Changed 'u' selection & removed copy command

---
 install_boost.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/install_boost.sh b/install_boost.sh
index c2c8b01..7af7d0b 100755
--- a/install_boost.sh
+++ b/install_boost.sh
@@ -10,8 +10,6 @@ cd "${BOOST_ROOT}"
 
 ./bootstrap.sh --prefix=/usr --libdir=/usr/lib64 --includedir=/usr/include
 
-cp -RL boost /usr/lib64/
-
 echo "will try building: ${PY_VERSIONS_TO_BUILD}"
 
 for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
@@ -22,7 +20,7 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
 
     if [[ $python_version_2_build =~ [0-9][.][0-9]*$ ]]; then
         # not unicode suffix
-        PYVER_DOT="$python_version_2_build"
+        PYVER_DOT="$(echo $python_version_2_build | tr -d u)"
         PYVER="$(echo $PYVER_DOT | tr -d .)"
         PY_BID=""
         echo "no unicode suffix"
@@ -56,7 +54,7 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
             --includedir=/usr/include \
             --user-config="/io/user-config.jam" \
             --python-buildid=${PY_BID} \
-            python=${PYVER_DOT} \
+            python="${PYVER_DOT}${PY_BID}" \
             install \
             #> /dev/null
 
-- 
GitLab


From 3bbeca1dbeb54ef86937c1f6c034ac19cf746b57 Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 11:23:11 +0000
Subject: [PATCH 08/20] Remove 'u' from PYVER_DOT

---
 install_boost.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install_boost.sh b/install_boost.sh
index 7af7d0b..211b201 100755
--- a/install_boost.sh
+++ b/install_boost.sh
@@ -20,13 +20,13 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
 
     if [[ $python_version_2_build =~ [0-9][.][0-9]*$ ]]; then
         # not unicode suffix
-        PYVER_DOT="$(echo $python_version_2_build | tr -d u)"
+        PYVER_DOT="$python_version_2_build"
         PYVER="$(echo $PYVER_DOT | tr -d .)"
         PY_BID=""
         echo "no unicode suffix"
 
     elif [[ $python_version_2_build =~ [0-9][.][0-9]*u$ ]]; then
-        PYVER_DOT="$python_version_2_build"
+        PYVER_DOT="$(echo $python_version_2_build | tr -d u)"
         PYVER="$(echo $PYVER_DOT | tr -d .)"
         PY_BID="u"
         echo "with unicode suffix"
-- 
GitLab


From 55fc1574072de53dd6d779c6666993ba0d77b564 Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 11:54:45 +0000
Subject: [PATCH 09/20] Bringing back the unicode file.

---
 install_boost.sh        | 6 ++++--
 user-config.jam         | 6 ------
 user-config.jam.unicode | 5 +++++
 3 files changed, 9 insertions(+), 8 deletions(-)
 create mode 100644 user-config.jam.unicode

diff --git a/install_boost.sh b/install_boost.sh
index 211b201..5f20a5d 100755
--- a/install_boost.sh
+++ b/install_boost.sh
@@ -23,12 +23,14 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
         PYVER_DOT="$python_version_2_build"
         PYVER="$(echo $PYVER_DOT | tr -d .)"
         PY_BID=""
+        CONFIG_FILE="/io/user-config.jam"
         echo "no unicode suffix"
 
     elif [[ $python_version_2_build =~ [0-9][.][0-9]*u$ ]]; then
         PYVER_DOT="$(echo $python_version_2_build | tr -d u)"
         PYVER="$(echo $PYVER_DOT | tr -d .)"
         PY_BID="u"
+        CONFIG_FILE="/io/user-config.jam.unicode"
         echo "with unicode suffix"
     else
         echo "requested python version: \"${python_version_2_build}\" doesn\'t match any known patterns"
@@ -52,9 +54,9 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
             --with-python \
             --libdir=/usr/lib64 \
             --includedir=/usr/include \
-            --user-config="/io/user-config.jam" \
+            --user-config="${CONFIG_FILE}" \
             --python-buildid=${PY_BID} \
-            python="${PYVER_DOT}${PY_BID}" \
+            python="${PYVER_DOT}" \
             install \
             #> /dev/null
 
diff --git a/user-config.jam b/user-config.jam
index 669ac2f..a1f2c08 100644
--- a/user-config.jam
+++ b/user-config.jam
@@ -4,12 +4,6 @@ using python
     : "/opt/python/cp27-cp27m/include/python2.7"
 ;
 
-using python
-    : "2.7u"
-    : "/opt/python/cp27-cp27mu"
-    : "/opt/python/cp27-cp27mu/include/python2.7"
-;
-
 using python
     : "3.6"
     : "/opt/python/cp36-cp36m"
diff --git a/user-config.jam.unicode b/user-config.jam.unicode
new file mode 100644
index 0000000..cfa6696
--- /dev/null
+++ b/user-config.jam.unicode
@@ -0,0 +1,5 @@
+using python
+    : "2.7"
+    : "/opt/python/cp27-cp27mu"
+    : "/opt/python/cp27-cp27mu/include/python2.7"
+;
-- 
GitLab


From caa65124cc52a640e262dd7f9b309a5150adc5ba Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 12:36:09 +0000
Subject: [PATCH 10/20] Testing only 2.7u

---
 .gitlab-ci.yml | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1265158..f275807 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -44,14 +44,14 @@ build/build-legacy:
   variables:
     TAG_SLUG: ${TAG}_legacy
     BASE_IMAGE: quay.io/pypa/manylinux1_x86_64
-    PYTHON_VERS: "2.7 2.7u"
+    PYTHON_VERS: "2.7u"
     
-build/build-modern:
-  extends: .build-common
-  variables:
-    TAG_SLUG: ${TAG}
-    BASE_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
-    PYTHON_VERS: "3.6 3.7 3.8 3.9 3.10 3.11"
+# build/build-modern:
+#   extends: .build-common
+#   variables:
+#     TAG_SLUG: ${TAG}
+#     BASE_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
+#     PYTHON_VERS: "3.6 3.7 3.8 3.9 3.10 3.11"
 
 trigger_downstream:
   stage: trigger_downstream
-- 
GitLab


From 519e36559e90aa558097f2bf3c36a1fc7b746671 Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 12:43:44 +0000
Subject: [PATCH 11/20] Returned 2.7 user-config to old format.

---
 .gitlab-ci.yml          | 8 +-------
 user-config.jam         | 1 -
 user-config.jam.unicode | 1 -
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f275807..c5b2612 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,17 +22,11 @@ workflow:
 .build-common:
   stage: build
 
-  variables:
-    BOOST_ROOT: "/boost"
-    BOOST_DIST: "/boost_dist/"
-
   before_script:
     - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
 
   script:
     - docker build
-        --build-arg BOOST_ROOT=${BOOST_ROOT}
-        --build-arg BOOST_DIST=${BOOST_DIST}
         --build-arg BASE_IMAGE=${BASE_IMAGE}
         --build-arg PYTHON_VERS="${PYTHON_VERS}"
         --compress
@@ -44,7 +38,7 @@ build/build-legacy:
   variables:
     TAG_SLUG: ${TAG}_legacy
     BASE_IMAGE: quay.io/pypa/manylinux1_x86_64
-    PYTHON_VERS: "2.7u"
+    PYTHON_VERS: "2.7 2.7u"
     
 # build/build-modern:
 #   extends: .build-common
diff --git a/user-config.jam b/user-config.jam
index a1f2c08..79fd2e3 100644
--- a/user-config.jam
+++ b/user-config.jam
@@ -1,7 +1,6 @@
 using python
     : "2.7"
     : "/opt/python/cp27-cp27m"
-    : "/opt/python/cp27-cp27m/include/python2.7"
 ;
 
 using python
diff --git a/user-config.jam.unicode b/user-config.jam.unicode
index cfa6696..2980bd4 100644
--- a/user-config.jam.unicode
+++ b/user-config.jam.unicode
@@ -1,5 +1,4 @@
 using python
     : "2.7"
     : "/opt/python/cp27-cp27mu"
-    : "/opt/python/cp27-cp27mu/include/python2.7"
 ;
-- 
GitLab


From 40dbbb03029b449a37a16447ff2156c0aa2922a5 Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 14:18:17 +0000
Subject: [PATCH 12/20] Running 2.7u first

---
 .gitlab-ci.yml  | 16 +++++++++-------
 user-config.jam |  6 ++++++
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c5b2612..39aa8c8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,14 +38,14 @@ build/build-legacy:
   variables:
     TAG_SLUG: ${TAG}_legacy
     BASE_IMAGE: quay.io/pypa/manylinux1_x86_64
-    PYTHON_VERS: "2.7 2.7u"
+    PYTHON_VERS: "2.7u 2.7 3.5"
     
-# build/build-modern:
-#   extends: .build-common
-#   variables:
-#     TAG_SLUG: ${TAG}
-#     BASE_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
-#     PYTHON_VERS: "3.6 3.7 3.8 3.9 3.10 3.11"
+build/build-modern:
+  extends: .build-common
+  variables:
+    TAG_SLUG: ${TAG}
+    BASE_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
+    PYTHON_VERS: "3.6 3.7 3.8 3.9 3.10 3.11"
 
 trigger_downstream:
   stage: trigger_downstream
@@ -54,6 +54,7 @@ trigger_downstream:
   trigger:
     project: libpsf/manylinux-psf
     branch: $CI_DEFAULT_BRANCH
+    strategy: depend
 
 trigger_downstream:
   stage: trigger_downstream
@@ -62,3 +63,4 @@ trigger_downstream:
   trigger:
     project: libpsf/manylinux-psf
     branch: $CI_COMMIT_REF_SLUG
+    strategy: depend
diff --git a/user-config.jam b/user-config.jam
index 79fd2e3..bfbc40f 100644
--- a/user-config.jam
+++ b/user-config.jam
@@ -3,6 +3,12 @@ using python
     : "/opt/python/cp27-cp27m"
 ;
 
+using python
+    : "3.5"
+    : "/opt/python/cp35-cp35m"
+    : "/opt/python/cp35-cp35m/include/python3.5m"
+;
+
 using python
     : "3.6"
     : "/opt/python/cp36-cp36m"
-- 
GitLab


From 25a222d8fe30b0dd3b9a8e28e5cfbc9086300699 Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 15:17:55 +0000
Subject: [PATCH 13/20] Trying to add encoding to installer

---
 install_boost.sh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/install_boost.sh b/install_boost.sh
index 5f20a5d..c3c9e67 100755
--- a/install_boost.sh
+++ b/install_boost.sh
@@ -24,12 +24,14 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
         PYVER="$(echo $PYVER_DOT | tr -d .)"
         PY_BID=""
         CONFIG_FILE="/io/user-config.jam"
+        ENCODING="ucs2"
         echo "no unicode suffix"
 
     elif [[ $python_version_2_build =~ [0-9][.][0-9]*u$ ]]; then
         PYVER_DOT="$(echo $python_version_2_build | tr -d u)"
         PYVER="$(echo $PYVER_DOT | tr -d .)"
         PY_BID="u"
+        ENCODING="ucs4"
         CONFIG_FILE="/io/user-config.jam.unicode"
         echo "with unicode suffix"
     else
@@ -49,17 +51,16 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
         echo "installing python version $python_version_2_build"
         echo "PYVER: $PYVER"
         echo "PYVER_DOT: $PYVER_DOT"
-
+        
         ./b2 \
             --with-python \
             --libdir=/usr/lib64 \
             --includedir=/usr/include \
             --user-config="${CONFIG_FILE}" \
             --python-buildid=${PY_BID} \
+            --enable-unicode="${ENCODING}"
             python="${PYVER_DOT}" \
-            install \
-            #> /dev/null
-
+            install
         ./b2 \
             --with-python \
             --prefix="${BOOST_ROOT}" \
-- 
GitLab


From 746c53eeac5f3a50dc911665de926ed3bd399e09 Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 15:23:36 +0000
Subject: [PATCH 14/20] Syntax

---
 install_boost.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install_boost.sh b/install_boost.sh
index c3c9e67..413b986 100755
--- a/install_boost.sh
+++ b/install_boost.sh
@@ -58,7 +58,7 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
             --includedir=/usr/include \
             --user-config="${CONFIG_FILE}" \
             --python-buildid=${PY_BID} \
-            --enable-unicode="${ENCODING}"
+            --enable-unicode="${ENCODING}" \
             python="${PYVER_DOT}" \
             install
         ./b2 \
-- 
GitLab


From e7a3f0f04bb5b3c0e23fde86c0a7948774a7a688 Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 16:05:34 +0000
Subject: [PATCH 15/20] Trying the copy step once more

---
 .gitlab-ci.yml   | 2 +-
 install_boost.sh | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 39aa8c8..6c7fbb1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,7 +38,7 @@ build/build-legacy:
   variables:
     TAG_SLUG: ${TAG}_legacy
     BASE_IMAGE: quay.io/pypa/manylinux1_x86_64
-    PYTHON_VERS: "2.7u 2.7 3.5"
+    PYTHON_VERS: "2.7 2.7u 3.5"
     
 build/build-modern:
   extends: .build-common
diff --git a/install_boost.sh b/install_boost.sh
index 413b986..80aba01 100755
--- a/install_boost.sh
+++ b/install_boost.sh
@@ -12,6 +12,8 @@ cd "${BOOST_ROOT}"
 
 echo "will try building: ${PY_VERSIONS_TO_BUILD}"
 
+cp -RL boost /usr/lib64/
+
 for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
 
     echo "#####################################################################"
@@ -52,6 +54,7 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
         echo "PYVER: $PYVER"
         echo "PYVER_DOT: $PYVER_DOT"
         
+        if [[ ${PYBIN} ]]
         ./b2 \
             --with-python \
             --libdir=/usr/lib64 \
-- 
GitLab


From 1947f6c08e95959d3d956ce0c3622dd237ad3aa7 Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 16:16:21 +0000
Subject: [PATCH 16/20] Added better way to calculate encoding.

---
 install_boost.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/install_boost.sh b/install_boost.sh
index 80aba01..f277c3b 100755
--- a/install_boost.sh
+++ b/install_boost.sh
@@ -26,14 +26,12 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
         PYVER="$(echo $PYVER_DOT | tr -d .)"
         PY_BID=""
         CONFIG_FILE="/io/user-config.jam"
-        ENCODING="ucs2"
         echo "no unicode suffix"
 
     elif [[ $python_version_2_build =~ [0-9][.][0-9]*u$ ]]; then
         PYVER_DOT="$(echo $python_version_2_build | tr -d u)"
         PYVER="$(echo $PYVER_DOT | tr -d .)"
         PY_BID="u"
-        ENCODING="ucs4"
         CONFIG_FILE="/io/user-config.jam.unicode"
         echo "with unicode suffix"
     else
@@ -54,7 +52,12 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
         echo "PYVER: $PYVER"
         echo "PYVER_DOT: $PYVER_DOT"
         
-        if [[ ${PYBIN} ]]
+        if [[ $(${PYBIN}/python -c "import sys; print(sys.maxunicode)")  == 1114111 ]]; then
+            ENCODING="ucs2"
+        else
+            ENCODING="ucs4"
+        fi
+
         ./b2 \
             --with-python \
             --libdir=/usr/lib64 \
-- 
GitLab


From fe63fbf65ad68e690daaecac4e324e7082c82cdf Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 16:47:31 +0000
Subject: [PATCH 17/20] Added full 2.7 paths back into jam files

---
 user-config.jam         | 1 +
 user-config.jam.unicode | 1 +
 2 files changed, 2 insertions(+)

diff --git a/user-config.jam b/user-config.jam
index bfbc40f..777adc1 100644
--- a/user-config.jam
+++ b/user-config.jam
@@ -1,6 +1,7 @@
 using python
     : "2.7"
     : "/opt/python/cp27-cp27m"
+    : "/opt/python/cp27-cp27m/include/python2.7
 ;
 
 using python
diff --git a/user-config.jam.unicode b/user-config.jam.unicode
index 2980bd4..041097d 100644
--- a/user-config.jam.unicode
+++ b/user-config.jam.unicode
@@ -1,4 +1,5 @@
 using python
     : "2.7"
     : "/opt/python/cp27-cp27mu"
+    : "/opt/python/cp27-cp27mu/include/python2.7
 ;
-- 
GitLab


From 136605ebe1bb7590fd8ba618e4610e4567ce2b06 Mon Sep 17 00:00:00 2001
From: Lewis Chambers <lewis.chambers@agileanalog.com>
Date: Fri, 2 Sep 2022 16:51:30 +0000
Subject: [PATCH 18/20] Typo

---
 user-config.jam         | 2 +-
 user-config.jam.unicode | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/user-config.jam b/user-config.jam
index 777adc1..5b8d38f 100644
--- a/user-config.jam
+++ b/user-config.jam
@@ -1,7 +1,7 @@
 using python
     : "2.7"
     : "/opt/python/cp27-cp27m"
-    : "/opt/python/cp27-cp27m/include/python2.7
+    : "/opt/python/cp27-cp27m/include/python2.7"
 ;
 
 using python
diff --git a/user-config.jam.unicode b/user-config.jam.unicode
index 041097d..cfa6696 100644
--- a/user-config.jam.unicode
+++ b/user-config.jam.unicode
@@ -1,5 +1,5 @@
 using python
     : "2.7"
     : "/opt/python/cp27-cp27mu"
-    : "/opt/python/cp27-cp27mu/include/python2.7
+    : "/opt/python/cp27-cp27mu/include/python2.7"
 ;
-- 
GitLab


From 4e62c7e32eb01f178ff8189ef3aaec1f77ff60d0 Mon Sep 17 00:00:00 2001
From: Barry Muldrey <barry@muldrey.net>
Date: Fri, 2 Sep 2022 13:05:21 -0700
Subject: [PATCH 19/20] abandon manual boost path management entirely

---
 .gitlab-ci.yml                                     | 10 +++++-----
 install_boost.sh                                   | 11 +++--------
 user-config.jam.unicode => user-config.unicode.jam |  0
 3 files changed, 8 insertions(+), 13 deletions(-)
 rename user-config.jam.unicode => user-config.unicode.jam (100%)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6c7fbb1..faf4651 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,7 +8,7 @@ services:
 
 stages:
   - build
-  - trigger_downstream
+  - trigger-downstream
 
 workflow:
   rules:
@@ -47,8 +47,8 @@ build/build-modern:
     BASE_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
     PYTHON_VERS: "3.6 3.7 3.8 3.9 3.10 3.11"
 
-trigger_downstream:
-  stage: trigger_downstream
+trigger-downstream:
+  stage: trigger-downstream
   rules:
     - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
   trigger:
@@ -56,8 +56,8 @@ trigger_downstream:
     branch: $CI_DEFAULT_BRANCH
     strategy: depend
 
-trigger_downstream:
-  stage: trigger_downstream
+trigger-downstream:
+  stage: trigger-downstream
   rules:
     - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
   trigger:
diff --git a/install_boost.sh b/install_boost.sh
index f277c3b..1fd7694 100755
--- a/install_boost.sh
+++ b/install_boost.sh
@@ -8,12 +8,10 @@ BOOST_ROOT="$( find /boost/* -maxdepth 0 -type d -name 'boost*' )"
 echo "Found boost sources at: $BOOST_ROOT"
 cd "${BOOST_ROOT}"
 
-./bootstrap.sh --prefix=/usr --libdir=/usr/lib64 --includedir=/usr/include
+#./bootstrap.sh --prefix=/usr --libdir=/usr/lib64 --includedir=/usr/include
+./bootstrap.sh
 
 echo "will try building: ${PY_VERSIONS_TO_BUILD}"
-
-cp -RL boost /usr/lib64/
-
 for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
 
     echo "#####################################################################"
@@ -32,7 +30,7 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
         PYVER_DOT="$(echo $python_version_2_build | tr -d u)"
         PYVER="$(echo $PYVER_DOT | tr -d .)"
         PY_BID="u"
-        CONFIG_FILE="/io/user-config.jam.unicode"
+        CONFIG_FILE="/io/user-config.unicode.jam"
         echo "with unicode suffix"
     else
         echo "requested python version: \"${python_version_2_build}\" doesn\'t match any known patterns"
@@ -60,8 +58,6 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
 
         ./b2 \
             --with-python \
-            --libdir=/usr/lib64 \
-            --includedir=/usr/include \
             --user-config="${CONFIG_FILE}" \
             --python-buildid=${PY_BID} \
             --enable-unicode="${ENCODING}" \
@@ -69,7 +65,6 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
             install
         ./b2 \
             --with-python \
-            --prefix="${BOOST_ROOT}" \
             --clean-all \
             > /dev/null
 
diff --git a/user-config.jam.unicode b/user-config.unicode.jam
similarity index 100%
rename from user-config.jam.unicode
rename to user-config.unicode.jam
-- 
GitLab


From 420f98fc23dd05c767a295dc8b02336f84c2460e Mon Sep 17 00:00:00 2001
From: Barry Muldrey <barry@muldrey.net>
Date: Fri, 2 Sep 2022 13:15:48 -0700
Subject: [PATCH 20/20] tidy up output right before build begins

---
 install_boost.sh | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/install_boost.sh b/install_boost.sh
index 1fd7694..b4e43d5 100755
--- a/install_boost.sh
+++ b/install_boost.sh
@@ -43,19 +43,18 @@ for python_version_2_build in ${PY_VERSIONS_TO_BUILD}; do
 
         if [[ ! $PYBIN =~ ^/opt/python/cp${PYVER}-* ]]; then
             continue;
+        else
+            found_one=1
         fi
 
-        found_one=1
-        echo "installing python version $python_version_2_build"
-        echo "PYVER: $PYVER"
-        echo "PYVER_DOT: $PYVER_DOT"
-        
         if [[ $(${PYBIN}/python -c "import sys; print(sys.maxunicode)")  == 1114111 ]]; then
             ENCODING="ucs2"
         else
             ENCODING="ucs4"
         fi
 
+        echo "building boost.python for requested version: ${python_version_2_build} using python binary: ${PYBIN} (PYVER: ${PYVER} and PYVER_DOT: ${PYVER_DOT} and ENCODING: ${ENCODING})"
+
         ./b2 \
             --with-python \
             --user-config="${CONFIG_FILE}" \
-- 
GitLab