ansible / ansible

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.
https://www.ansible.com/
GNU General Public License v3.0
62.49k stars 23.83k forks source link

local documentation builds stopped working with F40 and antsibull-core #83937

Closed samccann closed 2 weeks ago

samccann commented 2 weeks ago

Summary

Local docs builds in the ansible/ansible-documentation repository started failing recently. I'll add the warnings in a separate comment, but @oraNod helped me hack my local pyproject.toml and it fixed the problem by adding "license" to the dynamic setting - https://github.com/ansible/ansible/blob/devel/pyproject.toml#L31. I'm not sure if this change should happen here in ansible/ansible, or if it's really a problem somewhere else.

Issue Type

Documentation Report

Component Name

pyproject.toml

Ansible Version

$ ansible --version

Configuration

# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all

OS / Environment

Fedora 40, recently updated

Additional Information

none

Code of Conduct

samccann commented 2 weeks ago

And here are the warnings: ../../hacking/build-ansible.py docs-build core -o rst WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: /tmp/build-env-i0v7gghq/lib64/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:72: _MissingDynamic: license defined outside of pyproject.toml is ignored. WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: !! WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: **** WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: The following seems to be defined outside of pyproject.toml: WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: license = 'GPLv3+' WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: According to the spec (see the link below), however, setuptools CANNOT WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: consider this value unless license is listed as dynamic. WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: To prevent this problem, you can list license under dynamic or alternatively WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: remove the [project] table from your file and rely entirely on other means of WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: configuration. WARNING:antsibull:mod=antsibull_core.subprocess_util|stderr: ****

samccann commented 2 weeks ago

@oraNod @gotmax23 @felixfontein ^^ (in case I just opened this problem in the wrong repo).

ansibot commented 2 weeks ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the component bot command.

sivel commented 2 weeks ago

I'm looking a little at this now. I'm confused by where license = GPLv3+ is being picked up from, as that is not in our pyproject.toml as we've explicitly dropped that.

flowerysong commented 2 weeks ago

https://github.com/ansible/ansible/blob/33d4ba8fa2c09139b31b072fcc8f64afec7ae7fe/pyproject.toml#L19, maybe?

sivel commented 2 weeks ago

I'm not seeing those warnings when building docs against devel. Can you confirm how you are building the docs, against what branches, and maybe any local modifications you have?

git status --ignored=traditional -u

I'm assumig there must be a file laying around with licence = GPLv3+ like what used to be in setup.cfg:

https://github.com/ansible/ansible/blob/3326397717a08201469d106a576bdf8e66e9e099/setup.cfg#L19

samccann commented 2 weeks ago

doh! So yeah must have been some lingering cruft. I need to learn how to clear out old clones of this repo I guess. Anyway I noticed a setup.py and setup.cfg and deleted them, then redid the clone and the docs and everything works now. sorry for the extra noise.