Hello community,
here is the log from the commit of package python-jaraco.packaging for
openSUSE:Factory checked in at 2020-04-19 21:39:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jaraco.packaging (Old)
and /work/SRC/openSUSE:Factory/.python-jaraco.packaging.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jaraco.packaging"
Sun Apr 19 21:39:41 2020 rev:4 rq:784211 version:8.1.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-jaraco.packaging/python-jaraco.base.changes
2019-03-01 20:25:52.298062504 +0100
+++
/work/SRC/openSUSE:Factory/.python-jaraco.packaging.new.2738/python-jaraco.base.changes
2020-04-19 21:39:41.986904622 +0200
@@ -1,0 +2,10 @@
+Mon Mar 9 15:13:36 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- Set version to 8.1.0
+
+-------------------------------------------------------------------
+Mon Oct 14 13:39:57 UTC 2019 - Matej Cepl <[email protected]>
+
+- Replace %fdupes -s with plain %fdupes; hardlinks are better.
+
+-------------------------------------------------------------------
---
/work/SRC/openSUSE:Factory/python-jaraco.packaging/python-jaraco.packaging.changes
2019-11-04 17:12:16.496637299 +0100
+++
/work/SRC/openSUSE:Factory/.python-jaraco.packaging.new.2738/python-jaraco.packaging.changes
2020-04-19 21:39:42.230905112 +0200
@@ -1,0 +2,9 @@
+Mon Mar 9 15:11:55 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- Update to 8.1.0
+ * In sphinx when loading metadata, trap a ValueError to include the
offending value.
+ * Require Python 3.6 or later.
+ * Removed 'cheese' package as it was built for a use-case that is no longer
needed.
+ * Sphinx plugin now declares support for parallel reads (optimistically).
+
+-------------------------------------------------------------------
Old:
----
jaraco.packaging-6.1.tar.gz
New:
----
jaraco.packaging-8.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-jaraco.base.spec ++++++
--- /var/tmp/diff_new_pack.Pz9YJS/_old 2020-04-19 21:39:42.878906413 +0200
+++ /var/tmp/diff_new_pack.Pz9YJS/_new 2020-04-19 21:39:42.878906413 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-jaraco.base
#
-# Copyright (c) 2019 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
@@ -18,12 +18,11 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-jaraco.base
-Version: 6.1
+Version: 8.1.0
Release: 0
Summary: Base namespace for jaraco packages
License: MIT
-Group: Development/Languages/Python
-Url: https://github.com/jaraco/jaraco.packaging
+URL: https://github.com/jaraco/jaraco.packaging
Source:
https://files.pythonhosted.org/packages/source/j/jaraco.packaging/jaraco.packaging-%{version}.tar.gz
BuildRequires: %{python_module base}
BuildRequires: fdupes
++++++ python-jaraco.packaging.spec ++++++
--- /var/tmp/diff_new_pack.Pz9YJS/_old 2020-04-19 21:39:42.902906461 +0200
+++ /var/tmp/diff_new_pack.Pz9YJS/_new 2020-04-19 21:39:42.906906468 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-jaraco.packaging
#
-# Copyright (c) 2019 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
@@ -17,8 +17,9 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
Name: python-jaraco.packaging
-Version: 6.1
+Version: 8.1.0
Release: 0
Summary: Supplement packaging Python releases
License: MIT
@@ -28,6 +29,7 @@
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module toml}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-jaraco.base >= 6.1
@@ -42,6 +44,7 @@
%prep
%setup -q -n jaraco.packaging-%{version}
sed -i 's/--flake8//' pytest.ini
+sed -i 's/--black --cov//' pytest.ini
rm -rf jaraco.packaging.egg-info
%build
@@ -56,7 +59,6 @@
}
%python_clone -a %{buildroot}%{_bindir}/dependency-tree
-%python_clone -a %{buildroot}%{_bindir}/upload-package
%post
%python_install_alternative dependency-tree upload-package
@@ -65,17 +67,13 @@
%python_uninstall_alternative dependency-tree
%check
-# Two tests depend on accessing PyPI
-%{python_expand py.test-%{$python_bin_suffix} \
- --ignore=_build.python3 --ignore _build.python2 \
- -k 'not (load_dependencies or test_revived_distribution)'
-}
+# the test depends on accessing PyPI
+%pytest -k 'not test_revived_distribution'
%files %{python_files}
%license LICENSE
%doc docs/*.rst CHANGES.rst README.rst
%python_alternative %{_bindir}/dependency-tree
-%python_alternative %{_bindir}/upload-package
%{python_sitelib}/jaraco.packaging-%{version}-py*.egg-info
%{python_sitelib}/jaraco/packaging/
++++++ jaraco.packaging-6.1.tar.gz -> jaraco.packaging-8.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/.coveragerc
new/jaraco.packaging-8.1.0/.coveragerc
--- old/jaraco.packaging-6.1/.coveragerc 1970-01-01 01:00:00.000000000
+0100
+++ new/jaraco.packaging-8.1.0/.coveragerc 2020-02-16 16:58:09.000000000
+0100
@@ -0,0 +1,5 @@
+[run]
+omit = .tox/*
+
+[report]
+show_missing = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/.flake8
new/jaraco.packaging-8.1.0/.flake8
--- old/jaraco.packaging-6.1/.flake8 2019-01-26 18:39:25.000000000 +0100
+++ new/jaraco.packaging-8.1.0/.flake8 2020-02-16 16:58:09.000000000 +0100
@@ -1,8 +1,9 @@
[flake8]
+max-line-length = 88
ignore =
- # Allow tabs for indentation
- W191
# 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/jaraco.packaging-6.1/.pre-commit-config.yaml
new/jaraco.packaging-8.1.0/.pre-commit-config.yaml
--- old/jaraco.packaging-6.1/.pre-commit-config.yaml 1970-01-01
01:00:00.000000000 +0100
+++ new/jaraco.packaging-8.1.0/.pre-commit-config.yaml 2020-02-16
16:58:09.000000000 +0100
@@ -0,0 +1,10 @@
+repos:
+- repo: https://github.com/psf/black
+ rev: 19.10b0
+ hooks:
+ - id: black
+
+- repo: https://github.com/asottile/blacken-docs
+ rev: v1.4.0
+ hooks:
+ - id: blacken-docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/.travis.yml
new/jaraco.packaging-8.1.0/.travis.yml
--- old/jaraco.packaging-6.1/.travis.yml 2019-01-26 18:39:25.000000000
+0100
+++ new/jaraco.packaging-8.1.0/.travis.yml 2020-02-16 16:58:09.000000000
+0100
@@ -1,25 +1,9 @@
dist: xenial
-sudo: false
language: python
python:
-- 2.7
- 3.6
-- &latest_py3 3.7
-
-jobs:
- fast_finish: true
- include:
- - stage: deploy
- if: tag IS present
- python: *latest_py3
- before_script: skip
- env:
- - TWINE_USERNAME=jaraco
- # TWINE_PASSWORD
- - secure:
bxD2vLOczKmaFldcxIdFBAVhMLv9yorkIi2HDH/mHqcA5kxhrZQfGqKnv5lrapbnAdq4nrvLmWq46sA5TDjm3tguLabOPbsTNc0JslyB+/zSYYncXyPxvPbNFDqGu3RLLmt6LDtjXJY2D7MxOav/eDJA4Z7ORn6u8pdjtQ3DbXzeND/Qtw/rr3lfRHriBsYbR2tZ8X8EpcRgZU00Iz1DCayVbUbTodvQ7cQ80NgmfQFLJMJkImaoMZ9lEId1l+AbI3SdOOJV+bTmpZiFhowtTifsI7b5BHlkYPMe/S8qIyzIXBty9trHcWzOzwPlNlLHODtxfYcCkWJggwPnfnhFAHsu1mzALs3fI6bi+vQ+rvuKAvvthkYpHDEZtl0LRBsnetTxLGL+JigKs4LDPcW00fSppfPosjDzGNC/Yz6b4mr9xgfwDRUzV8GsGKZ5JbINktsDsrE2V312mFLTkXCu1/QL2ToBLsi2o9/jz05pEAk55fvIEquPitwvl5EWKc6sU5nmhs0TdOJGYhPDCyaNw8/9lVkMyJ6AbJtVFwOz13O/oOc/1dSTo9ieWYOMfMYkBz0E5LyVfEDfSIZUGQfevSR06Aer4+K4MXKFP9G5AmdaLqRoO0sEPK2+GSlWs/FJUX3W2nwb+LWCVPlcprpLojgI6wGQNXbYYKYpPPR2htk=
- - TOX_TESTENV_PASSENV="TWINE_USERNAME TWINE_PASSWORD"
- script: tox -e release
+- &latest_py3 3.8
cache: pip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/CHANGES.rst
new/jaraco.packaging-8.1.0/CHANGES.rst
--- old/jaraco.packaging-6.1/CHANGES.rst 2019-01-26 18:39:25.000000000
+0100
+++ new/jaraco.packaging-8.1.0/CHANGES.rst 2020-02-16 16:58:09.000000000
+0100
@@ -1,3 +1,27 @@
+v8.1.0
+======
+
+In ``sphinx`` when loading metadata, trap a ValueError to
+include the offending value.
+
+v8.0.0
+======
+
+Require Python 3.6 or later.
+
+7.0
+===
+
+Removed 'cheese' package as it was built for a use-case that is
+no longer needed, depends on deprecated functionality in
+setuptools, and is causing errors in tests (SSL).
+
+6.2
+===
+
+Sphinx plugin now declares support for parallel reads
+(optimistically).
+
6.1
===
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/LICENSE
new/jaraco.packaging-8.1.0/LICENSE
--- old/jaraco.packaging-6.1/LICENSE 2019-01-26 18:39:25.000000000 +0100
+++ new/jaraco.packaging-8.1.0/LICENSE 2020-02-16 16:58:09.000000000 +0100
@@ -1,7 +1,19 @@
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:
+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 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.
+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/jaraco.packaging-6.1/PKG-INFO
new/jaraco.packaging-8.1.0/PKG-INFO
--- old/jaraco.packaging-6.1/PKG-INFO 2019-01-26 18:39:43.000000000 +0100
+++ new/jaraco.packaging-8.1.0/PKG-INFO 2020-02-16 16:58:31.906517500 +0100
@@ -1,21 +1,31 @@
Metadata-Version: 2.1
Name: jaraco.packaging
-Version: 6.1
+Version: 8.1.0
Summary: tools to supplement packaging Python releases
Home-page: https://github.com/jaraco/jaraco.packaging
Author: Jason R. Coombs
Author-email: [email protected]
License: UNKNOWN
Description: .. image:: https://img.shields.io/pypi/v/jaraco.packaging.svg
- :target: https://pypi.org/project/jaraco.packaging
+ :target: `PyPI link`_
.. image:: https://img.shields.io/pypi/pyversions/jaraco.packaging.svg
+ :target: `PyPI link`_
+
+ .. _PyPI link: https://pypi.org/project/jaraco.packaging
+
+ .. image::
https://dev.azure.com/jaraco/jaraco.packaging/_apis/build/status/jaraco.jaraco.packaging?branchName=master
+ :target:
https://dev.azure.com/jaraco/jaraco.packaging/_build/latest?definitionId=1&branchName=master
.. image::
https://img.shields.io/travis/jaraco/jaraco.packaging/master.svg
:target: https://travis-ci.org/jaraco/jaraco.packaging
- .. .. image::
https://img.shields.io/appveyor/ci/jaraco/skeleton/master.svg
- .. :target:
https://ci.appveyor.com/project/jaraco/skeleton/branch/master
+ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/psf/black
+ :alt: Code style: Black
+
+ .. .. image::
https://img.shields.io/appveyor/ci/jaraco/jaraco-packaging/master.svg
+ .. :target:
https://ci.appveyor.com/project/jaraco/jaraco-packaging/branch/master
.. image::
https://readthedocs.org/projects/jaracopackaging/badge/?version=latest
:target:
https://jaracopackaging.readthedocs.io/en/latest/?badge=latest
@@ -85,9 +95,9 @@
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Framework :: Sphinx :: Extension
-Requires-Python: >=2.7
-Provides-Extra: docs
+Requires-Python: >=3.6
Provides-Extra: testing
+Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/README.rst
new/jaraco.packaging-8.1.0/README.rst
--- old/jaraco.packaging-6.1/README.rst 2019-01-26 18:39:25.000000000 +0100
+++ new/jaraco.packaging-8.1.0/README.rst 2020-02-16 16:58:09.000000000
+0100
@@ -1,13 +1,23 @@
.. image:: https://img.shields.io/pypi/v/jaraco.packaging.svg
- :target: https://pypi.org/project/jaraco.packaging
+ :target: `PyPI link`_
.. image:: https://img.shields.io/pypi/pyversions/jaraco.packaging.svg
+ :target: `PyPI link`_
+
+.. _PyPI link: https://pypi.org/project/jaraco.packaging
+
+.. image::
https://dev.azure.com/jaraco/jaraco.packaging/_apis/build/status/jaraco.jaraco.packaging?branchName=master
+ :target:
https://dev.azure.com/jaraco/jaraco.packaging/_build/latest?definitionId=1&branchName=master
.. image:: https://img.shields.io/travis/jaraco/jaraco.packaging/master.svg
:target: https://travis-ci.org/jaraco/jaraco.packaging
-.. .. image:: https://img.shields.io/appveyor/ci/jaraco/skeleton/master.svg
-.. :target: https://ci.appveyor.com/project/jaraco/skeleton/branch/master
+.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/psf/black
+ :alt: Code style: Black
+
+.. .. image::
https://img.shields.io/appveyor/ci/jaraco/jaraco-packaging/master.svg
+.. :target:
https://ci.appveyor.com/project/jaraco/jaraco-packaging/branch/master
.. image::
https://readthedocs.org/projects/jaracopackaging/badge/?version=latest
:target: https://jaracopackaging.readthedocs.io/en/latest/?badge=latest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/appveyor.yml
new/jaraco.packaging-8.1.0/appveyor.yml
--- old/jaraco.packaging-6.1/appveyor.yml 2019-01-26 18:39:25.000000000
+0100
+++ new/jaraco.packaging-8.1.0/appveyor.yml 2020-02-16 16:58:09.000000000
+0100
@@ -4,7 +4,7 @@
matrix:
- PYTHON: "C:\\Python36-x64"
- - PYTHON: "C:\\Python27-x64"
+ - PYTHON: "C:\\Python38-x64"
install:
# symlink python from a directory with a space
@@ -18,7 +18,7 @@
- '%LOCALAPPDATA%\pip\Cache'
test_script:
- - "python -m pip install tox tox-venv"
+ - "python -m pip install -U tox tox-venv virtualenv"
- "tox"
version: '{build}'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/azure-pipelines.yml
new/jaraco.packaging-8.1.0/azure-pipelines.yml
--- old/jaraco.packaging-6.1/azure-pipelines.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/jaraco.packaging-8.1.0/azure-pipelines.yml 2020-02-16
16:58:09.000000000 +0100
@@ -0,0 +1,71 @@
+# Create the project in Azure with:
+# az devops project create --name $name --organization
https://dev.azure.com/$org/ --visibility public
+# then configure the pipelines (through web UI)
+
+trigger:
+ branches:
+ include:
+ - '*'
+ tags:
+ include:
+ - '*'
+
+pool:
+ vmimage: 'Ubuntu-18.04'
+
+variables:
+- group: Azure secrets
+
+stages:
+- stage: Test
+ jobs:
+
+ - job: 'Test'
+ strategy:
+ matrix:
+ Python36:
+ python.version: '3.6'
+ Python38:
+ python.version: '3.8'
+ maxParallel: 4
+
+ steps:
+ - task: UsePythonVersion@0
+ inputs:
+ versionSpec: '$(python.version)'
+ architecture: 'x64'
+
+ - script: python -m pip install tox
+ displayName: 'Install tox'
+
+ - script: |
+ tox -- --junit-xml=test-results.xml
+ displayName: 'run tests'
+
+ - task: PublishTestResults@2
+ inputs:
+ testResultsFiles: '**/test-results.xml'
+ testRunTitle: 'Python $(python.version)'
+ condition: succeededOrFailed()
+
+- stage: Publish
+ dependsOn: Test
+ jobs:
+ - job: 'Publish'
+
+ steps:
+ - task: UsePythonVersion@0
+ inputs:
+ versionSpec: '3.8'
+ architecture: 'x64'
+
+ - script: python -m pip install tox
+ displayName: 'Install tox'
+
+ - script: |
+ tox -e release
+ env:
+ TWINE_PASSWORD: $(PyPI-token)
+ displayName: 'publish to PyPI'
+
+ condition: contains(variables['Build.SourceBranch'], 'tags')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/docs/conf.py
new/jaraco.packaging-8.1.0/docs/conf.py
--- old/jaraco.packaging-6.1/docs/conf.py 2019-01-26 18:39:25.000000000
+0100
+++ new/jaraco.packaging-8.1.0/docs/conf.py 2020-02-16 16:58:09.000000000
+0100
@@ -1,25 +1,25 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-extensions = ["sphinx.ext.autodoc", "jaraco.packaging.sphinx", "rst.linker"]
+extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
master_doc = "index"
link_files = {
- "../CHANGES.rst": dict(
- using=dict(GH="https://github.com"),
+ '../CHANGES.rst': dict(
+ using=dict(GH='https://github.com'),
replace=[
dict(
- pattern=r"(Issue #|\B#)(?P<issue>\d+)",
- url="{package_url}/issues/{issue}",
+ 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",
+ 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}/",
+ 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/jaraco.packaging-6.1/jaraco/packaging/cheese.py
new/jaraco.packaging-8.1.0/jaraco/packaging/cheese.py
--- old/jaraco.packaging-6.1/jaraco/packaging/cheese.py 2019-01-26
18:39:25.000000000 +0100
+++ new/jaraco.packaging-8.1.0/jaraco/packaging/cheese.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,199 +0,0 @@
-"""
-A script for uploading already packaged sdists and eggs to a cheeseshop
-"""
-
-import os
-import argparse
-import collections
-import re
-import zipfile
-import tarfile
-import io
-import itertools
-import distutils.command.upload
-import distutils.command.register
-import distutils.dist
-
-import six
-from six.moves import urllib
-
-DistFile = collections.namedtuple('DistFile', 'command pyversion filename')
-
-
-# cause setuptools to monkey patch distutils
-__import__('setuptools')
-
-
-class TarGZAdapter(object):
- """
- Wrap a TarFile object to emulate a ZipFile object
- """
- def __init__(self, archive):
- self.archive = archive
-
- def open(self, filename):
- return self.archive.extractfile(filename)
-
- def namelist(self):
- return self.archive.getnames()
-
-
-def open_archive(stream, filename):
- """
- Open an archive (tarball or zip) and return the object.
- """
- name, ext = os.path.splitext(os.path.basename(filename))
-
- def targz_handler(stream):
- return TarGZAdapter(tarfile.open(fileobj=stream, mode='r:gz'))
- cls = [zipfile.ZipFile, targz_handler]['gz' in ext]
- archive = cls(stream)
- return archive
-
-
-def get_prefix_dir(archive):
- """
- Often, all files are in a single directory. If so, they'll all have
- the same prefix. Determine any such prefix.
- archive is a ZipFile
- """
- names = archive.namelist()
- shortest_name = sorted(names, key=len)[0]
- candidate_prefixes = [
- shortest_name[:length]
- for length in range(len(shortest_name), -1, -1)
- ]
- for prefix in candidate_prefixes:
- if all(name.startswith(prefix) for name in names):
- return prefix
- return ''
-
-
-class RevivedDistribution(distutils.dist.Distribution):
- def __init__(self, source_url):
- distutils.dist.Distribution.__init__(self)
- self.source_url = source_url
- self._load_metadata()
- self._update_dist_files()
-
- def _load_metadata(self):
- parsed = urllib.parse.urlparse(self.source_url)
- self.filename = parsed.path
- stream = io.BytesIO(urllib.request.urlopen(self.source_url).read())
- if self._is_remote():
- # distutils expects the file to be on the file system; make it so
- self.filename = os.path.basename(self.filename)
- with open(self.filename, 'wb') as sf:
- sf.write(stream.read())
- stream.seek(0)
- archive = open_archive(stream, self.filename)
- main_dir = get_prefix_dir(archive)
- if main_dir and not main_dir.endswith('/'):
- main_dir = main_dir + '/'
- pkg_info_file = archive.open(main_dir + 'PKG-INFO')
- self.metadata = distutils.dist.DistributionMetadata()
- stream = io.StringIO(pkg_info_file.read().decode('utf-8'))
- self.metadata.read_pkg_file(stream)
- self._clean_metadata()
-
- def _is_remote(self):
- parsed = urllib.parse.urlparse(self.source_url)
- return parsed.scheme.lower() != 'file'
-
- def _clean_metadata(self):
- """
- the long description doesn't load properly (gets unwanted indents),
- so fix it.
- """
- desc = self.metadata.get_long_description()
- if not isinstance(desc, six.text_type):
- desc = desc.decode('utf-8')
- lines = io.StringIO(desc)
-
- def trim_eight_spaces(line):
- if line.startswith(' ' * 8):
- line = line[8:]
- return line
- lines = itertools.chain(
- itertools.islice(lines, 1),
- six.moves.map(trim_eight_spaces, lines),
- )
- self.metadata.long_description = ''.join(lines)
-
- def _update_dist_files(self):
- if self.filename.endswith('.egg'):
- type = 'bdist_egg'
- sdist_exts = '.tgz', 'zip', '.tar.gz'
- if any(self.filename.endswith(ext) for ext in sdist_exts):
- type = 'sdist'
- version_pattern = re.compile(r'py\d\.\d')
- res = version_pattern.search(self.filename)
- pyversion = res.group(1) if res else ''
- distfile = DistFile(type, pyversion, self.filename)
- self.dist_files.append(distfile)
-
- def get_name(self):
- return self.package.name
-
- def get_version(self):
- return self.package.version
-
- def has_ext_modules(self):
- return False
-
- def cleanup(self):
- if self._is_remote():
- os.remove(self.filename)
-
-
-def upload_file(repository, source, **command_params):
- distribution = RevivedDistribution(source)
- upload_dist(repository, distribution, **command_params)
-
-
-def upload_dist(repository, distribution, **command_params):
- cmd = distutils.command.upload.upload(distribution)
- cmd.initialize_options()
- cmd.repository = repository
- cmd.finalize_options()
- vars(cmd).update(**command_params)
- cmd.run()
-
-
-def register_dist(repository, distribution):
- cmd = distutils.command.register.register(distribution)
- cmd.initialize_options()
- cmd.repository = repository
- cmd.finalize_options()
- cmd.run()
-
-
-def URL(spec):
- """
- If spec already looks like a URL, just return it. Otherwise, assume
- it is a filename and return it as a file url.
- """
- if urllib.parse.urlparse(spec).scheme:
- return spec
- return 'file:' + spec
-
-
-def get_args():
- parser = argparse.ArgumentParser()
- parser.add_argument('source', type=URL)
- parser.add_argument('-r', '--repository', default=None)
- parser.add_argument('--register', default=False, action='store_true')
- return parser.parse_args()
-
-
-def do_upload():
- args = get_args()
- distribution = RevivedDistribution(args.source)
- if args.register:
- register_dist(args.repository, distribution)
- upload_dist(args.repository, distribution)
- distribution.cleanup()
-
-
-if __name__ == '__main__':
- do_upload()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/jaraco/packaging/depends.py
new/jaraco.packaging-8.1.0/jaraco/packaging/depends.py
--- old/jaraco.packaging-6.1/jaraco/packaging/depends.py 2019-01-26
18:39:25.000000000 +0100
+++ new/jaraco.packaging-8.1.0/jaraco/packaging/depends.py 2020-02-16
16:58:09.000000000 +0100
@@ -14,9 +14,7 @@
text_type = getattr(__builtins__, 'unicode', str)
-req_help = (
- "A setuptools requirement spec (e.g. 'eggmonster' or "
- "'eggmonster==0.1')")
+req_help = "A setuptools requirement spec (e.g. 'eggmonster' or "
"'eggmonster==0.1')"
python_help = "Use a remote environment rather than the local one."
@@ -32,10 +30,7 @@
def print_package(requirement, indent):
r = requirement
- print(
- ' ' * indent + str(r),
- '[{0}]'.format(pkg_resources.get_distribution(r)),
- )
+ print(' ' * indent + str(r),
'[{0}]'.format(pkg_resources.get_distribution(r)))
def parse_extras(req):
@@ -77,10 +72,7 @@
if history is None:
history = set()
dist = pkg_resources.get_distribution(req)
- spec = dict(
- requirement=str(req),
- resolved=str(dist),
- )
+ spec = dict(requirement=str(req), resolved=str(dist))
if req not in history:
# traverse into children
history.add(req)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/jaraco/packaging/info.py
new/jaraco.packaging-8.1.0/jaraco/packaging/info.py
--- old/jaraco.packaging-6.1/jaraco/packaging/info.py 2019-01-26
18:39:25.000000000 +0100
+++ new/jaraco.packaging-8.1.0/jaraco/packaging/info.py 2020-02-16
16:58:09.000000000 +0100
@@ -21,9 +21,10 @@
running show
"['six>=1.4', 'setuptools']"
"""
+
description = "Report attributes of a distribution's metadata"
user_options = [
- (str('attributes='), str('a'), "space or comma-separated attributes"),
+ (str('attributes='), str('a'), "space or comma-separated attributes")
]
def finalize_options(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/jaraco/packaging/make-tree.py
new/jaraco.packaging-8.1.0/jaraco/packaging/make-tree.py
--- old/jaraco.packaging-6.1/jaraco/packaging/make-tree.py 2019-01-26
18:39:25.000000000 +0100
+++ new/jaraco.packaging-8.1.0/jaraco/packaging/make-tree.py 2020-02-16
16:58:09.000000000 +0100
@@ -9,38 +9,38 @@
def by_package_key(item):
- return by_key(item['package'])
+ return by_key(item['package'])
def by_key(item):
- return item['key']
+ return item['key']
def main():
- root, = sys.argv[1:]
- pkgs = Packages.from_defn(json.load(sys.stdin))
- json.dump(pkgs.make_tree(root), sys.stdout)
+ (root,) = sys.argv[1:]
+ pkgs = Packages.from_defn(json.load(sys.stdin))
+ json.dump(pkgs.make_tree(root), sys.stdout)
class Packages(dict):
- @classmethod
- def from_defn(cls, items):
- return cls(
- (key, next(items))
- for key, items in itertools.groupby(items,
by_package_key)
- )
-
- def make_tree(self, target):
- vars(self).setdefault('visited', set())
- root = self[target].copy()
- if target in self.visited:
- # short-circuit circular dependencies
- del root['dependencies']
- return root
- self.visited.add(target)
- deps_names = map(by_key, root['dependencies'])
- root['dependencies'] = list(map(self.make_tree, deps_names))
- return root
+ @classmethod
+ def from_defn(cls, items):
+ return cls(
+ (key, next(items))
+ for key, items in itertools.groupby(items, by_package_key)
+ )
+
+ def make_tree(self, target):
+ vars(self).setdefault('visited', set())
+ root = self[target].copy()
+ if target in self.visited:
+ # short-circuit circular dependencies
+ del root['dependencies']
+ return root
+ self.visited.add(target)
+ deps_names = map(by_key, root['dependencies'])
+ root['dependencies'] = list(map(self.make_tree, deps_names))
+ return root
__name__ == '__main__' and main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/jaraco/packaging/sphinx.py
new/jaraco.packaging-8.1.0/jaraco/packaging/sphinx.py
--- old/jaraco.packaging-6.1/jaraco/packaging/sphinx.py 2019-01-26
18:39:25.000000000 +0100
+++ new/jaraco.packaging-8.1.0/jaraco/packaging/sphinx.py 2020-02-16
16:58:09.000000000 +0100
@@ -4,6 +4,11 @@
import sys
import subprocess
+try:
+ import importlib.metadata as imp_meta
+except ImportError:
+ import importlib_metadata as imp_meta
+
if 'check_output' not in dir(subprocess):
import subprocess32 as subprocess
@@ -13,6 +18,7 @@
app.add_config_value('package_url', '', '')
app.connect('builder-inited', load_config_from_setup)
app.connect('html-page-context', add_package_url)
+ return dict(version=imp_meta.version('jaraco.packaging'),
parallel_read_safe=True)
def load_config_from_setup(app):
@@ -24,13 +30,12 @@
setup_script = os.path.join(root, 'setup.py')
fields = ['--name', '--version', '--url', '--author']
dist_info_cmd = [sys.executable, setup_script] + fields
- output = subprocess.check_output(
- dist_info_cmd,
- cwd=root,
- universal_newlines=True,
- )
+ output = subprocess.check_output(dist_info_cmd, cwd=root,
universal_newlines=True)
outputs = output.strip().split('\n')
- project, version, url, author = outputs
+ try:
+ project, version, url, author = outputs
+ except ValueError:
+ raise ValueError("Unexpected metadata output", output)
app.config.project = project
app.config.version = app.config.release = version
app.config.package_url = url
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jaraco.packaging-6.1/jaraco.packaging.egg-info/PKG-INFO
new/jaraco.packaging-8.1.0/jaraco.packaging.egg-info/PKG-INFO
--- old/jaraco.packaging-6.1/jaraco.packaging.egg-info/PKG-INFO 2019-01-26
18:39:43.000000000 +0100
+++ new/jaraco.packaging-8.1.0/jaraco.packaging.egg-info/PKG-INFO
2020-02-16 16:58:31.000000000 +0100
@@ -1,21 +1,31 @@
Metadata-Version: 2.1
Name: jaraco.packaging
-Version: 6.1
+Version: 8.1.0
Summary: tools to supplement packaging Python releases
Home-page: https://github.com/jaraco/jaraco.packaging
Author: Jason R. Coombs
Author-email: [email protected]
License: UNKNOWN
Description: .. image:: https://img.shields.io/pypi/v/jaraco.packaging.svg
- :target: https://pypi.org/project/jaraco.packaging
+ :target: `PyPI link`_
.. image:: https://img.shields.io/pypi/pyversions/jaraco.packaging.svg
+ :target: `PyPI link`_
+
+ .. _PyPI link: https://pypi.org/project/jaraco.packaging
+
+ .. image::
https://dev.azure.com/jaraco/jaraco.packaging/_apis/build/status/jaraco.jaraco.packaging?branchName=master
+ :target:
https://dev.azure.com/jaraco/jaraco.packaging/_build/latest?definitionId=1&branchName=master
.. image::
https://img.shields.io/travis/jaraco/jaraco.packaging/master.svg
:target: https://travis-ci.org/jaraco/jaraco.packaging
- .. .. image::
https://img.shields.io/appveyor/ci/jaraco/skeleton/master.svg
- .. :target:
https://ci.appveyor.com/project/jaraco/skeleton/branch/master
+ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/psf/black
+ :alt: Code style: Black
+
+ .. .. image::
https://img.shields.io/appveyor/ci/jaraco/jaraco-packaging/master.svg
+ .. :target:
https://ci.appveyor.com/project/jaraco/jaraco-packaging/branch/master
.. image::
https://readthedocs.org/projects/jaracopackaging/badge/?version=latest
:target:
https://jaracopackaging.readthedocs.io/en/latest/?badge=latest
@@ -85,9 +95,9 @@
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Framework :: Sphinx :: Extension
-Requires-Python: >=2.7
-Provides-Extra: docs
+Requires-Python: >=3.6
Provides-Extra: testing
+Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jaraco.packaging-6.1/jaraco.packaging.egg-info/SOURCES.txt
new/jaraco.packaging-8.1.0/jaraco.packaging.egg-info/SOURCES.txt
--- old/jaraco.packaging-6.1/jaraco.packaging.egg-info/SOURCES.txt
2019-01-26 18:39:43.000000000 +0100
+++ new/jaraco.packaging-8.1.0/jaraco.packaging.egg-info/SOURCES.txt
2020-02-16 16:58:31.000000000 +0100
@@ -1,10 +1,13 @@
+.coveragerc
.flake8
+.pre-commit-config.yaml
.readthedocs.yml
.travis.yml
CHANGES.rst
LICENSE
README.rst
appveyor.yml
+azure-pipelines.yml
pyproject.toml
pytest.ini
setup.cfg
@@ -22,9 +25,7 @@
jaraco.packaging.egg-info/requires.txt
jaraco.packaging.egg-info/top_level.txt
jaraco/packaging/__init__.py
-jaraco/packaging/cheese.py
jaraco/packaging/depends.py
jaraco/packaging/info.py
jaraco/packaging/make-tree.py
-jaraco/packaging/sphinx.py
-tests/test_cheese.py
\ No newline at end of file
+jaraco/packaging/sphinx.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jaraco.packaging-6.1/jaraco.packaging.egg-info/entry_points.txt
new/jaraco.packaging-8.1.0/jaraco.packaging.egg-info/entry_points.txt
--- old/jaraco.packaging-6.1/jaraco.packaging.egg-info/entry_points.txt
2019-01-26 18:39:43.000000000 +0100
+++ new/jaraco.packaging-8.1.0/jaraco.packaging.egg-info/entry_points.txt
2020-02-16 16:58:31.000000000 +0100
@@ -1,6 +1,5 @@
[console_scripts]
dependency-tree = jaraco.packaging.depends:tree_cmd
-upload-package = jaraco.packaging.cheese:do_upload
[distutils.commands]
dependency_tree = jaraco.packaging.depends:DependencyTree
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jaraco.packaging-6.1/jaraco.packaging.egg-info/requires.txt
new/jaraco.packaging-8.1.0/jaraco.packaging.egg-info/requires.txt
--- old/jaraco.packaging-6.1/jaraco.packaging.egg-info/requires.txt
2019-01-26 18:39:43.000000000 +0100
+++ new/jaraco.packaging-8.1.0/jaraco.packaging.egg-info/requires.txt
2020-02-16 16:58:31.000000000 +0100
@@ -1,6 +1,9 @@
six>=1.4
setuptools
+[:python_version < "3.8"]
+importlib_metadata
+
[docs]
sphinx
jaraco.packaging>=3.2
@@ -8,5 +11,7 @@
[testing]
pytest!=3.7.3,>=3.5
-pytest-checkdocs
+pytest-checkdocs>=1.2.3
pytest-flake8
+pytest-black-multipy
+pytest-cov
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/pyproject.toml
new/jaraco.packaging-8.1.0/pyproject.toml
--- old/jaraco.packaging-6.1/pyproject.toml 2019-01-26 18:39:25.000000000
+0100
+++ new/jaraco.packaging-8.1.0/pyproject.toml 2020-02-16 16:58:09.000000000
+0100
@@ -1,3 +1,8 @@
[build-system]
-requires = ["setuptools>=34.4", "wheel", "setuptools_scm>=1.15"]
+requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4.1"]
build-backend = "setuptools.build_meta"
+
+[tool.black]
+skip-string-normalization = true
+
+[tool.setuptools_scm]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/pytest.ini
new/jaraco.packaging-8.1.0/pytest.ini
--- old/jaraco.packaging-6.1/pytest.ini 2019-01-26 18:39:25.000000000 +0100
+++ new/jaraco.packaging-8.1.0/pytest.ini 2020-02-16 16:58:09.000000000
+0100
@@ -1,11 +1,7 @@
[pytest]
norecursedirs=dist build .tox .eggs
-addopts=--doctest-modules --flake8
+addopts=--doctest-modules --flake8 --black --cov
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
+ # workaround for https://github.com/pypa/setuptools/issues/479
+ ignore:::setuptools.depends:2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/setup.cfg
new/jaraco.packaging-8.1.0/setup.cfg
--- old/jaraco.packaging-6.1/setup.cfg 2019-01-26 18:39:43.000000000 +0100
+++ new/jaraco.packaging-8.1.0/setup.cfg 2020-02-16 16:58:31.906517500
+0100
@@ -1,6 +1,3 @@
-[bdist_wheel]
-universal = 1
-
[metadata]
license_file = LICENSE
name = jaraco.packaging
@@ -13,24 +10,30 @@
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
- Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
+ Programming Language :: Python :: 3 :: Only
Framework :: Sphinx :: Extension
+[bdist_wheel]
+python-tag = py36
+
[options]
packages = find:
include_package_data = true
-python_requires = >=2.7
+python_requires = >=3.6
install_requires =
six >= 1.4
setuptools
-setup_requires = setuptools_scm >= 1.15.0
+ importlib_metadata; python_version < "3.8"
+setup_requires = setuptools_scm[toml] >= 3.4.1
[options.extras_require]
testing =
pytest >= 3.5, !=3.7.3
- pytest-checkdocs
+ pytest-checkdocs >= 1.2.3
pytest-flake8
+ pytest-black-multipy
+ pytest-cov
docs =
sphinx
jaraco.packaging >= 3.2
@@ -39,7 +42,6 @@
[options.entry_points]
console_scripts =
dependency-tree=jaraco.packaging.depends:tree_cmd
- upload-package=jaraco.packaging.cheese:do_upload
distutils.commands =
dependency_tree=jaraco.packaging.depends:DependencyTree
show=jaraco.packaging.info:Show
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/setup.py
new/jaraco.packaging-8.1.0/setup.py
--- old/jaraco.packaging-6.1/setup.py 2019-01-26 18:39:25.000000000 +0100
+++ new/jaraco.packaging-8.1.0/setup.py 2020-02-16 16:58:09.000000000 +0100
@@ -3,4 +3,4 @@
import setuptools
if __name__ == "__main__":
- setuptools.setup(use_scm_version=True)
+ setuptools.setup()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/skeleton.md
new/jaraco.packaging-8.1.0/skeleton.md
--- old/jaraco.packaging-6.1/skeleton.md 2019-01-26 18:39:25.000000000
+0100
+++ new/jaraco.packaging-8.1.0/skeleton.md 2020-02-16 16:58:09.000000000
+0100
@@ -2,14 +2,16 @@
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
+## 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.
+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
@@ -36,7 +38,7 @@
## 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.
+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.
@@ -44,15 +46,16 @@
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
+- 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.
+- A README.rst as reStructuredText with some popular badges, but with Read the
Docs 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).
+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:
@@ -82,45 +85,77 @@
Other environments (invoked with `tox -e {name}`) supplied include:
- - a `build-docs` environment to build the documentation
+ - a `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.
+- 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:
+Relies on a .flake8 file to correct some default behaviors:
-- allow tabs for indentation (legacy for jaraco projects)
-- disable mutually incompatible rules W503 and W504.
+- 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:
+The project is pre-configured to run tests through multiple CI providers.
-```
-echo "TWINE_PASSWORD={password}" | travis encrypt
-```
+### Azure Pipelines
+
+[Azure
Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) are
the preferred provider as they provide free, fast, multi-platform services. See
azure-pipelines.yml for more details.
+
+Features include:
+
+- test against multiple Python versions
+- run on Ubuntu Bionic
+
+### Travis CI
-Or disable it in the CI definition and configure it through the web UI.
+[Travis CI](https://travis-ci.org) is configured through .travis.yml. Any new
project must be enabled either through their web site or with the `travis
enable` command.
Features include:
-- test against Python 2 and 3
+- test against Python 3
- run on Ubuntu Xenial
- correct for broken IPv6
-Also provided is a minimal template for running under Appveyor (Windows).
+### AppVeyor
+
+A minimal template for running under AppVeyor (Windows) is provided.
+
+### Continuous Deployments
+
+In addition to running tests, an additional deploy stage is configured to
automatically release tagged commits to PyPI using [API
tokens](https://pypi.org/help/#apitoken). The release process expects an
authorized token to be configured with Azure as the `Azure secrets` variable
group. This variable group needs to be created only once per organization. For
example:
+
+```
+# create a resource group if none exists
+az group create --name main --location eastus2
+# create the vault (try different names until something works)
+az keyvault create --name secrets007 --resource-group main
+# create the secret
+az keyvault secret set --vault-name secrets007 --name PyPI-token --value $token
+```
+
+Then, in the web UI for the project's Pipelines Library, create the `Azure
secrets` variable group referencing the key vault name.
+
+For more details, see [this blog
entry](https://blog.jaraco.com/configuring-azure-pipelines-with-secets/).
## 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`.
+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 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.
+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.
+
+Releases may also be cut manually by invoking the tox environment `release`
with the PyPI token set as the TWINE_PASSWORD:
+
+```
+TWINE_PASSWORD={token} tox -e release
+```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/tests/test_cheese.py
new/jaraco.packaging-8.1.0/tests/test_cheese.py
--- old/jaraco.packaging-6.1/tests/test_cheese.py 2019-01-26
18:39:25.000000000 +0100
+++ new/jaraco.packaging-8.1.0/tests/test_cheese.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-import os
-
-from six.moves import urllib
-
-from jaraco.packaging import cheese
-
-
-def test_revived_distribution():
- base = 'https://pypi.python.org/packages/source/'
- nose_timer_path = 'n/nose-timer/nose-timer-0.3.0.tar.gz'
- url = urllib.parse.urljoin(base, nose_timer_path)
- cheese.RevivedDistribution(url)
- os.remove('nose-timer-0.3.0.tar.gz')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jaraco.packaging-6.1/tox.ini
new/jaraco.packaging-8.1.0/tox.ini
--- old/jaraco.packaging-6.1/tox.ini 2019-01-26 18:39:25.000000000 +0100
+++ new/jaraco.packaging-8.1.0/tox.ini 2020-02-16 16:58:09.000000000 +0100
@@ -1,30 +1,40 @@
[tox]
envlist = python
-minversion = 2.4
+minversion = 3.2
+# https://github.com/jaraco/skeleton/issues/6
+tox_pip_extensions_ext_venv_update = true
+# Ensure that a late version of pip is used even on tox-venv.
+requires =
+ tox-pip-version>=0.0.6
+ tox-venv
+
[testenv]
deps =
- setuptools>=31.0.1
+pip_version = pip
commands =
pytest {posargs}
usedevelop = True
extras = testing
-[testenv:build-docs]
+[testenv:docs]
extras =
- docs
- testing
+ docs
+ testing
changedir = docs
commands =
- python -m sphinx . {toxinidir}/build/html
+ python -m sphinx . {toxinidir}/build/html
[testenv:release]
skip_install = True
deps =
pep517>=0.5
- # workaround for https://github.com/pypa/twine/issues/423
- git+https://github.com/pypa/twine
- path.py
+ twine[keyring]>=1.13
+ path
+passenv =
+ TWINE_PASSWORD
+setenv =
+ TWINE_USERNAME = {env:TWINE_USERNAME:__token__}
commands =
python -c "import path; path.Path('dist').rmtree_p()"
python -m pep517.build .