From: Daniele Varrazzo Date: Mon, 2 Jan 2023 03:26:32 +0000 (+0000) Subject: ci: use the 'build' python package as build frontend X-Git-Tag: pool-3.2.0~144^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dccf2a41096981779bf8f2c5dd6fa454f8f1d1d;p=thirdparty%2Fpsycopg.git ci: use the 'build' python package as build frontend --- diff --git a/.github/workflows/packages-pool.yml b/.github/workflows/packages-pool.yml index d6ac6bd4d..fdbb9e104 100644 --- a/.github/workflows/packages-pool.yml +++ b/.github/workflows/packages-pool.yml @@ -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 diff --git a/.github/workflows/packages-src.yml b/.github/workflows/packages-src.yml index df8b029dd..8dc119d44 100644 --- a/.github/workflows/packages-src.yml +++ b/.github/workflows/packages-src.yml @@ -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