-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build_meta: remove ansible-core Github repo links
This removes the Bug Tracker and Source Code links from the ansible package's Python metadata that point to ansible-core repository. These links are confusing. ansible-core's issue tracker is only for issues that apply to core, not all of the ansible package. None of the source code from ansible/ansible is included directly in this package, either. The ansible-core links are replaced with a link to the forum and a link to the ansible-build-data repository. This only applies to ansible >= 9.0.0rc1.
- Loading branch information
Showing
5 changed files
with
50 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
minor_changes: | ||
- "``ansible`` python metadata - remove links specific to ``ansible-core`` | ||
and add links to the Ansible forum and the ``ansible-build-data`` repository | ||
(https://github.com/ansible-community/antsibull/pull/558)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,8 @@ | |
from packaging.version import Version as PypiVer | ||
|
||
from .constants import ( | ||
ANSIBLE_FORUM_URL, | ||
BUILD_DATA_URL, | ||
COLLECTION_EXCLUDE_DIRS, | ||
DOCSITE_BASE_URL, | ||
DOCSITE_COMMUNITY_URL, | ||
|
@@ -65,6 +67,28 @@ def _i_iter_lines(self) -> Iterator[str]: | |
|
||
INI_TYPES = Union[IniType, str, bool] | ||
|
||
OLD_URLS = IniDict( | ||
{ | ||
"Bug Tracker": "https://github.com/ansible/ansible/issues", | ||
"Code of Conduct": DOCSITE_COMMUNITY_URL + "/code_of_conduct.html", | ||
"Documentation": DOCSITE_BASE_URL, | ||
"Mailing lists": DOCSITE_COMMUNITY_URL | ||
+ "/communication.html#mailing-list-information", | ||
"Source Code": "https://github.com/ansible/ansible", | ||
} | ||
) | ||
|
||
NEW_URLS = IniDict( | ||
{ | ||
"Build Data": BUILD_DATA_URL, | ||
"Code of Conduct": DOCSITE_COMMUNITY_URL + "/code_of_conduct.html", | ||
"Documentation": DOCSITE_BASE_URL, | ||
"Forum": ANSIBLE_FORUM_URL, | ||
"Mailing lists": DOCSITE_COMMUNITY_URL | ||
+ "/communication.html#mailing-list-information", | ||
} | ||
) | ||
|
||
DEFAULT_METADATA: dict[str, INI_TYPES] = { | ||
"name": "ansible", | ||
"description": "Radically simple IT automation", | ||
|
@@ -73,19 +97,6 @@ def _i_iter_lines(self) -> Iterator[str]: | |
"author": "Ansible, Inc.", | ||
"author_email": "[email protected]", | ||
"url": "https://ansible.com/", | ||
"project_urls": IniDict( | ||
{ | ||
# XXX: Should we replace Bug Tracker and Source Code with something | ||
# else that's not copied from ansible-core? | ||
# Should we use ansible_core_repo_url from LibContext instead? | ||
"Bug Tracker": "https://github.com/ansible/ansible/issues", | ||
"Code of Conduct": DOCSITE_COMMUNITY_URL + "/code_of_conduct.html", | ||
"Documentation": DOCSITE_BASE_URL, | ||
"Mailing lists": DOCSITE_COMMUNITY_URL | ||
+ "/communication.html#mailing-list-information", | ||
"Source Code": "https://github.com/ansible/ansible", | ||
} | ||
), | ||
"license": "GPL-3.0-or-later", | ||
"classifiers": IniList( | ||
[ | ||
|
@@ -272,6 +283,12 @@ def generate(self) -> None: | |
self["metadata"].setdefault("classifiers", IniList()).extend( | ||
self.core_python_classifiers | ||
) | ||
self["metadata"].setdefault( | ||
"project_urls", | ||
NEW_URLS | ||
if self.ansible_version >= MINIMUM_ANSIBLE_VERSIONS["BUILD_META_NEW_URLS"] | ||
else OLD_URLS, | ||
) | ||
self["options"].setdefault("install_requires", IniList()).append( | ||
f"ansible-core ~= {self.ansible_core_version}" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,6 @@ long_description_content_type = text/x-rst | |
author = Ansible, Inc. | ||
author_email = [email protected] | ||
url = https://ansible.com/ | ||
project_urls = | ||
Bug Tracker = https://github.com/ansible/ansible/issues | ||
Code of Conduct = https://docs.ansible.com/ansible/latest/community/code_of_conduct.html | ||
Documentation = https://docs.ansible.com/ansible | ||
Mailing lists = https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information | ||
Source Code = https://github.com/ansible/ansible | ||
license = GPL-3.0-or-later | ||
classifiers = | ||
Development Status :: 5 - Production/Stable | ||
|
@@ -29,6 +23,12 @@ classifiers = | |
Programming Language :: Python :: 3.11 | ||
Programming Language :: Python :: 3 :: Only | ||
version = 8.1.0 | ||
project_urls = | ||
Build Data = https://github.com/ansible-community/ansible-build-data | ||
Code of Conduct = https://docs.ansible.com/ansible/latest/community/code_of_conduct.html | ||
Documentation = https://docs.ansible.com/ansible | ||
Forum = https://forum.ansible.com | ||
Mailing lists = https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information | ||
|
||
[options] | ||
zip_safe = False | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters