]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
chore: rename tools/build library "ci" 1011/head
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 22 Feb 2025 14:00:38 +0000 (15:00 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 27 Feb 2025 02:44:01 +0000 (03:44 +0100)
The name `build` is problematic because we typically want to avoid tools
to go exploring them (mypy, isort, black...) but this leaves this
directory unexplored.

17 files changed:
.github/workflows/packages-bin.yml
.github/workflows/tests.yml
.gitignore
docs/release.rst
pyproject.toml
tools/ci/build_libpq.sh [moved from tools/build/build_libpq.sh with 100% similarity]
tools/ci/build_macos_arm64.sh [moved from tools/build/build_macos_arm64.sh with 98% similarity]
tools/ci/ci_install_libpq.sh [moved from tools/build/ci_install_libpq.sh with 100% similarity]
tools/ci/ci_test.sh [moved from tools/build/ci_test.sh with 100% similarity]
tools/ci/copy_to_binary.py [moved from tools/build/copy_to_binary.py with 100% similarity]
tools/ci/print_so_versions.sh [moved from tools/build/print_so_versions.sh with 100% similarity]
tools/ci/run_build_macos_arm64.sh [moved from tools/build/run_build_macos_arm64.sh with 97% similarity]
tools/ci/scaleway_m1.sh [moved from tools/build/scaleway_m1.sh with 100% similarity]
tools/ci/strip_wheel.sh [moved from tools/build/strip_wheel.sh with 100% similarity]
tools/ci/wheel_linux_before_all.sh [moved from tools/build/wheel_linux_before_all.sh with 100% similarity]
tools/ci/wheel_macos_before_all.sh [moved from tools/build/wheel_macos_before_all.sh with 95% similarity]
tools/ci/wheel_win32_before_build.bat [moved from tools/build/wheel_win32_before_build.bat with 97% similarity]

index dcdcb7cde037e46740999e1596d0227fe46e52f3..72666a97d914ffb7f86b3816a9dcde54d253ea01 100644 (file)
@@ -65,7 +65,7 @@ jobs:
           key: libpq-${{ matrix.platform }}-${{ matrix.arch }}-${{ env.LIBPQ_VERSION }}-${{ env.OPENSSL_VERSION }}
 
       - name: Create the binary package source tree
-        run: python3 ./tools/build/copy_to_binary.py
+        run: python3 ./tools/ci/copy_to_binary.py
 
       - name: Build wheels
         uses: pypa/cibuildwheel@v2.22.0
@@ -78,9 +78,9 @@ jobs:
           CIBW_MANYLINUX_PPC64LE_IMAGE: manylinux2014
           CIBW_BUILD: ${{matrix.pyver}}-${{matrix.platform}}_${{matrix.arch}}
           CIBW_ARCHS_LINUX: auto aarch64 ppc64le
-          CIBW_BEFORE_ALL_LINUX: ./tools/build/wheel_linux_before_all.sh
+          CIBW_BEFORE_ALL_LINUX: ./tools/ci/wheel_linux_before_all.sh
           CIBW_REPAIR_WHEEL_COMMAND: >-
-            ./tools/build/strip_wheel.sh {wheel}
+            ./tools/ci/strip_wheel.sh {wheel}
             && auditwheel repair -w {dest_dir} {wheel}
           CIBW_TEST_REQUIRES: ./psycopg[test] ./psycopg_pool
           CIBW_TEST_COMMAND: >-
@@ -139,7 +139,7 @@ jobs:
           key: libpq-${{ env.LIBPQ_VERSION }}-macos-${{ matrix.arch }}-${{ env.OPENSSL_VERSION }}
 
       - name: Create the binary package source tree
-        run: python3 ./tools/build/copy_to_binary.py
+        run: python3 ./tools/ci/copy_to_binary.py
 
       - name: Build wheels
         uses: pypa/cibuildwheel@v2.22.0
@@ -149,7 +149,7 @@ jobs:
           CIBW_BUILD: ${{matrix.pyver}}-macosx_${{matrix.arch}}
           CIBW_ARCHS_MACOS: ${{matrix.arch}}
           MACOSX_ARCHITECTURE: ${{matrix.arch}}
-          CIBW_BEFORE_ALL_MACOS: ./tools/build/wheel_macos_before_all.sh
+          CIBW_BEFORE_ALL_MACOS: ./tools/ci/wheel_macos_before_all.sh
           CIBW_TEST_REQUIRES: ./psycopg[test] ./psycopg_pool
           CIBW_TEST_COMMAND: >-
             pytest {project}/tests -m 'not slow and not flakey' --color yes
@@ -207,7 +207,7 @@ jobs:
         id: libdir
 
       - name: Create the binary package source tree
-        run: python3 ./tools/build/copy_to_binary.py
+        run: python3 ./tools/ci/copy_to_binary.py
 
       - name: Build wheels
         uses: pypa/cibuildwheel@v2.22.0
@@ -217,7 +217,7 @@ jobs:
           VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" # cache vcpkg
           CIBW_BUILD: ${{matrix.pyver}}-${{matrix.arch}}
           CIBW_ARCHS_WINDOWS: AMD64 x86
-          CIBW_BEFORE_BUILD_WINDOWS: '.\tools\build\wheel_win32_before_build.bat'
+          CIBW_BEFORE_BUILD_WINDOWS: '.\tools\ci\wheel_win32_before_build.bat'
           CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >-
             delvewheel repair -w {dest_dir}
             --add-path="${{ steps.libdir.outputs.EXTRA_LIB_DIR }}"
index bc2aa108b237c8d8a0185d1a3d22e4091436c3f9..feece0570cb5422dcbbe9c0799f409a050aa6db6 100644 (file)
@@ -82,7 +82,7 @@ jobs:
             -c max_prepared_transactions=10
 
       - name: Install the wanted libpq version
-        run: sudo ./tools/build/ci_install_libpq.sh ${{ matrix.libpq }}
+        run: sudo ./tools/ci/ci_install_libpq.sh ${{ matrix.libpq }}
 
       - name: Include psycopg-c to the packages to install
         if: ${{ matrix.impl == 'c' }}
@@ -136,7 +136,7 @@ jobs:
         run: pip install $DEPS
 
       - name: Run tests
-        run: ./tools/build/ci_test.sh
+        run: ./tools/ci/ci_test.sh
 
 
   # }}}
@@ -205,7 +205,7 @@ jobs:
         run: pip install $DEPS
 
       - name: Run tests
-        run: ./tools/build/ci_test.sh
+        run: ./tools/ci/ci_test.sh
 
 
   # }}}
@@ -264,7 +264,7 @@ jobs:
         run: pip install $DEPS
 
       - name: Run tests
-        run: ./tools/build/ci_test.sh
+        run: ./tools/ci/ci_test.sh
 
 
   # }}}
@@ -337,7 +337,7 @@ jobs:
         run: echo "$(pg_config.exe --bindir)" >> $GITHUB_PATH
 
       - name: Install delvewheel
-        run: .\tools\build\wheel_win32_before_build.bat
+        run: .\tools\ci\wheel_win32_before_build.bat
         shell: powershell
 
       - name: Build the C wheel
@@ -354,7 +354,7 @@ jobs:
         run: pip install $DEPS
 
       - name: Run tests
-        run: ./tools/build/ci_test.sh
+        run: ./tools/ci/ci_test.sh
 
 
   # }}}
@@ -405,7 +405,7 @@ jobs:
             start-single-node --insecure
 
       - name: Install the wanted libpq version
-        run: sudo ./tools/build/ci_install_libpq.sh ${{ matrix.libpq }}
+        run: sudo ./tools/ci/ci_install_libpq.sh ${{ matrix.libpq }}
 
       - name: Include psycopg-c to the packages to install
         if: ${{ matrix.impl == 'c' }}
@@ -416,7 +416,7 @@ jobs:
         run: pip install $DEPS
 
       - name: Run tests
-        run: ./tools/build/ci_test.sh
+        run: ./tools/ci/ci_test.sh
 
 
   # }}}
index 7040b97519147909a4b24a34c0732b8590550b79..9ab9d69338c056d51693d4aec97676b2e821a3cd 100644 (file)
@@ -16,11 +16,4 @@ htmlcov
 .eggs/
 dist/
 wheelhouse/
-# Spelling these explicitly because we have /scripts/build/ to not ignore
-# but I still want 'ag' to avoid looking here.
-/build/
-/psycopg/build/
-/psycopg_c/build/
-/psycopg_pool/build/
-/tools/build/pg_config_vcpkg_stub/build/
-/tools/isort-psycopg/build/
+build/
index fcca3af6084b5a461e3fe53a5242601d3c38b2ad..fce350b89b1e456dc202178a277176e8a38a4f34 100644 (file)
@@ -34,7 +34,7 @@ How to make a psycopg release
 
 - Delete the ``wheelhouse`` directory if there is one.
 
-- Build m1 packages by running ``./tools/build/run_build_macos_arm64.sh BRANCH``.
+- Build m1 packages by running ``./tools/ci/run_build_macos_arm64.sh BRANCH``.
   On successful completion it will save built packages in ``wheelhouse``
 
 - If all packages were built ok, push the new tag created by ``bump_version.py``::
@@ -84,9 +84,9 @@ When a new PostgreSQL major version is released
   -  ``.github/workflows/packages-bin.yml``.
   -  ``.github/workflows/tests.yml``.
 
-- Bump ``pg_version`` in ``tools/build/build_macos_arm64.sh``.
+- Bump ``pg_version`` in ``tools/ci/build_macos_arm64.sh``.
 
-- Bump the version in ``tools/build/wheel_win32_before_build.bat``.
+- Bump the version in ``tools/ci/wheel_win32_before_build.bat``.
 
 - Update the documented versions in:
 
@@ -107,7 +107,7 @@ When a new Python major version is released
   ``psycopg/pyproject.toml``, ``psycopg_c/pyproject.toml``, and
   ``psycopg_pool/pyproject.toml``.
 
-- Update the list of versions in ``tools/build/build_macos_arm64.sh`` to include
+- Update the list of versions in ``tools/ci/build_macos_arm64.sh`` to include
   the new version. Look for both the ``python_versions`` variable and the
   ``CIBW_BUILD`` environment variable.
 
index f684b648997390e0b1216f4a47e24b1fcc130851..f3fa58e5da96432eb17ea7eab2c211200d8c0315 100644 (file)
@@ -38,13 +38,7 @@ disable_bytearray_promotion = true
 disable_memoryview_promotion = true
 strict = true
 exclude = '''(?x)(
-    ^ build/
-    | docs/lib/.*\.py
-    | psycopg/build/
-    | psycopg_binary/build/
-    | psycopg_c/build/
-    | psycopg_pool/build/
-    | tools/build/pg_config_vcpkg_stub/build/
+    ^ docs/lib/.*\.py
 )'''
 
 [[tool.mypy.overrides]]
similarity index 98%
rename from tools/build/build_macos_arm64.sh
rename to tools/ci/build_macos_arm64.sh
index a4a889a9dd9fc9fe0b5bf826bfeb3deb189ec8fc..8d6bcf59345ba5edd9cb06319295e61e008cc4c8 100755 (executable)
@@ -92,7 +92,7 @@ log "building wheels"
 
 # Create the psycopg_binary source package
 rm -rf psycopg_binary
-python tools/build/copy_to_binary.py
+python tools/ci/copy_to_binary.py
 
 # Build the binary packages
 export CIBW_PLATFORM=macos
similarity index 100%
rename from tools/build/ci_test.sh
rename to tools/ci/ci_test.sh
similarity index 97%
rename from tools/build/run_build_macos_arm64.sh
rename to tools/ci/run_build_macos_arm64.sh
index 45e865299883c493c41bf64d84a290ae1d7307a4..e303654a4f9f17db0d006655ba39bb2dba692e11 100755 (executable)
@@ -58,7 +58,7 @@ $ssh rm -rf "${rdir}"
 $ssh git clone https://github.com/psycopg/psycopg.git --branch ${tag} "${rdir}"
 
 # Build the wheel packages
-$ssh "${rdir}/tools/build/build_macos_arm64.sh"
+$ssh "${rdir}/tools/ci/build_macos_arm64.sh"
 
 # Transfer the packages locally
 scp -r "${user}@${host}:${rdir}/wheelhouse" .
similarity index 95%
rename from tools/build/wheel_macos_before_all.sh
rename to tools/ci/wheel_macos_before_all.sh
index e3fb2f437c788142976c6e8719556fc21acee012..e21f945b8b89c0577c9e5d5c08816db512aeb7ee 100755 (executable)
@@ -11,7 +11,7 @@ dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 prjdir="$( cd "${dir}/../.." && pwd )"
 
 # Build dependency libraries
-"${prjdir}/tools/build/build_libpq.sh"
+"${prjdir}/tools/ci/build_libpq.sh"
 
 # Show dependency tree
 otool -L /tmp/libpq.build/lib/*.dylib
similarity index 97%
rename from tools/build/wheel_win32_before_build.bat
rename to tools/ci/wheel_win32_before_build.bat
index c016ceb2c5e022bcd7274d50fba063d5260ec6e8..6a90ca277f171d69b5d790c2a67284eebc443fae 100644 (file)
@@ -1,4 +1,3 @@
 @echo on
 
 pip install delvewheel wheel
-