From 24369e749e874cb871727dbdd02ca95b3eb65a04 Mon Sep 17 00:00:00 2001 From: Arthur Zamarin Date: Thu, 22 Sep 2022 21:29:50 +0300 Subject: build backend: use custom wrapper around flit For pkgcore we need to run multiple preparations of generating files before creating sdist or wheel. Flit is a very simple and nice build backend, much more than setuptools. Signed-off-by: Arthur Zamarin --- .github/workflows/doc.yml | 6 ++---- .github/workflows/release.yml | 16 ++++++++-------- .github/workflows/test.yml | 9 +++------ 3 files changed, 13 insertions(+), 18 deletions(-) (limited to '.github') diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 7a290586..776871b9 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -26,17 +26,15 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.10' - cache: 'pip' - cache-dependency-path: requirements/*.txt - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements/dev.txt -r requirements/docs.txt + pip install ".[doc]" - name: Build sphinx documentation run: | - python setup.py build_docs + make html # notify github this isn't a jekyll site touch build/sphinx/html/.nojekyll diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6935f452..af0b9d08 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: branches: [deploy] tags: [v*] + workflow_dispatch: jobs: build-and-deploy: @@ -13,31 +14,30 @@ jobs: uses: actions/checkout@v3 - name: Set up Python 3.10 - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" cache: 'pip' - cache-dependency-path: | - requirements/dist.txt - requirements/test.txt + cache-dependency-path: pyproject.toml - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements/dist.txt -r requirements/test.txt + pip install build ".[test,doc]" - name: Test with pytest env: PY_COLORS: 1 # forcibly enable pytest colors - run: python setup.py test + run: pytest - name: Build sdist run: | git clean -fxd - python setup.py sdist + make man + make sdist - name: Build wheel - run: python setup.py bdist_wheel + run: make wheel - name: Output dist file info run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c928b30f..ee1e52ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,16 +37,14 @@ jobs: - name: Pin dependencies to minimal versions if: ${{ matrix.deps == 'minimal-deps' }} - run: | - sed -e 's:~=:==:' -i requirements/* - mv requirements/install.txt requirements/dev.txt + run: sed -e '/dependencies/,$s/~=/==/' -i pyproject.toml - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} cache: 'pip' - cache-dependency-path: requirements/*.txt + cache-dependency-path: pyproject.toml # experimental targets generally lack lxml wheels - name: Install libxml2 and libxslt development packages @@ -61,8 +59,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements/test.txt -r requirements/ci.txt - pip install . + pip install ".[test]" - name: Test with pytest env: -- cgit v1.2.3-65-gdbad