]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci: use the 'build' python package as build frontend
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 2 Jan 2023 03:26:32 +0000 (03:26 +0000)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 2 Jan 2023 03:26:32 +0000 (03:26 +0000)
.github/workflows/packages-pool.yml
.github/workflows/packages-src.yml

index d6ac6bd4d3b6df223fad47fc84e7a903a8749036..fdbb9e10475f3feb103cec11ffa6851ec96033ce 100644 (file)
@@ -14,8 +14,8 @@ jobs:
       fail-fast: false
       matrix:
         include:
-          - {package: psycopg_pool, format: sdist, impl: python}
-          - {package: psycopg_pool, format: wheel, impl: python}
+          - {package: psycopg_pool, format: sdist}
+          - {package: psycopg_pool, format: wheel}
 
     steps:
       - uses: actions/checkout@v3
@@ -24,25 +24,18 @@ jobs:
         with:
           python-version: 3.9
 
-      - name: Create the sdist packages
-        working-directory: ${{ matrix.package }}
-        run: python setup.py sdist -d ../dist
-        if: ${{ matrix.format == 'sdist' }}
+      - name: Install the build package
+        run: pip install build
 
-      - name: Create the wheel packages
-        working-directory: ${{ matrix.package }}
-        run: pip wheel -w ../dist .
-        if: ${{ matrix.format == 'wheel' }}
+      - name: Create the package
+        run: python -m build -o dist --${{ matrix.format }} ${{ matrix.package }}
 
       - name: Install the Python pool package and test requirements
-        run: |-
-          pip install dist/*
-          pip install ./psycopg[test]
+        run: pip install ./psycopg[test] dist/*
 
-      - name: Test the sdist package
-        run: pytest -m 'not slow and not flakey' --color yes
+      - name: Test the package
+        run: pytest -m 'pool and not slow and not flakey' --color yes
         env:
-          PSYCOPG_IMPL: ${{ matrix.impl }}
           PSYCOPG_TEST_DSN: "host=127.0.0.1 user=postgres"
           PGPASSWORD: password
 
index df8b029dd3d80c033d18861c2d9fce82f180d6f5..8dc119d441e57a2a667a2c0cbf88cb4f70c4a212 100644 (file)
@@ -26,27 +26,18 @@ jobs:
         with:
           python-version: 3.9
 
-      - name: Create the sdist packages
-        working-directory: ${{ matrix.package }}
-        run: python setup.py sdist -d ../dist
-        if: ${{ matrix.format == 'sdist' }}
+      - name: Install the build package
+        run: pip install build
 
-      - name: Create the wheel packages
-        working-directory: ${{ matrix.package }}
-        run: pip wheel -w ../dist .
-        if: ${{ matrix.format == 'wheel' }}
+      - name: Create the package
+        run: python -m build -o dist --${{ matrix.format }} ${{ matrix.package }}
 
       - name: Install the Python package and test requirements
-        run: |-
-          pip install `ls dist/*`[test]
-          pip install ./psycopg_pool
+        run: pip install `ls dist/*`[test] ./psycopg_pool
         if: ${{ matrix.package == 'psycopg' }}
 
       - name: Install the C package and test requirements
-        run: |-
-          pip install dist/*
-          pip install ./psycopg[test]
-          pip install ./psycopg_pool
+        run: pip install dist/* ./psycopg[test] ./psycopg_pool
         if: ${{ matrix.package == 'psycopg_c' }}
 
       - name: Test the sdist package