Commit Graph

4 Commits (bdd9e8f1aa6d6c062a26842d00c1420a9656a312)

Author SHA1 Message Date
Matt Clay bdd9e8f1aa
[stable-2.15] Clean up release script (#81488) (#81489)
* Enable mypy for the entire packaging directory

* Return CompletedProcess only when capturing output

This allows stdout/stderr on CompletedProcess to be `str` instead of `str | None`.
The unused args on CompletedProcess have been removed.
Overload type hints have been added to reflect these changes.

* Relax return type on ensure_venv

This improves consistency with its usage, since `run` accepts `env` of `dict[str, t.Any]`.
Also removed unnecssary `str()` usage when updating `env`.

* Fix type hint on suppress_when

* Fix callable annotation

* Add type hint for command_parser

PyCharm complains about using a protected member, and also that it can't find the type in the type stubs.
However, mypy properly recognizes the type.

* Avoid unnecessary TypeVar usage
(cherry picked from commit 47ab59753c)
1 year ago
Matt Clay 5d57a8e363
[stable-2.15] Omit pre-built man pages from sdist (#81395) (#81397)
Since man pages aren't accessible to users after a `pip install`, there's no need to include them in the sdist.
This change makes it trivial to build man pages from source, which makes them much easier to iterate on.
It also simplifies creation and testing of the sdist, since it no longer requires building man pages.

The new `packaging/cli-doc/build.py` script can generate both man pages and RST documentation.
This supports inclusion on the docs site without a dependency on `ansible-core` internals.
Having a single implementation for both simplifies keeping the two formats in sync..
(cherry picked from commit 691c8e8603)
1 year ago
Matt Clay c1e8177808
[stable-2.15] Release tool improvements (#80641) (#80679)
* Provide reproducible sdist builds.
* Use reproducible wheel builds.
* Add PyPI artifact checks.

(cherry picked from commit d37678c5ff)
2 years ago
Matt Clay a6bfa82bd0
New upstream release tool (#80179) 2 years ago