aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2022-11-16 14:35:05 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2022-11-16 20:08:28 +0200
commit27dd5ec2b8ca977e0b9711eca0d6cba543743a4e (patch)
treec35b3f648ca6cdb1473f02a5b837a654e81b1f7f /.github
parentcommit: mention `-e` as nice option (diff)
downloadpkgdev-27dd5ec2b8ca977e0b9711eca0d6cba543743a4e.tar.gz
pkgdev-27dd5ec2b8ca977e0b9711eca0d6cba543743a4e.tar.bz2
pkgdev-27dd5ec2b8ca977e0b9711eca0d6cba543743a4e.zip
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. Also migrate to use snakeoil.dist sphinx extension for generating man and html, to remove various logic from `doc/conf.py`. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/doc.yml4
-rw-r--r--.github/workflows/release.yml16
-rw-r--r--.github/workflows/test.yml17
3 files changed, 18 insertions, 19 deletions
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index 4c84bf8..2536351 100644
--- a/.github/workflows/doc.yml
+++ b/.github/workflows/doc.yml
@@ -29,11 +29,11 @@ jobs:
- 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 bff1b12..f24e520 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:
@@ -15,26 +16,26 @@ jobs:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
- python-version: '3.10'
+ python-version: "3.10"
- name: Install dependencies
run: |
- # install deps required for building sdist/wheels
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: |
@@ -52,8 +53,7 @@ jobs:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
if: startsWith(github.ref, 'refs/tags/')
- run: |
- twine upload dist/*
+ run: twine upload dist/*
- name: Create GitHub release
uses: softprops/action-gh-release@v1
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0926dc5..0102337 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -13,12 +13,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
- python-version: ['3.8', '3.9', '3.10']
+ python-version: ['3.9', '3.10', '3.11']
experimental: [false]
include:
- - os: ubuntu-latest
- python-version: '3.11.0-beta - 3.11'
- experimental: true
+ # - os: ubuntu-latest
+ # python-version: '3.11.0-beta - 3.11'
+ # experimental: true
- os: macos-latest
python-version: '3.10'
experimental: false
@@ -33,7 +33,7 @@ jobs:
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
@@ -48,11 +48,10 @@ jobs:
# enable gnu-sed usage as "sed"
echo "/usr/local/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
- - name: Install deps
+ - 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:
@@ -80,7 +79,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install -r requirements/dev.txt pylint
+ pip install . pylint
- name: Run linting tools
run: |