aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2022-09-22 21:29:50 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2022-11-07 19:39:26 +0200
commit24369e749e874cb871727dbdd02ca95b3eb65a04 (patch)
tree9f96ce672e84dd75d26c89d44d16f332baa3ef4a /.github
parentdrop py3.8 and make py3.11 official (diff)
downloadpkgcore-24369e749e874cb871727dbdd02ca95b3eb65a04.tar.gz
pkgcore-24369e749e874cb871727dbdd02ca95b3eb65a04.tar.bz2
pkgcore-24369e749e874cb871727dbdd02ca95b3eb65a04.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. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/doc.yml6
-rw-r--r--.github/workflows/release.yml16
-rw-r--r--.github/workflows/test.yml9
3 files changed, 13 insertions, 18 deletions
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index 7a290586e..776871b9c 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 6935f4520..af0b9d085 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 c928b30f2..ee1e52eed 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: