diff options
author | James Le Cuirot <chewi@gentoo.org> | 2023-07-15 12:20:27 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-08-02 07:31:19 +0100 |
commit | ad3994394af0bc975ec7c28bd60de496b580c25e (patch) | |
tree | 6d7d1321e8c1a9ef585764a67cc0694762a9b217 /.github | |
parent | Linting fixes (diff) | |
download | portage-ad3994394af0bc975ec7c28bd60de496b580c25e.tar.gz portage-ad3994394af0bc975ec7c28bd60de496b580c25e.tar.bz2 portage-ad3994394af0bc975ec7c28bd60de496b580c25e.zip |
Migrate from setuptools to Meson and meson-python
This makes Portage PEP 517 compliant.
When building via meson-python, the man pages and logrotate config are
no longer included as there seems little point.
Bug: https://bugs.gentoo.org/910035
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 21 | ||||
-rw-r--r-- | .github/workflows/lint.yml | 11 |
2 files changed, 16 insertions, 16 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bfe4847a..519bf92c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,20 +24,21 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Install python dependencies + - name: Install dependencies run: | set -xe sudo apt-get update - sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libxml2-utils zstd + sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libxml2-utils meson zstd python -VV python -m site python -m pip install --upgrade pip - python -m pip install tox tox-gh-actions setuptools - - name: Test ./setup.py install --root=/tmp/install-root + # setuptools needed for 3.12+ because of https://github.com/mesonbuild/meson/issues/7702. + python -m pip install pytest setuptools + - name: Test meson install --destdir /tmp/install-root run: | - printf "[build_ext]\nportage_ext_modules=true" >> setup.cfg - ./setup.py install --root=/tmp/install-root - - name: Run tox test env for ${{ matrix.python-version }} - run: tox -vv - env: - TARGET: test + echo -e "[binaries]\npython = '$(command -v python)'" > /tmp/native.ini + meson setup --native-file /tmp/native.ini /tmp/build . + meson install -C /tmp/build --destdir /tmp/install-root + - name: Run tests for ${{ matrix.python-version }} + run: | + meson test -C /tmp/build --verbose diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 469cffe37..f2af40957 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,7 @@ jobs: - '3.9' - '3.10' - '3.11' - # Complains about importing distutils.dir_utils + # pylint currently broken under 3.12 # - '3.12-dev' fail-fast: false steps: @@ -40,8 +40,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip - python -m pip install tox tox-gh-actions - - name: Run tox pylint env for ${{ matrix.python-version }} - run: tox -vv - env: - TARGET: pylint + python -m pip install pylint pytest + - name: Run pylint for ${{ matrix.python-version }} + run: | + ./run-pylint |