From 662fc3e14f9c9b70b43a134658dee0e3fcc86ace Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Sun, 19 Apr 2020 00:42:24 -0700 Subject: [PATCH 1/7] d/control: Move upstream webpage to new one listed on the old page Signed-off-by: Jordan Justen --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 952ea0e..07fbdbd 100644 --- a/debian/control +++ b/debian/control @@ -25,7 +25,7 @@ Build-Depends-Indep: Standards-Version: 4.4.1 Vcs-Browser: https://salsa.debian.org/openstack-team/libs/python-doc8 Vcs-Git: https://salsa.debian.org/openstack-team/libs/python-doc8.git -Homepage: https://git.openstack.org/cgit/openstack/doc8 +Homepage: https://github.com/PyCQA/doc8 Package: python-doc8-doc Section: doc -- GitLab From d6b18e53b84e4b4b21d5585893d98a71153133e2 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Sun, 19 Apr 2020 01:10:19 -0700 Subject: [PATCH 2/7] d/watch: Update watch file url and watch format Signed-off-by: Jordan Justen --- debian/watch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/watch b/debian/watch index 3ad2e41..068acf1 100644 --- a/debian/watch +++ b/debian/watch @@ -1,3 +1,5 @@ -version=3 -https://github.com/stackforge/doc8/tags .*/(\d[\d\.]+)\.tar\.gz - +version=4 +opts=\ +uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/,\ +filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/doc8-$1\.tar\.gz/ \ + https://github.com/PyCQA/doc8/tags .*/v?(\d\S+)\.tar\.gz -- GitLab From af08f1dcc38f6ebabd3d694cdc2b983374f4ffc1 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Tue, 21 Apr 2020 01:52:26 -0700 Subject: [PATCH 3/7] d/patches: cherry-pick 3 upstream patches to remove oslosphinx dep. (Closes: #955070) Signed-off-by: Jordan Justen --- ...ndicate-supported-versions-of-Python.patch | 40 +++++ debian/patches/0002-General-cleanup.patch | 122 ++++++++++++++ .../0003-Modernize-doc-building-process.patch | 150 ++++++++++++++++++ debian/patches/series | 3 + 4 files changed, 315 insertions(+) create mode 100644 debian/patches/0001-setup.cfg-Indicate-supported-versions-of-Python.patch create mode 100644 debian/patches/0002-General-cleanup.patch create mode 100644 debian/patches/0003-Modernize-doc-building-process.patch create mode 100644 debian/patches/series diff --git a/debian/patches/0001-setup.cfg-Indicate-supported-versions-of-Python.patch b/debian/patches/0001-setup.cfg-Indicate-supported-versions-of-Python.patch new file mode 100644 index 0000000..157591a --- /dev/null +++ b/debian/patches/0001-setup.cfg-Indicate-supported-versions-of-Python.patch @@ -0,0 +1,40 @@ +From: Stephen Finucane +Date: Wed, 24 Jul 2019 10:52:56 +0100 +Subject: setup.cfg: Indicate supported versions of Python + +Change-Id: Ibd1c2d0b5c2e3d753bd5c7d5171ed1e3ae734300 +Signed-off-by: Stephen Finucane +(cherry picked from commit 1a3a8deee41b9e05cf900e8b3283d714efbfa0f4) +--- + setup.cfg | 4 +++- + tox.ini | 2 +- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/setup.cfg b/setup.cfg +index 0f9b7a7..1d23ad6 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -18,7 +18,9 @@ classifier = + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 +- Programming Language :: Python :: 3.4 ++ Programming Language :: Python :: 3.5 ++ Programming Language :: Python :: 3.6 ++ Programming Language :: Python :: 3.7 + + [entry_points] + console_scripts = +diff --git a/tox.ini b/tox.ini +index 864ea24..a1b3111 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -1,7 +1,7 @@ + [tox] + minversion = 1.6 + skipsdist = True +-envlist = py35,py27,pep8 ++envlist = py{27,35,36,37},pep8,docs + + [testenv] + setenv = VIRTUAL_ENV={envdir} diff --git a/debian/patches/0002-General-cleanup.patch b/debian/patches/0002-General-cleanup.patch new file mode 100644 index 0000000..af9ab8d --- /dev/null +++ b/debian/patches/0002-General-cleanup.patch @@ -0,0 +1,122 @@ +From: Stephen Finucane +Date: Wed, 24 Jul 2019 10:52:58 +0100 +Subject: General cleanup + +Remove some unused files and tox targets. + +Change-Id: I816765fcab3854eedd6b3d7419962c37760a4fe3 +Signed-off-by: Stephen Finucane +(cherry picked from commit f445c76ca5afa0d1715f8e1c00f3f6e94c4125a0) +--- + HACKING.rst | 4 ---- + MANIFEST.in | 6 ------ + pylintrc | 31 ------------------------------- + setup.py | 1 - + tox.ini | 15 +++------------ + 5 files changed, 3 insertions(+), 54 deletions(-) + delete mode 100644 HACKING.rst + delete mode 100644 MANIFEST.in + delete mode 100644 pylintrc + mode change 100755 => 100644 setup.py + +diff --git a/HACKING.rst b/HACKING.rst +deleted file mode 100644 +index b889622..0000000 +--- a/HACKING.rst ++++ /dev/null +@@ -1,4 +0,0 @@ +-doc8 Style Commandments +-=============================================== +- +-Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/ +diff --git a/MANIFEST.in b/MANIFEST.in +deleted file mode 100644 +index 762d33b..0000000 +--- a/MANIFEST.in ++++ /dev/null +@@ -1,6 +0,0 @@ +-include README.rst +- +-exclude .gitignore +-exclude .gitreview +- +-global-exclude *.pyc +diff --git a/pylintrc b/pylintrc +deleted file mode 100644 +index 4ec63b1..0000000 +--- a/pylintrc ++++ /dev/null +@@ -1,31 +0,0 @@ +-# The format of this file isn't really documented; just use --generate-rcfile +- +-[Messages Control] +-# C0111: Don't require docstrings on every method +-# W0511: TODOs in code comments are fine. +-# W0142: *args and **kwargs are fine. +-# W0622: Redefining id is fine. +-disable=C0111,W0511,W0142,W0622 +- +-[Basic] +-# Variable names can be 1 to 31 characters long, with lowercase and underscores +-variable-rgx=[a-z_][a-z0-9_]{0,30}$ +- +-# Argument names can be 2 to 31 characters long, with lowercase and underscores +-argument-rgx=[a-z_][a-z0-9_]{1,30}$ +- +-# Method names should be at least 3 characters long +-# and be lowercased with underscores +-method-rgx=([a-z_][a-z0-9_]{2,50}|setUp|tearDown)$ +- +-[Design] +-max-public-methods=100 +-min-public-methods=0 +-max-args=6 +- +-[Variables] +- +-# List of additional names supposed to be defined in builtins. Remember that +-# you should avoid to define new builtins when possible. +-# _ is used by our localization +-additional-builtins=_ +diff --git a/setup.py b/setup.py +old mode 100755 +new mode 100644 +index 7363757..056c16c +--- a/setup.py ++++ b/setup.py +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. + # + # Licensed under the Apache License, Version 2.0 (the "License"); +diff --git a/tox.ini b/tox.ini +index a1b3111..1ad178c 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -4,23 +4,14 @@ skipsdist = True + envlist = py{27,35,36,37},pep8,docs + + [testenv] +-setenv = VIRTUAL_ENV={envdir} +-usedevelop = True +-install_command = pip install {opts} {packages} +-deps = -r{toxinidir}/requirements.txt +- -r{toxinidir}/test-requirements.txt ++deps = ++ -r{toxinidir}/requirements.txt ++ -r{toxinidir}/test-requirements.txt + commands = nosetests {posargs} + + [testenv:pep8] + commands = flake8 {posargs} + +-[testenv:pylint] +-requirements = pylint==0.25.2 +-commands = pylint doc8 +- +-[testenv:venv] +-commands = {posargs} +- + [testenv:docs] + commands = + doc8 -e .rst doc CONTRIBUTING.rst HACKING.rst README.rst diff --git a/debian/patches/0003-Modernize-doc-building-process.patch b/debian/patches/0003-Modernize-doc-building-process.patch new file mode 100644 index 0000000..145e5ad --- /dev/null +++ b/debian/patches/0003-Modernize-doc-building-process.patch @@ -0,0 +1,150 @@ +From: Stephen Finucane +Date: Wed, 24 Jul 2019 10:53:02 +0100 +Subject: Modernize doc building process + +Stop relying on pbr's deprecated 'build_sphinx' feature. + +Change-Id: I7f06ebfb86146ee978fe781d540cad62aeb5a8b1 +Signed-off-by: Stephen Finucane +(cherry picked from commit 4692852c49e30b45cc21801e9b26e6249f20b6eb) +--- + doc/requirements.txt | 2 ++ + doc/source/conf.py | 36 +----------------------------------- + setup.cfg | 5 ----- + test-requirements.txt | 3 --- + tox.ini | 6 +++--- + 5 files changed, 6 insertions(+), 46 deletions(-) + create mode 100644 doc/requirements.txt + +diff --git a/doc/requirements.txt b/doc/requirements.txt +new file mode 100644 +index 0000000..ecfdea5 +--- /dev/null ++++ b/doc/requirements.txt +@@ -0,0 +1,2 @@ ++sphinx>=1.8.0 # BSD ++sphinx_rtd_theme>=0.4.0 # MIT +diff --git a/doc/source/conf.py b/doc/source/conf.py +index 57e7215..a90cfb2 100755 +--- a/doc/source/conf.py ++++ b/doc/source/conf.py +@@ -11,26 +11,14 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-import os +-import sys +- +-sys.path.insert(0, os.path.abspath('../..')) + # -- General configuration ---------------------------------------------------- + + # Add any Sphinx extension module names here, as strings. They can be + # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. + extensions = [ + 'sphinx.ext.autodoc', +- 'oslosphinx' + ] + +-# autodoc generation is a bit aggressive and a nuisance when doing heavy +-# text edit cycles. +-# execute "export SPHINX_DEBUG=1" in your terminal to disable +- +-# The suffix of source filenames. +-source_suffix = '.rst' +- + # The master toctree document. + master_doc = 'index' + +@@ -38,13 +26,6 @@ master_doc = 'index' + project = u'doc8' + copyright = u'2013, OpenStack Foundation' + +-# If true, '()' will be appended to :func: etc. cross-reference text. +-add_function_parentheses = True +- +-# If true, the current module name will be prepended to all description +-# unit titles (such as .. function::). +-add_module_names = True +- + # The name of the Pygments (syntax highlighting) style to use. + pygments_style = 'sphinx' + +@@ -52,19 +33,4 @@ pygments_style = 'sphinx' + + # The theme to use for HTML and HTML Help pages. Major themes that come with + # Sphinx are currently 'default' and 'sphinxdoc'. +-# html_theme_path = ["."] +-# html_theme = '_theme' +-# html_static_path = ['static'] +- +-# Output file base name for HTML help builder. +-htmlhelp_basename = '%sdoc' % project +- +-# Grouping the document tree into LaTeX files. List of tuples +-# (source start file, target name, title, author, documentclass +-# [howto/manual]). +-latex_documents = [ +- ('index', +- '%s.tex' % project, +- u'%s Documentation' % project, +- u'OpenStack Foundation', 'manual'), +-] ++html_theme = 'sphinx_rtd_theme' +diff --git a/setup.cfg b/setup.cfg +index 1d23ad6..b25d2cf 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -26,10 +26,5 @@ classifier = + console_scripts = + doc8 = doc8.main:main + +-[build_sphinx] +-all_files = 1 +-build-dir = doc/build +-source-dir = doc/source +- + [wheel] + universal = 1 +diff --git a/test-requirements.txt b/test-requirements.txt +index 0b9685f..0b30974 100644 +--- a/test-requirements.txt ++++ b/test-requirements.txt +@@ -2,9 +2,6 @@ + # of appearance. Changing the order has an impact on the overall integration + # process, which may cause wedges in the gate later. + +-doc8 + hacking>=0.9.2,<0.10 + nose +-oslosphinx +-sphinx>=1.1.2,!=1.2.0,<1.3 + testtools +diff --git a/tox.ini b/tox.ini +index 1ad178c..a0bc338 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -1,11 +1,9 @@ + [tox] + minversion = 1.6 +-skipsdist = True + envlist = py{27,35,36,37},pep8,docs + + [testenv] + deps = +- -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + commands = nosetests {posargs} + +@@ -13,9 +11,11 @@ commands = nosetests {posargs} + commands = flake8 {posargs} + + [testenv:docs] ++deps = ++ -r{toxinidir}/doc/requirements.txt + commands = + doc8 -e .rst doc CONTRIBUTING.rst HACKING.rst README.rst +- python setup.py build_sphinx ++ sphinx-build -W -b html doc/source doc/build/html + + [flake8] + builtins = _ diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..569019b --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +0001-setup.cfg-Indicate-supported-versions-of-Python.patch +0002-General-cleanup.patch +0003-Modernize-doc-building-process.patch -- GitLab From d894fdf7a6a551a047b624e8112c24cad27e1ff6 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Sun, 19 Apr 2020 02:17:21 -0700 Subject: [PATCH 4/7] d/control: Add python3-sphinx-rtd-theme build dep Signed-off-by: Jordan Justen --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 07fbdbd..cf2cc3d 100644 --- a/debian/control +++ b/debian/control @@ -20,6 +20,7 @@ Build-Depends-Indep: python3-oslosphinx, python3-restructuredtext-lint, python3-six, + python3-sphinx-rtd-theme, python3-stevedore, python3-testtools, Standards-Version: 4.4.1 -- GitLab From 8b29c2671b6a8d269428083515ce67dbdb928685 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Sun, 19 Apr 2020 23:17:50 -0700 Subject: [PATCH 5/7] d/control: Remove python3-oslosphinx build dep Signed-off-by: Jordan Justen --- debian/control | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/control b/debian/control index cf2cc3d..57f8da5 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,6 @@ Build-Depends-Indep: python3-docutils, python3-hacking, python3-nose, - python3-oslosphinx, python3-restructuredtext-lint, python3-six, python3-sphinx-rtd-theme, -- GitLab From fc34e3e5d57c5db391c18e44f8856da33590378a Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Sun, 19 Apr 2020 02:22:46 -0700 Subject: [PATCH 6/7] d/control: Update Standards-Version to 4.5.0 Signed-off-by: Jordan Justen --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 57f8da5..2ee4c97 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,7 @@ Build-Depends-Indep: python3-sphinx-rtd-theme, python3-stevedore, python3-testtools, -Standards-Version: 4.4.1 +Standards-Version: 4.5.0 Vcs-Browser: https://salsa.debian.org/openstack-team/libs/python-doc8 Vcs-Git: https://salsa.debian.org/openstack-team/libs/python-doc8.git Homepage: https://github.com/PyCQA/doc8 -- GitLab From b84a7fbd890893f2a175e8253ba311b60ae3a2c5 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Tue, 21 Apr 2020 02:00:35 -0700 Subject: [PATCH 7/7] d/changelog: Update 0.8.0-5 release notes Signed-off-by: Jordan Justen --- debian/changelog | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a9b25ae..fb04adf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,19 @@ python-doc8 (0.8.0-5) UNRELEASED; urgency=medium + [ Ondřej Nový ] * Use debhelper-compat instead of debian/compat. * Bump Standards-Version to 4.4.1. - -- Ondřej Nový Thu, 18 Jul 2019 16:40:19 +0200 + [ Jordan Justen ] + * d/control: Move upstream webpage to new one listed on the old page + * d/watch: Update watch file url and watch format + * d/patches: cherry-pick 3 upstream patches to remove oslosphinx + dep. (Closes: #955070) + * d/control: Add python3-sphinx-rtd-theme build dep + * d/control: Remove python3-oslosphinx build dep + * d/control: Update Standards-Version to 4.5.0 + + -- Jordan Justen Tue, 21 Apr 2020 01:57:19 -0700 python-doc8 (0.8.0-4) unstable; urgency=medium -- GitLab