From 52dc3365ebb74e3002faf6ca4cc41037cad4a0f4 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 19 Nov 2021 20:24:09 +0000 Subject: Add documentation about build_meta wrappers --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 3cc8e35b..38be1de5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -95,6 +95,7 @@ github_url = 'https://github.com' github_sponsors_url = f'{github_url}/sponsors' extlinks = { 'user': (f'{github_sponsors_url}/%s', '@'), # noqa: WPS323 + 'pypi': ('https://pypi.org/project/%s', '%s'), } extensions += ['sphinx.ext.extlinks'] -- cgit v1.2.1 From 2f520ab58a202228a35f532e18ccae0f935260da Mon Sep 17 00:00:00 2001 From: Alex Hedges Date: Sun, 19 Dec 2021 16:45:26 -0500 Subject: Render distutils commit links properly in docs --- docs/conf.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 3cc8e35b..f6ccff0f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -68,6 +68,10 @@ link_files = { pattern=r'pypa/distutils#(?P\d+)', url='{GH}/pypa/distutils/issues/{distutils}', ), + dict( + pattern=r'pypa/distutils@(?P[\da-f]+)', + url='{GH}/pypa/distutils/commit/{distutils_commit}', + ), dict( pattern=r'^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n', with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n', -- cgit v1.2.1 From 6cff3789dd3cfb06b504cf42714c6ed6936cb23f Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 6 Jan 2022 16:17:31 +0000 Subject: Replace in-tree sphinx extension with sphinx-favicon This change has been previously proposed and agreed upon in #2869. The idea here is to avoid the burden of maintaining an in-tree sphinx extension, now that `sphinx-favicon` is available and covers setuptools use-case. --- docs/conf.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index f6ccff0f..4a14214f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -179,23 +179,22 @@ towncrier_draft_include_empty = False extensions += ['jaraco.tidelift'] # Add icons (aka "favicons") to documentation -sys.path.append(os.path.join(os.path.dirname(__file__), '_ext')) -extensions += ['_custom_icons'] +extensions += ['sphinx-favicon'] +html_static_path = ['images'] # should contain the folder with icons # List of dicts with HTML attributes -# as defined in https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link -# except that ``file`` gets replaced with the correct ``href`` -icons = [ +# static-file points to files in the html_static_path (href is computed) +favicons = [ { # "Catch-all" goes first, otherwise some browsers will overwrite "rel": "icon", "type": "image/svg+xml", - "file": "images/logo-symbol-only.svg", + "static-file": "logo-symbol-only.svg", "sizes": "any" }, { # Version with thicker strokes for better visibility at smaller sizes "rel": "icon", "type": "image/svg+xml", - "file": "images/favicon.svg", + "static-file": "favicon.svg", "sizes": "16x16 24x24 32x32 48x48" }, # rel="apple-touch-icon" does not support SVG yet -- cgit v1.2.1 From 0b3dad255564810bcd0f88f25544eb06c3b0acd0 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 6 Jan 2022 17:03:04 +0000 Subject: Remove unused imports from docs/conf.py --- docs/conf.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 4a14214f..1fb27716 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,3 @@ -import os -import sys - extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker'] master_doc = "index" -- cgit v1.2.1 From 07a657b1b3d0cf87560f0bd2c644fd0495ad0758 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sat, 19 Feb 2022 12:15:25 +0000 Subject: Avoid accidental URL replacement in CHANGELOG Use negative look-behind regex on docs/conf.py to improve `issues` URL matching. --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index bfd45a69..ae9397f7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,7 +10,7 @@ link_files = { ), replace=[ dict( - pattern=r'(Issue )?#(?P\d+)', + pattern=r'(?\d+)', url='{package_url}/issues/{issue}', ), dict( -- cgit v1.2.1 From 351942ce8731784469b861ae4304e34be3f6f740 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sat, 19 Feb 2022 12:27:28 +0000 Subject: Extend matching of issue/commit links to all PyPA repositories Currently the link for the pypa/get-pip issue was rendering wrongly. This change extends the matching for issues and commits (currently only handling `distutils`) to any PyPA repository. --- docs/conf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index ae9397f7..97586ede 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -62,12 +62,12 @@ link_files = { url='{GH}/jaraco/setuptools_svn/issues/{setuptools_svn}', ), dict( - pattern=r'pypa/distutils#(?P\d+)', - url='{GH}/pypa/distutils/issues/{distutils}', + pattern=r'pypa/(?P[\-\.\w]+)#(?P\d+)', + url='{GH}/pypa/{issue_repo}/issues/{issue_number}', ), dict( - pattern=r'pypa/distutils@(?P[\da-f]+)', - url='{GH}/pypa/distutils/commit/{distutils_commit}', + pattern=r'pypa/(?P[\-\.\w]+)@(?P[\da-f]+)', + url='{GH}/pypa/{commit_repo}/commit/{commit_number}', ), dict( pattern=r'^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n', -- cgit v1.2.1 From e0007989edd2b8ed15a5f8da21b9c13434588d34 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sat, 19 Feb 2022 13:20:52 +0000 Subject: Improve regex for autolinking PEPs on changelog --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 97586ede..e57131b1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,7 +54,7 @@ link_files = { url='{GH}/pypa/packaging/blob/{packaging_ver}/CHANGELOG.rst', ), dict( - pattern=r'PEP[- ](?P\d+)', + pattern=r'(?\d+)', url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', ), dict( -- cgit v1.2.1 From 523e7c7d008bd043ae6ad707a21e004f53aa9531 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 3 Mar 2022 17:02:26 +0000 Subject: Modify datafiles docs to emphasize importlib.resources over pkg_resorueces --- docs/conf.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index e57131b1..0443799d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -199,3 +199,6 @@ favicons = [ ] intersphinx_mapping['pip'] = 'https://pip.pypa.io/en/latest', None +intersphinx_mapping['importlib-resources'] = ( + 'https://importlib-resources.readthedocs.io/en/latest', None +) -- cgit v1.2.1 From 82529755d433de93fcce1c48385dce3cf4003253 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 4 Mar 2022 15:21:14 +0000 Subject: Clarify the relationship between wheel <> sdist --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 0443799d..da4d9f33 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -199,6 +199,7 @@ favicons = [ ] intersphinx_mapping['pip'] = 'https://pip.pypa.io/en/latest', None +intersphinx_mapping['PyPUG'] = ('https://packaging.python.org/en/latest/', None) intersphinx_mapping['importlib-resources'] = ( 'https://importlib-resources.readthedocs.io/en/latest', None ) -- cgit v1.2.1 From aab5899b4cd7e262a71635cf669ebf63f9b1e7ff Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 1 Feb 2022 12:44:26 +0000 Subject: Add news fragment --- docs/conf.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index da4d9f33..7f66483a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -93,10 +93,16 @@ intersphinx_mapping.update({ # Add support for linking usernames github_url = 'https://github.com' +github_repo_org = 'pypa' +github_repo_name = 'setuptools' +github_repo_slug = f'{github_repo_org}/{github_repo_name}' +github_repo_url = f'{github_url}/{github_repo_slug}' github_sponsors_url = f'{github_url}/sponsors' extlinks = { + 'issue': (f'{github_repo_url}/issues/%s', 'issue #%s'), # noqa: WPS323 + 'pr': (f'{github_repo_url}/pull/%s', 'PR #%s'), # noqa: WPS323 'user': (f'{github_sponsors_url}/%s', '@'), # noqa: WPS323 - 'pypi': ('https://pypi.org/project/%s', '%s'), + 'pypi': ('https://pypi.org/project/%s', '%s'), # noqa: WPS323 } extensions += ['sphinx.ext.extlinks'] -- cgit v1.2.1 From 19609c020dc01146658d80a9ba13ce4369f6c483 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sun, 13 Mar 2022 21:15:00 +0000 Subject: Link packaging --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index da4d9f33..4c00d46f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -200,6 +200,7 @@ favicons = [ intersphinx_mapping['pip'] = 'https://pip.pypa.io/en/latest', None intersphinx_mapping['PyPUG'] = ('https://packaging.python.org/en/latest/', None) +intersphinx_mapping['packaging'] = ('https://packaging.pypa.io/en/latest/', None) intersphinx_mapping['importlib-resources'] = ( 'https://importlib-resources.readthedocs.io/en/latest', None ) -- cgit v1.2.1 From dcb136115373df161af02ec3d32aa97e38523742 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 14 Mar 2022 00:48:38 +0000 Subject: Add initial docs about pyproject.toml metadata --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 9b4841d1..ee833135 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -103,6 +103,7 @@ extlinks = { 'pr': (f'{github_repo_url}/pull/%s', 'PR #%s'), # noqa: WPS323 'user': (f'{github_sponsors_url}/%s', '@'), # noqa: WPS323 'pypi': ('https://pypi.org/project/%s', '%s'), # noqa: WPS323 + 'wiki': ('https://wikipedia.org/wiki/%s', '%s'), # noqa: WPS323 } extensions += ['sphinx.ext.extlinks'] -- cgit v1.2.1 From 2ec868c8a8ce69dd43a9a00eea5426159f625c44 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 24 Mar 2022 12:13:09 +0000 Subject: Specify Python 3 after Python 2 in intersphinx mapping Hopefully it will make links to Python 3 the default. --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index ee833135..21451447 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -170,8 +170,8 @@ nitpick_ignore = [ # Allow linking objects on other Sphinx sites seamlessly: intersphinx_mapping.update( - python=('https://docs.python.org/3', None), python2=('https://docs.python.org/2', None), + python=('https://docs.python.org/3', None), ) # Add support for the unreleased "next-version" change notes -- cgit v1.2.1 From 7f7ac349329d748bfa784540fe861a682bf3df50 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 24 Mar 2022 12:19:54 +0000 Subject: Avoid extlink for issue to prevent verbose warnings --- docs/conf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 21451447..4ebb521c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -9,6 +9,10 @@ link_files = { GH='https://github.com', ), replace=[ + dict( + pattern=r'(?\d+)', + url='{package_url}/pull/{pull}', + ), dict( pattern=r'(?\d+)', url='{package_url}/issues/{issue}', @@ -99,8 +103,6 @@ github_repo_slug = f'{github_repo_org}/{github_repo_name}' github_repo_url = f'{github_url}/{github_repo_slug}' github_sponsors_url = f'{github_url}/sponsors' extlinks = { - 'issue': (f'{github_repo_url}/issues/%s', 'issue #%s'), # noqa: WPS323 - 'pr': (f'{github_repo_url}/pull/%s', 'PR #%s'), # noqa: WPS323 'user': (f'{github_sponsors_url}/%s', '@'), # noqa: WPS323 'pypi': ('https://pypi.org/project/%s', '%s'), # noqa: WPS323 'wiki': ('https://wikipedia.org/wiki/%s', '%s'), # noqa: WPS323 -- cgit v1.2.1