From 57affc06f05b9e14a2da3f11fef2edd69faac200 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 11 Nov 2022 14:48:09 +0000 Subject: [PATCH 1/3] Update test workflow --- .github/workflows/tests.yml | 38 ++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 824bb0c6..6d985ba7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,35 +1,39 @@ ---- - name: Tests on: push: - branches: - - master pull_request: - branches: - - master + workflow_dispatch: jobs: build_doc: - name: 'Build cpython doc' + name: Build CPython documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: - python-version: 3.8 - - name: clone docsbuild scripts + python-version: 3 + - name: Clone docsbuild scripts run: | git clone https://github.com/python/docsbuild-scripts/ - - name: setup requirements + - name: Setup requirements run: | python -m pip install --upgrade pip - python -m pip install jinja2 markupsafe zc.lockfile - - name: build docs - run: | - python3 ./docsbuild-scripts/build_docs.py --quick --build-root ./build_root --www-root ./www --log-directory ./logs --group $(id -g) --skip-cache-invalidation --theme $(pwd) --language en --branch 3.9 - - name: 'Upload' + python -m pip install -r docsbuild-scripts/requirements.txt + - name: Build documentation + run: > + python ./docsbuild-scripts/build_docs.py + --quick + --build-root ./build_root + --www-root ./www + --log-directory ./logs + --group $(id -g) + --skip-cache-invalidation + --theme $(pwd) + --language en + --branch 3.11 + - name: Upload uses: actions/upload-artifact@v2.2.2 with: name: doc-html From 0f704cf475f652b2dd879e4d867050ee82661790 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Sun, 16 Oct 2022 17:20:20 +0100 Subject: [PATCH 2/3] Use pyproject --- MANIFEST.in | 2 -- pyproject.toml | 48 ++++++++++++++++++++++++++++++++++++++++++++---- setup.cfg | 2 -- setup.py | 38 -------------------------------------- 4 files changed, 44 insertions(+), 46 deletions(-) delete mode 100644 MANIFEST.in delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 3ae74ecc..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include LICENSE README.rst -recursive-include python_docs_theme *.* diff --git a/pyproject.toml b/pyproject.toml index de11f324..f215cae8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,47 @@ [build-system] -requires = [ - "setuptools>=42", - "wheel" +requires = ["flit_core>=3.7"] +build-backend = "flit_core.buildapi" + +# project metadata +[project] +name = "python-docs-theme" +version = "2022.1" +description = "The Sphinx theme for the CPython docs and related projects" +readme = "README.rst" +urls.Code = "https://github.com/python/python-docs-theme" +urls.Download = "https://pypi.org/project/python-docs-theme/" +urls.Homepage = "https://github.com/python/python-docs-theme/" +urls."Issue tracker" = "https://github.com/python/python-docs-theme/issues" +license.text = "PSF-2.0" +requires-python = ">=3.8" + +# Classifiers list: https://pypi.org/classifiers/ +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Python Software Foundation License", + "Operating System :: OS Independent", + "Topic :: Documentation", + "Topic :: Software Development :: Documentation", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] -build-backend = "setuptools.build_meta" +[[project.authors]] +name = "PyPA" +email = "distutils-sig@python.org" + +[project.entry-points."sphinx.html_themes"] +python_docs_theme = 'python_docs_theme' + +[tool.flit.module] +name = "python_docs_theme" + +[tool.flit.sdist] +include = [ + "python_docs_theme/", +] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 2a9acf13..00000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal = 1 diff --git a/setup.py b/setup.py deleted file mode 100644 index 578cf1c8..00000000 --- a/setup.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python - -import io - -from setuptools import setup - -# README into long description -with io.open("README.rst", encoding="utf-8") as readme_file: - long_description = readme_file.read() - - -setup( - name="python-docs-theme", - # Version is date based as year.month[.serial], where serial is used - # if multiple releases are needed to address build failures. - version="2022.1", - description="The Sphinx theme for the CPython docs and related projects", - long_description=long_description, - author="PyPA", - author_email="distutils-sig@python.org", - url="https://github.com/python/python-docs-theme/", - packages=["python_docs_theme"], - include_package_data=True, - entry_points={ - "sphinx.html_themes": [ - "python_docs_theme = python_docs_theme", - ] - }, - classifiers=[ - "Intended Audience :: Developers", - "License :: OSI Approved :: Python Software Foundation License", - "Operating System :: OS Independent", - "Topic :: Documentation", - "Topic :: Software Development :: Documentation", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - ], -) From eb7834828e877df791f94cddab7700727107b582 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 11 Nov 2022 15:20:27 +0000 Subject: [PATCH 3/3] Add Framework :: Sphinx :: Theme --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index f215cae8..3d4c8b2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ requires-python = ">=3.8" # Classifiers list: https://pypi.org/classifiers/ classifiers = [ "Development Status :: 5 - Production/Stable", + "Framework :: Sphinx :: Theme", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "Operating System :: OS Independent",