Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyproject.toml to ansible sdist #471

Merged
merged 2 commits into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelogs/fragments/471.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
minor_changes:
- Add ``pyproject.toml`` to ansible sdist to use the
``setuptools.build_meta`` `PEP 517 <https://peps.python.org/pep-0517/>`__
backend. Tools that still call ``setup.py`` directly will work the same as
they did before
(https://github.com/ansible-community/antsibull/pull/471).
4 changes: 4 additions & 0 deletions src/antsibull/build_ansible_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ def copy_boilerplate_files(package_dir: str) -> None:
with open(os.path.join(package_dir, 'README.rst'), 'wb') as f:
f.write(readme)

pyproject_toml = get_antsibull_data('pyproject.toml')
with open(os.path.join(package_dir, 'pyproject.toml'), 'wb') as f:
f.write(pyproject_toml)


def write_manifest(package_dir: str,
release_notes: t.Optional[ReleaseNotes] = None,
Expand Down
7 changes: 7 additions & 0 deletions src/antsibull/data/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or
# https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2022 Maxwell G <gotmax@e.email>
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"