Commit Graph

14 Commits (master)

Author SHA1 Message Date
Adrien Vergé 15eafeb80a build: Migrate from setup.py to pyproject.toml
Using `setup.py` is deprecated and the new recommanded way is to declare
a `pyproject.toml` file (see PEP 517 [^1]).

This commit proposes to use setuptools to achieve that, because
setuptools is already used by yamllint, is standard and referenced by
the official Python packaging documentation [^2], and seems to be the
most lightweight solution. An alternative could have been to use Poetry,
see the dedicated pull request and discussion [^3].

For some period, the `setup.py` file will be kept (although almost
empty), to allow old tools versions to keep working.

Closes https://github.com/adrienverge/yamllint/issues/509.

[^1]: https://peps.python.org/pep-0517/
[^2]: https://packaging.python.org/en/latest/tutorials/installing-packages/
[^3]: https://github.com/adrienverge/yamllint/pull/557
2 years ago
Adrien Vergé 16eae28a50 build: Stop using setup.py to generate documentation
Because `setup.py` is deprecated, let's switch from:

    python setup.py build_sphinx

to:

    make -C docs html

to build Sphinx documentation.

The generated HTML files in `docs/_build/html` are exactly the same (I
compared with `diff -qr`).

Also add `-W` (turn warnings into errors) to the `sphinx-build` options
to keep the previous behavior.
2 years ago
Andrew Imeson 6b45be1afc CI: Check for broken links in docs 2 years ago
Michael Käufl c9c5e0b1c7 CI: Add support for Python 3.11 2 years ago
Adrien Vergé a6e0e1213a CI: Fix pip install problem with Pygments version
Recently `python setup.py build_sphinx` started failing with:

    pkg_resources.VersionConflict: (Pygments 2.3.1
    (/usr/lib/python3/dist-packages), Requirement.parse('Pygments>=2.12'))

The reason is that `doc8` 1.0.0 installs `Pygments` 2.3.1, then `Sphinx`
5.3.0 needs `Pygments` ≥ 2.12.

The easiest fix is to change the install order.
2 years ago
Dimitri Papadopoulos 4d271f3daf ci: Security hardening for GitHub Actions
https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

The idea is that the software supply chain relies on 3rd party actions
that could be compromised. Mitigate this risk by giving these actions
minimal rights to the repository. Here read-only access is good enough.
2 years ago
Dimitri Papadopoulos Orfanos e8391de711
Drop support for Python 3.6
Python 3.6 reached end-of-life on 2021-12-23.
https://peps.python.org/pep-0494/
2 years ago
Dimitri Papadopoulos a5adec1570 ci: Update GitHub Actions
https://github.com/actions/checkout
https://github.com/actions/setup-python
2 years ago
Andrew Imeson e49a101160 Add rstcheck to CI to lint docs 3 years ago
Dmytro Bondar 9e6dfacceb Fix github actions workflow
- install correct python version
- set `fail-fast: false` to run all jobs
- remove hard-coded value for HOME directory
3 years ago
Dmytro Bondar 11e8d8ff37 Add support for Python 3.10, drop Python 3.5
- Add support for Python 3.10 released on 2021-10-04
- Drop support for Python 3.5 since it has reached end-of-life
3 years ago
Adrien Vergé 5d8ef2ea23 CI: Simplify 'pip' commands 4 years ago
Adrien Vergé 4515269233 CI: Fix failing 'coverage' command because of $PATH
Very probably due to:
https://github.com/actions/virtual-environments/issues/2455#issuecomment-787511010
4 years ago
Adrien Vergé 66bf76a362 CI: Switch to GitHub Actions
Because Travis CI is dead.
4 years ago