Hello community, here is the log from the commit of package python-rst.linker for openSUSE:Leap:15.2 checked in at 2020-03-27 16:43:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/python-rst.linker (Old) and /work/SRC/openSUSE:Leap:15.2/.python-rst.linker.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rst.linker" Fri Mar 27 16:43:40 2020 rev:11 rq:785898 version:1.11 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/python-rst.linker/python-rst.linker.changes 2020-01-15 15:52:44.127573558 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.python-rst.linker.new.3160/python-rst.linker.changes 2020-03-27 16:43:54.259784574 +0100 @@ -1,0 +2,29 @@ +Tue Mar 17 11:08:33 UTC 2020 - Tomáš Chvátal <[email protected]> + +- Fix building on Leap + +------------------------------------------------------------------- +Tue Sep 10 10:34:26 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Update to 1.11: + * Now supply the version of the package during Sphinx setup. + * Also supply "parallel_read_safe=True" + +------------------------------------------------------------------- +Fri Jun 7 11:56:25 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Fix fdupes call +- Run py3 only sphinx build as new sphinx does not provide py2 + variant anymore + +------------------------------------------------------------------- +Wed Feb 27 05:54:37 UTC 2019 - John Vandenberg <[email protected]> + +- Add LICENSE +- Run Sphinx on Python 2 also +- Update to v1.10 + * Refreshed package metadata. + * Package now presents the ``rst`` package a pkg-util + namespace package (instead of pkg_resources). + +------------------------------------------------------------------- Old: ---- rst.linker-1.9.tar.gz New: ---- rst.linker-1.11.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-rst.linker.spec ++++++ --- /var/tmp/diff_new_pack.PWWewB/_old 2020-03-27 16:43:54.587784766 +0100 +++ /var/tmp/diff_new_pack.PWWewB/_new 2020-03-27 16:43:54.591784769 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-rst.linker # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,31 +12,31 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define _name rst.linker %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-rst.linker -Version: 1.9 +Version: 1.11 Release: 0 Summary: Changelog link and timestamp adding Sphinx plugin License: MIT -Group: Development/Languages/Python -Url: https://github.com/jaraco/rst.linker +URL: https://github.com/jaraco/rst.linker Source: https://files.pythonhosted.org/packages/source/r/%{_name}/%{_name}-%{version}.tar.gz -BuildRequires: %{python_module Sphinx} -BuildRequires: %{python_module base} +BuildRequires: %{python_module importlib-metadata} +BuildRequires: %{python_module jaraco.packaging >= 3.2} BuildRequires: %{python_module path.py} -BuildRequires: %{python_module pytest-runner} -BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pytest >= 3.5} BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: python3-Sphinx +Requires: python-importlib-metadata Requires: python-python-dateutil Requires: python-six BuildArch: noarch @@ -48,21 +48,21 @@ %prep %setup -q -n %{_name}-%{version} -rm -rf rst.linker.egg-info +sed -i 's/--flake8 --black//' pytest.ini %build %python_build -%__python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo +python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo %install %python_install -%python_expand %fdupes -s %{buildroot}%{$python_sitelib} +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_exec %{_bindir}/py.test -v test_all.py +%pytest test_all.py %files %{python_files} -%defattr(-,root,root) +%license LICENSE %doc CHANGES.rst README.rst %doc build/sphinx/html %{python_sitelib}/* ++++++ rst.linker-1.9.tar.gz -> rst.linker-1.11.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/.flake8 new/rst.linker-1.11/.flake8 --- old/rst.linker-1.9/.flake8 1970-01-01 01:00:00.000000000 +0100 +++ new/rst.linker-1.11/.flake8 2019-07-28 02:30:15.000000000 +0200 @@ -0,0 +1,9 @@ +[flake8] +max-line-length = 88 +ignore = + # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513 + W503 + # W504 has issues https://github.com/OCA/maintainer-quality-tools/issues/545 + W504 + # Black creates whitespace before colon + E203 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/.pre-commit-config.yaml new/rst.linker-1.11/.pre-commit-config.yaml --- old/rst.linker-1.9/.pre-commit-config.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/rst.linker-1.11/.pre-commit-config.yaml 2019-07-28 02:30:15.000000000 +0200 @@ -0,0 +1,5 @@ +repos: +- repo: https://github.com/ambv/black + rev: 18.9b0 + hooks: + - id: black diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/.readthedocs.yml new/rst.linker-1.11/.readthedocs.yml --- old/rst.linker-1.9/.readthedocs.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/rst.linker-1.11/.readthedocs.yml 2019-07-28 02:30:15.000000000 +0200 @@ -0,0 +1,5 @@ +python: + version: 3 + extra_requirements: + - docs + pip_install: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/.travis.yml new/rst.linker-1.11/.travis.yml --- old/rst.linker-1.9/.travis.yml 2017-03-30 10:30:44.000000000 +0200 +++ new/rst.linker-1.11/.travis.yml 2019-07-28 02:30:15.000000000 +0200 @@ -1,26 +1,36 @@ -sudo: false +dist: xenial language: python + python: - 2.7 - 3.6 +- &latest_py3 3.7 + git: depth: 99999 + +jobs: + fast_finish: true + include: + - stage: deploy + if: tag IS present + python: *latest_py3 + before_script: skip + env: + - TWINE_USERNAME=jaraco + # TWINE_PASSWORD + - secure: hXvC5+Nh3IZ+P9a4/duh6tVXF0YVm/QfpgfWrtEu3Me1fRpnBOn6akx+IbjgSnSGQti2v8SNG2EyBx9W756TSfXdBQIP51cassFXR+5B5ZS4pQJM57NJd3L9/cP8YNyU75NcFVSz5jlQw9au40NtjIouxvsAaU2ptuBryJSYsp+E7wEpBU3cGrpeDgMDjqW836lUb3UU/N9npZ03jD+qEjrNdDeegrYe87MDJcOGGy2XRpOcsQjQ9UDDfo8AB+7zWFBmqB6mXnpm2Gvg6SKBajT+VrHp8ncWKd2gIm59m10WKjORUhTs60OZuHz0JfraRzDcTbKjkk4ddiUQxMM7vXkMMiN2UW7LDP+5oatfo+KFc3hZ4e3a+B8sKPNSd1xGica2ha6ac7DViq20I3CHpq+nGtPF1izEjtaENon8Qn3w0srYa5hmf2UwwFR9du2HrThHyXXXZO2/s9/hRJVj4ELbgP/3H701P+wCmKuBnT7skGX0boxnWF/9/S3+xL2vHRFu1jNLMTMl0uT2DNFM/D1grVzswSr437iRSyoNeIZyqMQFXxMUTsnYIZSv+EvKoLLD1czQ74UUDoQBIJk2yEFZyMNdB7jTSfVaTJGNYf45Qkw/lcrFoTbrFwm636ev/6y+/8qEppsp9KSI61qkLyt3aA+7Dg9GTbHoBcu5cd4= + - TOX_TESTENV_PASSENV="TWINE_USERNAME TWINE_PASSWORD" + script: tox -e release + +cache: pip + install: -- pip install tox "setuptools>=28.2" -script: -- tox -branches: - except: - - skeleton -deploy: - provider: pypi - server: https://upload.pypi.org/legacy/ - on: - tags: true - all_branches: true - python: 3.6 - user: jaraco - distributions: dists - skip_upload_docs: true - password: - secure: ieliSqIQhbLtQFH9MQhh/kYY/Xjv2Bf3nyNjtjSfLjhgjKi/uzO9+UyTHV7BB4hL8NrrE+W/nAD1O+/h8CS1HUK/Lat0GoFTj8jvYyK3sDXvUxY5j3OMn0wyYq78r1ryaeB0yIC0h0DVVVUKVeBGOkGHY1uWre5XFalgZipMyz7ELwdEX37dMQJ7wLeEH2ZHV5S0Up/uDCMqP4TN3VjNhFNCoCnkDaH7O6uDY+pQ01LOJHpE95VdvgyApm7+vX5Xr9DOXkqsymArA4/97sDZVxis3jtt6stuazyHJtL9dh9Y73J4csjDbcu/4sQLnx7Yonh9i6MJgPTXZjQjF5lnCixFMMYYToWChhUJA8QsTEHQ+e3mFhmMkcCcBAodkp/INd5+sfJs/FF12mZlKiX7nQZNqwiEA8xjpM1JchHgf+7MOurQdWbCJVLd63qG1U87CgORbtXdv0xzcJ/KBMiKvXUcezBuPVU9XktJVkDQPUeV2V3Sj7RUh3MzAEwYEsyyubRcUTQzWwE2i8J1f4/6KdhSR6iBOQG8htOj2ER5/5T4OxHVZN40h1hDn9i0Zf+wULOxXIfH+FPhTm9TEgCJ9U0RSGIivR9QjFo23AGvHCXuXmLlaZK9SAeutMaCcit8yul3VoaQxoJyBXpaZoNmb27BloxcqJg6ruoQTT3lVJ4= +- pip install tox tox-venv + +before_script: + # Disable IPv6. Ref travis-ci/travis-ci#8361 + - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then + sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'; + fi +script: tox diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/CHANGES.rst new/rst.linker-1.11/CHANGES.rst --- old/rst.linker-1.9/CHANGES.rst 2017-03-30 10:30:44.000000000 +0200 +++ new/rst.linker-1.11/CHANGES.rst 2019-07-28 02:30:15.000000000 +0200 @@ -1,3 +1,21 @@ +1.11 +==== + +Now supply the version of the package during Sphinx +setup. + +Also supply "parallel_read_safe=True" to be explicit +about the suspicion that this plugin is safe for +parallel reads. + +1.10 +==== + +Refreshed package metadata. + +Package now presents the ``rst`` package a pkg-util +namespace package (instead of pkg_resources). + 1.9 === @@ -6,7 +24,7 @@ or ``copyright`` may be referenced in the format strings. This feature is particularly useful when coupled with the `jaraco.packaging -<https://pypi.org/project/jaraco.packaging>`.sphinx +<https://pypi.org/project/jaraco.packaging>`_.sphinx plugin, which supplies a ``package_url``. 1.8.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/LICENSE new/rst.linker-1.11/LICENSE --- old/rst.linker-1.9/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/rst.linker-1.11/LICENSE 2019-07-28 02:30:15.000000000 +0200 @@ -0,0 +1,7 @@ +Copyright Jason R. Coombs + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/PKG-INFO new/rst.linker-1.11/PKG-INFO --- old/rst.linker-1.9/PKG-INFO 2017-03-30 10:31:07.000000000 +0200 +++ new/rst.linker-1.11/PKG-INFO 2019-07-28 02:31:20.000000000 +0200 @@ -1,7 +1,7 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: rst.linker -Version: 1.9 -Summary: rst.linker +Version: 1.11 +Summary: Tools for adding metadata and hyperlinks to reStructuredText Home-page: https://github.com/jaraco/rst.linker Author: Jason R. Coombs Author-email: [email protected] @@ -11,22 +11,24 @@ .. image:: https://img.shields.io/pypi/pyversions/rst.linker.svg - .. image:: https://img.shields.io/pypi/dm/rst.linker.svg - .. image:: https://img.shields.io/travis/jaraco/rst.linker/master.svg - :target: http://travis-ci.org/jaraco/rst.linker + :target: https://travis-ci.org/jaraco/rst.linker + + .. image:: https://img.shields.io/badge/code%20style-black-000000.svg + :target: https://github.com/ambv/black + :alt: Code style: Black + + .. .. image:: https://img.shields.io/appveyor/ci/jaraco/rst-linker/master.svg + .. :target: https://ci.appveyor.com/project/jaraco/rst-linker/branch/master + + .. image:: https://readthedocs.org/projects/rstlinker/badge/?version=latest + :target: https://rstlinker.readthedocs.io/en/latest/?badge=latest + ``rst.linker`` provides a routine for adding links and performing other custom replacements to reStructuredText files as a Sphinx extension. - License - ======= - - License is indicated in the project metadata (typically one or more - of the Trove classifiers). For more details, see `this explanation - <https://github.com/jaraco/skeleton/issues/1>`_. - Usage ===== @@ -44,3 +46,6 @@ Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Framework :: Sphinx :: Extension +Requires-Python: >=2.7 +Provides-Extra: docs +Provides-Extra: testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/README.rst new/rst.linker-1.11/README.rst --- old/rst.linker-1.9/README.rst 2017-03-30 10:30:44.000000000 +0200 +++ new/rst.linker-1.11/README.rst 2019-07-28 02:30:15.000000000 +0200 @@ -3,22 +3,24 @@ .. image:: https://img.shields.io/pypi/pyversions/rst.linker.svg -.. image:: https://img.shields.io/pypi/dm/rst.linker.svg - .. image:: https://img.shields.io/travis/jaraco/rst.linker/master.svg - :target: http://travis-ci.org/jaraco/rst.linker + :target: https://travis-ci.org/jaraco/rst.linker + +.. image:: https://img.shields.io/badge/code%20style-black-000000.svg + :target: https://github.com/ambv/black + :alt: Code style: Black + +.. .. image:: https://img.shields.io/appveyor/ci/jaraco/rst-linker/master.svg +.. :target: https://ci.appveyor.com/project/jaraco/rst-linker/branch/master + +.. image:: https://readthedocs.org/projects/rstlinker/badge/?version=latest + :target: https://rstlinker.readthedocs.io/en/latest/?badge=latest + ``rst.linker`` provides a routine for adding links and performing other custom replacements to reStructuredText files as a Sphinx extension. -License -======= - -License is indicated in the project metadata (typically one or more -of the Trove classifiers). For more details, see `this explanation -<https://github.com/jaraco/skeleton/issues/1>`_. - Usage ===== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/appveyor.yml new/rst.linker-1.11/appveyor.yml --- old/rst.linker-1.9/appveyor.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/rst.linker-1.11/appveyor.yml 2019-07-28 02:30:15.000000000 +0200 @@ -0,0 +1,24 @@ +environment: + + APPVEYOR: true + + matrix: + - PYTHON: "C:\\Python36-x64" + - PYTHON: "C:\\Python27-x64" + +install: + # symlink python from a directory with a space + - "mklink /d \"C:\\Program Files\\Python\" %PYTHON%" + - "SET PYTHON=\"C:\\Program Files\\Python\"" + - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + +build: off + +cache: + - '%LOCALAPPDATA%\pip\Cache' + +test_script: + - "python -m pip install -U tox tox-venv virtualenv" + - "tox" + +version: '{build}' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/docs/conf.py new/rst.linker-1.11/docs/conf.py --- old/rst.linker-1.9/docs/conf.py 2017-03-30 10:30:44.000000000 +0200 +++ new/rst.linker-1.11/docs/conf.py 2019-07-28 02:30:15.000000000 +0200 @@ -1,58 +1,26 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import os -import sys -import subprocess -import datetime +extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker'] -if 'check_output' not in dir(subprocess): - import subprocess32 as subprocess - -extensions = [ - 'sphinx.ext.autodoc', - 'rst.linker', -] - -# General information about the project. - -root = os.path.join(os.path.dirname(__file__), '..') -setup_script = os.path.join(root, 'setup.py') -fields = ['--name', '--version', '--url', '--author'] -dist_info_cmd = [sys.executable, setup_script] + fields -output_bytes = subprocess.check_output(dist_info_cmd, cwd=root) -project, version, url, author = output_bytes.decode('utf-8').strip().split('\n') - -origin_date = datetime.date(2015,1,1) -today = datetime.date.today() - -copyright = '{origin_date.year}-{today.year} {author}'.format(**locals()) - -# The full version, including alpha/beta/rc tags. -release = version - -master_doc = 'index' +master_doc = "index" link_files = { - '../CHANGES.rst': dict( - using=dict( - GH='https://github.com', - project=project, - url=url, - ), - replace=[ - dict( - pattern=r"(Issue )?#(?P<issue>\d+)", - url='{url}/issues/{issue}', - ), - dict( - pattern=r"^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n", - with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n", - ), - dict( - pattern=r"PEP[- ](?P<pep_number>\d+)", - url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', - ), - ], - ), + '../CHANGES.rst': dict( + using=dict(GH='https://github.com'), + replace=[ + dict( + pattern=r'(Issue #|\B#)(?P<issue>\d+)', + url='{package_url}/issues/{issue}', + ), + dict( + pattern=r'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n', + with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n', + ), + dict( + pattern=r'PEP[- ](?P<pep_number>\d+)', + url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', + ), + ], + ) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/docs/requirements.txt new/rst.linker-1.11/docs/requirements.txt --- old/rst.linker-1.9/docs/requirements.txt 2017-03-30 10:30:44.000000000 +0200 +++ new/rst.linker-1.11/docs/requirements.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -rst.linker diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/pyproject.toml new/rst.linker-1.11/pyproject.toml --- old/rst.linker-1.9/pyproject.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/rst.linker-1.11/pyproject.toml 2019-07-28 02:30:15.000000000 +0200 @@ -0,0 +1,6 @@ +[build-system] +requires = ["setuptools>=34.4", "wheel", "setuptools_scm>=1.15"] +build-backend = "setuptools.build_meta" + +[tool.black] +skip-string-normalization = true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/pytest.ini new/rst.linker-1.11/pytest.ini --- old/rst.linker-1.9/pytest.ini 2017-03-30 10:30:44.000000000 +0200 +++ new/rst.linker-1.11/pytest.ini 2019-07-28 02:30:15.000000000 +0200 @@ -1,4 +1,11 @@ [pytest] -norecursedirs=dist build .tox -addopts=--doctest-modules +norecursedirs=dist build .tox .eggs +addopts=--doctest-modules --flake8 --black doctest_optionflags=ALLOW_UNICODE ELLIPSIS +filterwarnings= + ignore:Possible nested set::pycodestyle:113 + ignore:Using or importing the ABCs::flake8:410 + # workaround for https://sourceforge.net/p/docutils/bugs/348/ + ignore:'U' mode is deprecated::docutils.io + # workaround for https://gitlab.com/pycqa/flake8/issues/275 + ignore:You passed a bytestring as `filenames`.::flake8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/rst/__init__.py new/rst.linker-1.11/rst/__init__.py --- old/rst.linker-1.9/rst/__init__.py 2017-03-30 10:30:44.000000000 +0200 +++ new/rst.linker-1.11/rst/__init__.py 2019-07-28 02:30:15.000000000 +0200 @@ -1 +1 @@ -__import__("pkg_resources").declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # noqa diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/rst/linker.py new/rst.linker-1.11/rst/linker.py --- old/rst.linker-1.9/rst/linker.py 2017-03-30 10:30:44.000000000 +0200 +++ new/rst.linker-1.11/rst/linker.py 2019-07-28 02:30:15.000000000 +0200 @@ -11,11 +11,16 @@ import io import functools -import dateutil.parser +try: + import importlib.metadata as importlib_metadata +except ImportError: + import importlib_metadata import six from six.moves import map, filter +import dateutil.parser + class Repl(object): @classmethod @@ -28,7 +33,7 @@ vars(self).update(defn) def matches(self, text): - return re.match(self.pattern+'$', text) + return re.match(self.pattern + '$', text) def __bool__(self): return False @@ -39,7 +44,7 @@ class URLLinker(Repl): - """ + r""" Each replacement should have the form: { @@ -51,6 +56,7 @@ Currently, each named group must be unique across all Repl objects used in a replacement. """ + def replace(self, match, replacer_vars): text = match.group(0) ns = match.groupdict() @@ -64,7 +70,7 @@ class SCMTimestamp(Repl): - """ + r""" Replace content with a version number to include the date stamp from the SCM. @@ -94,6 +100,7 @@ with_scm: "{rev[timestamp]:%b %Y}", } """ + def replace(self, match, replacer_vars): text = match.group(0) scm_version = match.group('scm_version') @@ -109,18 +116,26 @@ def _get_scm_info_for(scm_version): scm = 'hg' if os.path.isdir('.hg') else 'git' commands = dict( - hg=['hg', 'log', '-l', '1', '--template', '{date|isodate}', '-r', scm_version], + hg=[ + 'hg', + 'log', + '-l', + '1', + '--template', + '{date|isodate}', + '-r', + scm_version, + ], git=['git', 'log', '-1', '--format=%ai', scm_version], ) cmd = commands[scm] try: with open(os.devnull, 'w') as devnull: - ts = subprocess.check_output(cmd, stderr=devnull).decode('utf-8').strip() - assert ts - ts = dateutil.parser.parse(ts) + out = subprocess.check_output(cmd, stderr=devnull) + ts = out.decode('utf-8').strip() + return dict(timestamp=dateutil.parser.parse(ts)) except Exception: - return - return dict(timestamp=ts) + pass def __bool__(self): return 'with_scm' in vars(self) @@ -169,11 +184,16 @@ def setup(app): app.add_config_value(str('link_files'), {}, '') app.connect(str('builder-inited'), make_links) + return dict( + version=importlib_metadata.version('rst.linker'), parallel_read_safe=True + ) + def _extend_name(filename): base, ext = os.path.splitext(filename) return base + ' (links)' + ext + def _locater(app): """ Return a function suitable for locating the path @@ -187,10 +207,7 @@ Given a Sphinx config object, return a dictionary of config values. """ - return dict( - (key, getattr(config, key)) - for key in config.values - ) + return dict((key, getattr(config, key)) for key in config.values) def make_links(app): @@ -204,5 +221,6 @@ remover = functools.partial(_remove, target=target) app.connect(str('build-finished'), remover) + def _remove(app, exception, target): os.remove(target) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/rst.linker.egg-info/PKG-INFO new/rst.linker-1.11/rst.linker.egg-info/PKG-INFO --- old/rst.linker-1.9/rst.linker.egg-info/PKG-INFO 2017-03-30 10:31:07.000000000 +0200 +++ new/rst.linker-1.11/rst.linker.egg-info/PKG-INFO 2019-07-28 02:31:19.000000000 +0200 @@ -1,7 +1,7 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: rst.linker -Version: 1.9 -Summary: rst.linker +Version: 1.11 +Summary: Tools for adding metadata and hyperlinks to reStructuredText Home-page: https://github.com/jaraco/rst.linker Author: Jason R. Coombs Author-email: [email protected] @@ -11,22 +11,24 @@ .. image:: https://img.shields.io/pypi/pyversions/rst.linker.svg - .. image:: https://img.shields.io/pypi/dm/rst.linker.svg - .. image:: https://img.shields.io/travis/jaraco/rst.linker/master.svg - :target: http://travis-ci.org/jaraco/rst.linker + :target: https://travis-ci.org/jaraco/rst.linker + + .. image:: https://img.shields.io/badge/code%20style-black-000000.svg + :target: https://github.com/ambv/black + :alt: Code style: Black + + .. .. image:: https://img.shields.io/appveyor/ci/jaraco/rst-linker/master.svg + .. :target: https://ci.appveyor.com/project/jaraco/rst-linker/branch/master + + .. image:: https://readthedocs.org/projects/rstlinker/badge/?version=latest + :target: https://rstlinker.readthedocs.io/en/latest/?badge=latest + ``rst.linker`` provides a routine for adding links and performing other custom replacements to reStructuredText files as a Sphinx extension. - License - ======= - - License is indicated in the project metadata (typically one or more - of the Trove classifiers). For more details, see `this explanation - <https://github.com/jaraco/skeleton/issues/1>`_. - Usage ===== @@ -44,3 +46,6 @@ Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Framework :: Sphinx :: Extension +Requires-Python: >=2.7 +Provides-Extra: docs +Provides-Extra: testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/rst.linker.egg-info/SOURCES.txt new/rst.linker-1.11/rst.linker.egg-info/SOURCES.txt --- old/rst.linker-1.9/rst.linker.egg-info/SOURCES.txt 2017-03-30 10:31:07.000000000 +0200 +++ new/rst.linker-1.11/rst.linker.egg-info/SOURCES.txt 2019-07-28 02:31:20.000000000 +0200 @@ -1,21 +1,25 @@ +.flake8 +.pre-commit-config.yaml +.readthedocs.yml .travis.yml CHANGES.rst +LICENSE README.rst +appveyor.yml +pyproject.toml pytest.ini setup.cfg setup.py +skeleton.md test_all.py tox.ini docs/conf.py docs/history.rst docs/index.rst -docs/requirements.txt rst/__init__.py rst/linker.py rst.linker.egg-info/PKG-INFO rst.linker.egg-info/SOURCES.txt rst.linker.egg-info/dependency_links.txt -rst.linker.egg-info/namespace_packages.txt rst.linker.egg-info/requires.txt -rst.linker.egg-info/top_level.txt -tests/requirements.txt \ No newline at end of file +rst.linker.egg-info/top_level.txt \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/rst.linker.egg-info/namespace_packages.txt new/rst.linker-1.11/rst.linker.egg-info/namespace_packages.txt --- old/rst.linker-1.9/rst.linker.egg-info/namespace_packages.txt 2017-03-30 10:31:07.000000000 +0200 +++ new/rst.linker-1.11/rst.linker.egg-info/namespace_packages.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/rst.linker.egg-info/requires.txt new/rst.linker-1.11/rst.linker.egg-info/requires.txt --- old/rst.linker-1.9/rst.linker.egg-info/requires.txt 2017-03-30 10:31:07.000000000 +0200 +++ new/rst.linker-1.11/rst.linker.egg-info/requires.txt 2019-07-28 02:31:19.000000000 +0200 @@ -1,2 +1,17 @@ six python-dateutil + +[:python_version < "3.8"] +importlib_metadata + +[docs] +sphinx +jaraco.packaging>=3.2 +rst.linker>=1.9 + +[testing] +pytest!=3.7.3,>=3.5 +pytest-checkdocs +pytest-flake8 +pytest-black-multipy +path.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/setup.cfg new/rst.linker-1.11/setup.cfg --- old/rst.linker-1.9/setup.cfg 2017-03-30 10:31:07.000000000 +0200 +++ new/rst.linker-1.11/setup.cfg 2019-07-28 02:31:20.000000000 +0200 @@ -1,12 +1,48 @@ -[aliases] -release = dists upload -dists = clean --all sdist bdist_wheel - -[wheel] +[bdist_wheel] universal = 1 +[metadata] +license_file = LICENSE +name = rst.linker +author = Jason R. Coombs +author_email = [email protected] +description = Tools for adding metadata and hyperlinks to reStructuredText +long_description = file:README.rst +url = https://github.com/jaraco/rst.linker +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + License :: OSI Approved :: MIT License + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Framework :: Sphinx :: Extension + +[options] +packages = find: +include_package_data = true +python_requires = >=2.7 +install_requires = + six + python-dateutil + importlib_metadata; python_version < "3.8" +setup_requires = setuptools_scm >= 1.15.0 + +[options.extras_require] +testing = + pytest >= 3.5, !=3.7.3 + pytest-checkdocs + pytest-flake8 + pytest-black-multipy + + path.py +docs = + sphinx + jaraco.packaging >= 3.2 + rst.linker >= 1.9 + +[options.entry_points] + [egg_info] tag_build = tag_date = 0 -tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/setup.py new/rst.linker-1.11/setup.py --- old/rst.linker-1.9/setup.py 2017-03-30 10:30:44.000000000 +0200 +++ new/rst.linker-1.11/setup.py 2019-07-28 02:30:15.000000000 +0200 @@ -1,47 +1,6 @@ #!/usr/bin/env python -# Project skeleton maintained at https://github.com/jaraco/skeleton - -import io - import setuptools -with io.open('README.rst', encoding='utf-8') as readme: - long_description = readme.read() - -name = 'rst.linker' -description = '' - -params = dict( - name=name, - use_scm_version=True, - author="Jason R. Coombs", - author_email="[email protected]", - description=description or name, - long_description=long_description, - url="https://github.com/jaraco/" + name, - packages=setuptools.find_packages(), - include_package_data=True, - namespace_packages=name.split('.')[:-1], - install_requires=[ - 'six', - 'python-dateutil', - ], - extras_require={ - }, - setup_requires=[ - 'setuptools_scm>=1.15.0', - ], - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Framework :: Sphinx :: Extension", - ], - entry_points={ - }, -) -if __name__ == '__main__': - setuptools.setup(**params) +if __name__ == "__main__": + setuptools.setup(use_scm_version=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/skeleton.md new/rst.linker-1.11/skeleton.md --- old/rst.linker-1.9/skeleton.md 1970-01-01 01:00:00.000000000 +0100 +++ new/rst.linker-1.11/skeleton.md 2019-07-28 02:30:15.000000000 +0200 @@ -0,0 +1,129 @@ +# Overview + +This project is merged with [skeleton](https://github.com/jaraco/skeleton). What is skeleton? It's the scaffolding of a Python project jaraco [introduced in his blog](https://blog.jaraco.com/a-project-skeleton-for-python-projects/). It seeks to provide a means to re-use techniques and inherit advances when managing projects for distribution. + +## An SCM Managed Approach + +While maintaining dozens of projects in PyPI, jaraco derives best practices for project distribution and publishes them in the [skeleton repo](https://github.com/jaraco/skeleton), a git repo capturing the evolution and culmination of these best practices. + +It's intended to be used by a new or existing project to adopt these practices and honed and proven techniques. Adopters are encouraged to use the project directly and maintain a small deviation from the technique, make their own fork for more substantial changes unique to their environment or preferences, or simply adopt the skeleton once and abandon it thereafter. + +The primary advantage to using an SCM for maintaining these techniques is that those tools help facilitate the merge between the template and its adopting projects. + +Another advantage to using an SCM-managed approach is that tools like GitHub recognize that a change in the skeleton is the _same change_ across all projects that merge with that skeleton. Without the ancestry, with a traditional copy/paste approach, a [commit like this](https://github.com/jaraco/skeleton/commit/12eed1326e1bc26ce256e7b3f8cd8d3a5beab2d5) would produce notifications in the upstream project issue for each and every application, but because it's centralized, GitHub provides just the one notification when the change is added to the skeleton. + +# Usage + +## new projects + +To use skeleton for a new project, simply pull the skeleton into a new project: + +``` +$ git init my-new-project +$ cd my-new-project +$ git pull gh://jaraco/skeleton +``` + +Now customize the project to suit your individual project needs. + +## existing projects + +If you have an existing project, you can still incorporate the skeleton by merging it into the codebase. + +``` +$ git merge skeleton --allow-unrelated-histories +``` + +The `--allow-unrelated-histories` is necessary because the history from the skeleton was previously unrelated to the existing codebase. Resolve any merge conflicts and commit to the master, and now the project is based on the shared skeleton. + +## Updating + +Whenever a change is needed or desired for the general technique for packaging, it can be made in the skeleton project and then merged into each of the derived projects as needed, recommended before each release. As a result, features and best practices for packaging are centrally maintained and readily trickle into a whole suite of packages. This technique lowers the amount of tedious work necessary to create or maintain a project, and coupled with other techniques like continuous integration and deployment, lowers the cost of creating and maintaining refined Python projects to just a few, familiar git operations. + +Thereafter, the target project can make whatever customizations it deems relevant to the scaffolding. The project may even at some point decide that the divergence is too great to merit renewed merging with the original skeleton. This approach applies maximal guidance while creating minimal constraints. + +# Features + +The features/techniques employed by the skeleton include: + +- PEP 517/518 based build relying on setuptools as the build tool +- setuptools declarative configuration using setup.cfg +- tox for running tests +- A README.rst as reStructuredText with some popular badges, but with readthedocs and appveyor badges commented out +- A CHANGES.rst file intended for publishing release notes about the project +- Use of [black](https://black.readthedocs.io/en/stable/) for code formatting (disabled on unsupported Python 3.5 and earlier) + +## Packaging Conventions + +A pyproject.toml is included to enable PEP 517 and PEP 518 compatibility and declares the requirements necessary to build the project on setuptools (a minimum version compatible with setup.cfg declarative config). + +The setup.cfg file implements the following features: + +- Assumes universal wheel for release +- Advertises the project's LICENSE file (MIT by default) +- Reads the README.rst file into the long description +- Some common Trove classifiers +- Includes all packages discovered in the repo +- Data files in the package are also included (not just Python files) +- Declares the required Python versions +- Declares install requirements (empty by default) +- Declares setup requirements for legacy environments +- Supplies two 'extras': + - testing: requirements for running tests + - docs: requirements for building docs + - these extras split the declaration into "upstream" (requirements as declared by the skeleton) and "local" (those specific to the local project); these markers help avoid merge conflicts +- Placeholder for defining entry points + +Additionally, the setup.py file declares `use_scm_version` which relies on [setuptools_scm](https://pypi.org/project/setuptools_scm) to do two things: + +- derive the project version from SCM tags +- ensure that all files committed to the repo are automatically included in releases + +## Running Tests + +The skeleton assumes the developer has [tox](https://pypi.org/project/tox) installed. The developer is expected to run `tox` to run tests on the current Python version using [pytest](https://pypi.org/project/pytest). + +Other environments (invoked with `tox -e {name}`) supplied include: + + - a `build-docs` environment to build the documentation + - a `release` environment to publish the package to PyPI + +A pytest.ini is included to define common options around running tests. In particular: + +- rely on default test discovery in the current directory +- avoid recursing into common directories not containing tests +- run doctests on modules and invoke flake8 tests +- in doctests, allow unicode literals and regular literals to match, allowing for doctests to run on Python 2 and 3. Also enable ELLIPSES, a default that would be undone by supplying the prior option. +- filters out known warnings caused by libraries/functionality included by the skeleton + +Relies a .flake8 file to correct some default behaviors: + +- disable mutually incompatible rules W503 and W504 +- support for black format + +## Continuous Integration + +The project is pre-configured to run tests in [Travis-CI](https://travis-ci.org) (.travis.yml). Any new project must be enabled either through their web site or with the `travis enable` command. In addition to running tests, an additional deploy stage is configured to automatically release tagged commits. The username and password for PyPI must be configured for each project using the `travis` command and only after the travis project is created. As releases are cut with [twine](https://pypi.org/project/twine), the two values are supplied through the `TWINE_USERNAME` and `TWINE_PASSWORD`. To configure the latter as a secret, run the following command: + +``` +echo "TWINE_PASSWORD={password}" | travis encrypt +``` + +Or disable it in the CI definition and configure it through the web UI. + +Features include: +- test against Python 2 and 3 +- run on Ubuntu Xenial +- correct for broken IPv6 + +Also provided is a minimal template for running under Appveyor (Windows). + +## Building Documentation + +Documentation is automatically built by [Read the Docs](https://readthedocs.org) when the project is registered with it, by way of the .readthedocs.yml file. To test the docs build manually, a tox env may be invoked as `tox -e build-docs`. Both techniques rely on the dependencies declared in `setup.cfg/options.extras_require.docs`. + +In addition to building the sphinx docs scaffolded in `docs/`, the docs build a `history.html` file that first injects release dates and hyperlinks into the CHANGES.rst before incorporating it as history in the docs. + +## Cutting releases + +By default, tagged commits are released through the continuous integration deploy stage. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/test_all.py new/rst.linker-1.11/test_all.py --- old/rst.linker-1.9/test_all.py 2017-03-30 10:30:44.000000000 +0200 +++ new/rst.linker-1.11/test_all.py 2019-07-28 02:30:15.000000000 +0200 @@ -10,10 +10,8 @@ @pytest.fixture def linker_defn(): return dict( - using = dict( - kiln='https://org.kilnhg.com/Code/Repositories' - ), - replace = [ + using=dict(kiln='https://org.kilnhg.com/Code/Repositories'), + replace=[ dict( pattern=r"proj (?P<proj_ver>\d+(\.\d+)*([abc]\d+)?)", url='{kiln}/repo/proj/Files/CHANGES?rev={proj_ver}', @@ -28,21 +26,25 @@ def test_linker_example(linker_defn): repl = rst.linker.Replacer.from_definition(linker_defn) - assert 'kilnhg' in repl.run(""" + assert 'kilnhg' in repl.run( + """ proj 1.0 was released - """) + """ + ) def test_write_links(linker_defn): repl = rst.linker.Replacer.from_definition(linker_defn) source = Path('foo.txt') dest = Path('foo.out') - source.write_text(""" + source.write_text( + """ 1.0 --- proj 1.0 was released - """) + """ + ) repl.write_links(source, dest) res = dest.text() assert 'kilnhg' in res @@ -50,10 +52,7 @@ dest.remove() -needs_git = pytest.mark.xfail( - not os.path.isdir('.git'), - reason="Git checkout needed", -) +needs_git = pytest.mark.xfail(not os.path.isdir('.git'), reason="Git checkout needed") @pytest.fixture @@ -63,39 +62,45 @@ dict( pattern=r"^(?m)((?P<scm_version>\d+(\.\d+){1,2}))\n-+\n", with_scm="{text}\nTagged {rev[timestamp]}\n", - ), - ], + ) + ] ) @needs_git def test_scm_example(scm_defn): repl = rst.linker.Replacer.from_definition(scm_defn) - input = textwrap.dedent(""" + input = textwrap.dedent( + """ 1.0 --- Some details - """) + """ + ) result = repl.run(input) assert 'Tagged 2015-02' in result @needs_git def test_scm_custom_date_format(scm_defn): - with_scm = textwrap.dedent(""" + with_scm = textwrap.dedent( + """ {text} Copyright {rev[timestamp]:%Y} Released {rev[timestamp]:%d-%b} - """) + """ + ) scm_defn['replace'][0]['with_scm'] = with_scm repl = rst.linker.Replacer.from_definition(scm_defn) - changelog = textwrap.dedent(""" + changelog = textwrap.dedent( + """ 1.0 --- Some details - """) + """ + ) result = repl.run(changelog) assert "Copyright 2015" in result assert "Released 24-Feb" in result @@ -106,12 +111,14 @@ defn = linker_defn defn['replace'].extend(scm_defn['replace']) repl = rst.linker.Replacer.from_definition(defn) - input = textwrap.dedent(""" + input = textwrap.dedent( + """ 1.3 --- Bumped to proj 1.1. - """) + """ + ) result = repl.run(input) assert 'Tagged 2016-02' in result assert 'https://org.kilnhg' in result diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/tests/requirements.txt new/rst.linker-1.11/tests/requirements.txt --- old/rst.linker-1.9/tests/requirements.txt 2017-03-30 10:30:44.000000000 +0200 +++ new/rst.linker-1.11/tests/requirements.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -pytest >= 2.8 -subprocess32; python_version=="2.6" -path.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rst.linker-1.9/tox.ini new/rst.linker-1.11/tox.ini --- old/rst.linker-1.9/tox.ini 2017-03-30 10:30:44.000000000 +0200 +++ new/rst.linker-1.11/tox.ini 2019-07-28 02:30:15.000000000 +0200 @@ -1,6 +1,32 @@ +[tox] +envlist = python +minversion = 3.2 +# https://github.com/jaraco/skeleton/issues/6 +tox_pip_extensions_ext_venv_update = true + [testenv] deps = - -rtests/requirements.txt - -commands = py.test {posargs} + setuptools>=31.0.1 +commands = + pytest {posargs} usedevelop = True +extras = testing + +[testenv:build-docs] +extras = + docs + testing +changedir = docs +commands = + python -m sphinx . {toxinidir}/build/html + +[testenv:release] +skip_install = True +deps = + pep517>=0.5 + twine>=1.13 + path.py +commands = + python -c "import path; path.Path('dist').rmtree_p()" + python -m pep517.build . + python -m twine upload dist/*
