From 629d80f45dedc801e3fe19215ba50114b4c7b949 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Sep 2016 13:06:52 -0400 Subject: [PATCH 01/69] No need for a .gitignore file; projects may want to add one, but I recommend not having one unless the project has project-specific files to ignore. --- .gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e69de29..0000000 From 03c1cc86843bcfbb6c2a9366d285427ac006aeee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Sep 2016 21:00:50 -0400 Subject: [PATCH 02/69] Remove support for building docs, now that docs support for pypi is deprecated. I hope at some point RTD comes up with an API that once again allows automatic building of docs. --- setup.cfg | 2 +- setup.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index dcd8d12..f5ee607 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [aliases] -release = dists build_sphinx upload upload_docs +release = dists upload dists = clean --all sdist bdist_wheel test = pytest diff --git a/setup.py b/setup.py index 91e4110..1f815f2 100644 --- a/setup.py +++ b/setup.py @@ -12,9 +12,7 @@ with io.open('README.rst', encoding='utf-8') as readme: needs_pytest = {'pytest', 'test'}.intersection(sys.argv) pytest_runner = ['pytest_runner'] if needs_pytest else [] -needs_sphinx = {'release', 'build_sphinx', 'upload_docs'}.intersection(sys.argv) -sphinx = ['sphinx', 'rst.linker'] if needs_sphinx else [] -needs_wheel = {'release', 'bdist_wheel'}.intersection(sys.argv) +needs_wheel = {'release', 'bdist_wheel', 'dists'}.intersection(sys.argv) wheel = ['wheel'] if needs_wheel else [] name = 'skeleton' @@ -37,7 +35,7 @@ setup_params = dict( }, setup_requires=[ 'setuptools_scm>=1.9', - ] + pytest_runner + sphinx + wheel, + ] + pytest_runner + wheel, tests_require=[ 'pytest>=2.8', ], From 750a2b38964adc868b1a7f4570afa1532418b12c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 22 Sep 2016 10:50:07 -0500 Subject: [PATCH 03/69] Use tox instead of pytest-runner --- .travis.yml | 3 +-- pytest.ini | 2 +- setup.cfg | 1 - setup.py | 7 +------ tests/requirements.txt | 1 + tox.ini | 5 +++++ 6 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 tests/requirements.txt create mode 100644 tox.ini diff --git a/.travis.yml b/.travis.yml index 9f4c517..6c9a2cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,7 @@ python: - 2.7 - 3.5 script: -- pip install -U pytest -- python setup.py test +- tox branches: except: - skeleton diff --git a/pytest.ini b/pytest.ini index 9752c36..56a8774 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,4 @@ [pytest] -norecursedirs=*.egg .eggs dist build +norecursedirs=dist build .tox addopts=--doctest-modules doctest_optionflags=ALLOW_UNICODE ELLIPSIS diff --git a/setup.cfg b/setup.cfg index f5ee607..4659acc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,6 @@ [aliases] release = dists upload dists = clean --all sdist bdist_wheel -test = pytest [wheel] universal = 1 diff --git a/setup.py b/setup.py index 1f815f2..ec848c1 100644 --- a/setup.py +++ b/setup.py @@ -10,8 +10,6 @@ import setuptools with io.open('README.rst', encoding='utf-8') as readme: long_description = readme.read() -needs_pytest = {'pytest', 'test'}.intersection(sys.argv) -pytest_runner = ['pytest_runner'] if needs_pytest else [] needs_wheel = {'release', 'bdist_wheel', 'dists'}.intersection(sys.argv) wheel = ['wheel'] if needs_wheel else [] @@ -35,10 +33,7 @@ setup_params = dict( }, setup_requires=[ 'setuptools_scm>=1.9', - ] + pytest_runner + wheel, - tests_require=[ - 'pytest>=2.8', - ], + ] + wheel, classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/tests/requirements.txt b/tests/requirements.txt new file mode 100644 index 0000000..70bc02f --- /dev/null +++ b/tests/requirements.txt @@ -0,0 +1 @@ +pytest >= 2.8 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..dea8374 --- /dev/null +++ b/tox.ini @@ -0,0 +1,5 @@ +[testenv] +deps = + -r tests/requirements.txt + +commands = py.test From cc80be915b6912056990bf71324826e244432533 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 23 Sep 2016 10:07:39 -0500 Subject: [PATCH 04/69] Use pkg_resources to resolve the version. Requires that the necessary package metadata have been built before building docs. --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 9c7ad1b..5abe25a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import setuptools_scm +import pkg_resources extensions = [ 'sphinx.ext.autodoc', @@ -13,7 +13,7 @@ project = 'skeleton' copyright = '2016 Jason R. Coombs' # The short X.Y version. -version = setuptools_scm.get_version(root='..', relative_to=__file__) +version = pkg_resources.require(project)[0].version # The full version, including alpha/beta/rc tags. release = version From 8b4139a8132c330623631f84528a3cd8f186df9a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 23 Sep 2016 10:08:41 -0500 Subject: [PATCH 05/69] Each requirement line is passed as a single parameter to pip, so you can't have a space separating the option and its value. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index dea8374..fa7284b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [testenv] deps = - -r tests/requirements.txt + -rtests/requirements.txt commands = py.test From 4d382b3dee98d155f4057759ff015c3b6f0a15ed Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 28 Sep 2016 12:29:05 -0400 Subject: [PATCH 06/69] Python Packaging -- never do with one command what you can do with two. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6c9a2cf..d7871d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ language: python python: - 2.7 - 3.5 +install: +- pip install tox script: - tox branches: From 12196ba3c3e116a2514ed9fd22c6ed60539e9160 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 30 Sep 2016 15:52:25 -0400 Subject: [PATCH 07/69] Provide a reference to the license declaration in the readme. Fixes jaraco/skeleton#1. --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index 1c5d10e..bb3d912 100644 --- a/README.rst +++ b/README.rst @@ -7,3 +7,7 @@ .. image:: https://img.shields.io/travis/jaraco/skeleton/master.svg :target: http://travis-ci.org/jaraco/skeleton + +License is indicated in the project metadata (typically one or more +of the Trove classifiers). For more details, see `this explanation +`_. From c4fd3f3cf414e2ee08ad53bd71cf9c201c69ca6f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 30 Sep 2016 16:14:13 -0400 Subject: [PATCH 08/69] Use usedevelop to workaround tox-dev/tox#373 --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index fa7284b..564f205 100644 --- a/tox.ini +++ b/tox.ini @@ -3,3 +3,4 @@ deps = -rtests/requirements.txt commands = py.test +usedevelop = True From 96984072229ae07471373da73cad377a0cb324ef Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Oct 2016 09:28:19 -0500 Subject: [PATCH 09/69] Incorporate pre-release of setuptools to cause releases to include the PEP-420 deferral. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d7871d8..87881db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ python: - 3.5 install: - pip install tox +- pip install https://github.com/pypa/setuptools/releases/download/v28.2.0b1/setuptools-28.2.0b1-py2.py3-none-any.whl script: - tox branches: From 1d7afbebd6530015d76ce93d88aa7a7c48c29717 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Oct 2016 12:16:38 -0700 Subject: [PATCH 10/69] Just upgrade to released setuptools now. --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87881db..0c33b1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,7 @@ python: - 2.7 - 3.5 install: -- pip install tox -- pip install https://github.com/pypa/setuptools/releases/download/v28.2.0b1/setuptools-28.2.0b1-py2.py3-none-any.whl +- pip install tox "setuptools>=28.2" script: - tox branches: From 9be6e615930bdecb69cf4da887eefd0d53c425bd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 21:40:51 -0400 Subject: [PATCH 11/69] Exclude versions of setuptools_scm due to pypa/setuptools_scm#109. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ec848c1..27ace5f 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ setup_params = dict( extras_require={ }, setup_requires=[ - 'setuptools_scm>=1.9', + 'setuptools_scm>=1.9,!=1.13.1,!=1.14.0', ] + wheel, classifiers=[ "Development Status :: 5 - Production/Stable", From aa1f8ebe0d2d3f49a36535b61824f2fece3bdd46 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 23:03:42 -0400 Subject: [PATCH 12/69] Allow passing posargs --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 564f205..d740130 100644 --- a/tox.ini +++ b/tox.ini @@ -2,5 +2,5 @@ deps = -rtests/requirements.txt -commands = py.test +commands = py.test {posargs} usedevelop = True From 60c7c186c133551cf0637354a642e49406f814b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Oct 2016 20:16:20 -0400 Subject: [PATCH 13/69] Need a later version of setuptools_scm until it's released. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0c33b1c..0a6cb29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ script: branches: except: - skeleton +before_deploy: +- pip install https://dl.dropboxusercontent.com/u/54081/cheeseshop/setuptools_scm-1.14.1b1.tar.gz deploy: provider: pypi server: https://upload.pypi.org/legacy/ From 42ecbe7706cd756c5c3dff103fa3ff65e8a02349 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 20 Oct 2016 15:38:47 -0400 Subject: [PATCH 14/69] Update to setuptools_scm 1.15.0rc1 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0a6cb29..6effc44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ branches: except: - skeleton before_deploy: -- pip install https://dl.dropboxusercontent.com/u/54081/cheeseshop/setuptools_scm-1.14.1b1.tar.gz +- pip install https://github.com/pypa/setuptools_scm/archive/v1.15.0rc1.tar.gz deploy: provider: pypi server: https://upload.pypi.org/legacy/ From 95fd34c61f8d9df2e9c559b3978c85e7d03cd8d8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 20 Oct 2016 17:13:15 -0400 Subject: [PATCH 15/69] Gotta get an sdist - so use one jaraco built --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6effc44..cad38c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ branches: except: - skeleton before_deploy: -- pip install https://github.com/pypa/setuptools_scm/archive/v1.15.0rc1.tar.gz +- pip install https://dl.dropboxusercontent.com/u/54081/cheeseshop/setuptools_scm-1.15.0rc1.tar.gz deploy: provider: pypi server: https://upload.pypi.org/legacy/ From 200e6a525161b355d37862c9aee22c84e1413af4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Oct 2016 10:07:33 -0400 Subject: [PATCH 16/69] Bump to setuptools_scm 1.15.0. --- .travis.yml | 2 -- setup.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index cad38c8..0c33b1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,6 @@ script: branches: except: - skeleton -before_deploy: -- pip install https://dl.dropboxusercontent.com/u/54081/cheeseshop/setuptools_scm-1.15.0rc1.tar.gz deploy: provider: pypi server: https://upload.pypi.org/legacy/ diff --git a/setup.py b/setup.py index 27ace5f..83a22f6 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ setup_params = dict( extras_require={ }, setup_requires=[ - 'setuptools_scm>=1.9,!=1.13.1,!=1.14.0', + 'setuptools_scm>=1.15.0', ] + wheel, classifiers=[ "Development Status :: 5 - Production/Stable", From 4ee40ca2d13c2c8b544ad5f880193f5c0864648a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 4 Nov 2016 09:49:30 -0400 Subject: [PATCH 17/69] Update config to support building on ReadTheDocs --- docs/conf.py | 2 +- docs/requirements.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 docs/requirements.txt diff --git a/docs/conf.py b/docs/conf.py index 5abe25a..aa34def 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ release = version master_doc = 'index' link_files = { - 'CHANGES.rst': dict( + '../CHANGES.rst': dict( using=dict( GH='https://github.com', project=project, diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..442df9f --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +rst.linker From 18cb65f8f1c1eaf7b79a33fb5a2b7cbd1f851868 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 4 Nov 2016 10:16:12 -0400 Subject: [PATCH 18/69] Add note about the broken docs problem. --- README.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.rst b/README.rst index bb3d912..5196a10 100644 --- a/README.rst +++ b/README.rst @@ -8,6 +8,20 @@ .. image:: https://img.shields.io/travis/jaraco/skeleton/master.svg :target: http://travis-ci.org/jaraco/skeleton + +License +======= + License is indicated in the project metadata (typically one or more of the Trove classifiers). For more details, see `this explanation `_. + +Docs +==== + +There's `no good mechanism for publishing documentation +`_ +easily. If there's a documentation link above, it's probably +stale because PyPI-based documentation is deprecated. This +project may have documentation published at ReadTheDocs, but +probably not. Good luck finding it. From a50fb1c894f7985bb71edf8d0ce60ef4f350b745 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 Dec 2016 14:40:27 -0500 Subject: [PATCH 19/69] Skip upload docs as it's deprecated anyway --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 0c33b1c..13ebb8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,3 +20,4 @@ deploy: user: jaraco # supply password with `travis encrypt --add deploy.password` distributions: dists + skip_upload_docs: true From 99ffa27f0e7bd2eae63c84a0ded567eba4a2394b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 23 Dec 2016 08:25:01 -0500 Subject: [PATCH 20/69] Remove rant about docs. If there's no link to the docs, then this is the docs. --- README.rst | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/README.rst b/README.rst index 5196a10..0e0e26e 100644 --- a/README.rst +++ b/README.rst @@ -15,13 +15,3 @@ License License is indicated in the project metadata (typically one or more of the Trove classifiers). For more details, see `this explanation `_. - -Docs -==== - -There's `no good mechanism for publishing documentation -`_ -easily. If there's a documentation link above, it's probably -stale because PyPI-based documentation is deprecated. This -project may have documentation published at ReadTheDocs, but -probably not. Good luck finding it. From 6245d0966d8dfb0fa2893c8a3e7d760c31d134d7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 23 Dec 2016 08:28:03 -0500 Subject: [PATCH 21/69] Prefer get_distribution --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index aa34def..46d614b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,7 +13,7 @@ project = 'skeleton' copyright = '2016 Jason R. Coombs' # The short X.Y version. -version = pkg_resources.require(project)[0].version +version = pkg_resources.get_distribution(project).version # The full version, including alpha/beta/rc tags. release = version From 3da8cf4a6f14abf5da05c9d46f3362dcc43d71a4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 23 Dec 2016 08:42:35 -0500 Subject: [PATCH 22/69] No longer rely on the package being installed to retrieve the version. Instead, load the project name and version by invoking the setup script. --- docs/conf.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 46d614b..adc9df7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,7 +1,9 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import pkg_resources +import os +import sys +import subprocess extensions = [ 'sphinx.ext.autodoc', @@ -9,11 +11,15 @@ extensions = [ ] # General information about the project. -project = 'skeleton' + +root = os.path.join(os.path.dirname(__file__), '..') +setup_script = os.path.join(root, 'setup.py') +dist_info_cmd = [sys.executable, setup_script, '--name', '--version'] +output_bytes = subprocess.check_output(dist_info_cmd, cwd=root) +project, version = output_bytes.decode('utf-8').split() + copyright = '2016 Jason R. Coombs' -# The short X.Y version. -version = pkg_resources.get_distribution(project).version # The full version, including alpha/beta/rc tags. release = version From fbadf0344d4b9ac6917e8546b5529c20082f4733 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 23 Dec 2016 08:44:55 -0500 Subject: [PATCH 23/69] Also get the URL from the project metadata --- docs/conf.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index adc9df7..d52e40d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,9 +14,9 @@ extensions = [ root = os.path.join(os.path.dirname(__file__), '..') setup_script = os.path.join(root, 'setup.py') -dist_info_cmd = [sys.executable, setup_script, '--name', '--version'] +dist_info_cmd = [sys.executable, setup_script, '--name', '--version', '--url'] output_bytes = subprocess.check_output(dist_info_cmd, cwd=root) -project, version = output_bytes.decode('utf-8').split() +project, version, url = output_bytes.decode('utf-8').split() copyright = '2016 Jason R. Coombs' @@ -30,11 +30,12 @@ link_files = { using=dict( GH='https://github.com', project=project, + url=url, ), replace=[ dict( pattern=r"(Issue )?#(?P\d+)", - url='{GH}/jaraco/{project}/issues/{issue}', + url='{url}/issues/{issue}', ), dict( pattern=r"^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n", From b2c592d84bc5f7c16a70b6d593fb320c5559eeee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 23 Dec 2016 08:47:03 -0500 Subject: [PATCH 24/69] Also grab the author from the package metadata --- docs/conf.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d52e40d..23a2447 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,11 +14,12 @@ extensions = [ root = os.path.join(os.path.dirname(__file__), '..') setup_script = os.path.join(root, 'setup.py') -dist_info_cmd = [sys.executable, setup_script, '--name', '--version', '--url'] +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 = output_bytes.decode('utf-8').split() +project, version, url, author = output_bytes.decode('utf-8').split() -copyright = '2016 Jason R. Coombs' +copyright = '2016 ' + author # The full version, including alpha/beta/rc tags. release = version From b1133de832c3960777b9db80c070885c4bedd7c4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 23 Dec 2016 08:57:20 -0500 Subject: [PATCH 25/69] Strip the trailing newline and then split on newline. --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 23a2447..7402f72 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,7 +17,7 @@ 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').split() +project, version, url, author = output_bytes.decode('utf-8').strip().split('\n') copyright = '2016 ' + author From 84b53d90527040c58c4236698c95cb6cd1f2736d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Jan 2017 15:54:14 -0500 Subject: [PATCH 26/69] Default upload URL is now in Python 3.6. Use that. --- setup.cfg | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 4659acc..e080324 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,6 +4,3 @@ dists = clean --all sdist bdist_wheel [wheel] universal = 1 - -[upload] -repository = https://upload.pypi.org/legacy/ From 5853c7e7e738bc641f95835f239b04d8c7a853e3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Jan 2017 09:31:05 -0500 Subject: [PATCH 27/69] setup is already present in the module name. Just call them params. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 83a22f6..4524367 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ wheel = ['wheel'] if needs_wheel else [] name = 'skeleton' description = '' -setup_params = dict( +params = dict( name=name, use_scm_version=True, author="Jason R. Coombs", @@ -45,4 +45,4 @@ setup_params = dict( }, ) if __name__ == '__main__': - setuptools.setup(**setup_params) + setuptools.setup(**params) From 746dd7999f9db23276144ee2160920bd01ed860c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Jan 2017 19:56:28 -0500 Subject: [PATCH 28/69] Use Python 3.6 by default --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 13ebb8a..91ba39a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ sudo: false language: python python: - 2.7 -- 3.5 +- 3.6 install: - pip install tox "setuptools>=28.2" script: @@ -16,7 +16,7 @@ deploy: on: tags: true all_branches: true - python: 3.5 + python: 3.6 user: jaraco # supply password with `travis encrypt --add deploy.password` distributions: dists From 9f6eea591eaae483be11d13ebad06958a6a1e2c8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 19 Jan 2017 11:13:08 -0500 Subject: [PATCH 29/69] No longer rely on setup_requires for wheel. --- setup.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 4524367..157ecb2 100644 --- a/setup.py +++ b/setup.py @@ -3,16 +3,12 @@ # Project skeleton maintained at https://github.com/jaraco/skeleton import io -import sys import setuptools with io.open('README.rst', encoding='utf-8') as readme: long_description = readme.read() -needs_wheel = {'release', 'bdist_wheel', 'dists'}.intersection(sys.argv) -wheel = ['wheel'] if needs_wheel else [] - name = 'skeleton' description = '' @@ -33,7 +29,7 @@ params = dict( }, setup_requires=[ 'setuptools_scm>=1.15.0', - ] + wheel, + ], classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", From 21a4e86e6fef7fba92afb4bcb49d79859d0cb2b2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 23 Jan 2017 07:10:36 -0500 Subject: [PATCH 30/69] Add PEP substitution in changelog. --- docs/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 7402f72..8639b2c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -42,6 +42,10 @@ link_files = { pattern=r"^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n", with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n", ), + dict( + pattern=r"PEP[- ](?P\d+)", + url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', + ), ], ), } From ee0d8647d8537b9de2aeafeba4acd74910f98a4f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Jan 2017 20:59:15 -0500 Subject: [PATCH 31/69] Add support for Python 2.6 in docs conf --- docs/conf.py | 3 +++ tests/requirements.txt | 1 + 2 files changed, 4 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 8639b2c..7402c7a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,6 +5,9 @@ import os import sys import subprocess +if 'check_output' not in dir(subprocess): + import subprocess32 as subprocess + extensions = [ 'sphinx.ext.autodoc', 'rst.linker', diff --git a/tests/requirements.txt b/tests/requirements.txt index 70bc02f..ab48405 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1 +1,2 @@ pytest >= 2.8 +subprocess32; python_version=="2.6" From e690b031cc3c07b657dc235252a284d8023a38dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Feb 2017 12:29:49 -0500 Subject: [PATCH 32/69] Set the origin date once and forget it. --- docs/conf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 7402c7a..bf6ae64 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,6 +4,7 @@ import os import sys import subprocess +import datetime if 'check_output' not in dir(subprocess): import subprocess32 as subprocess @@ -22,7 +23,10 @@ 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') -copyright = '2016 ' + author +origin_date = datetime.date(2017,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 From b728c5892b394392044b245cba43f46740efb851 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Mar 2017 13:33:19 -0400 Subject: [PATCH 33/69] Add python_requires directive. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 157ecb2..892b6b3 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,7 @@ params = dict( packages=setuptools.find_packages(), include_package_data=True, namespace_packages=name.split('.')[:-1], + python_requires='>=2.7', install_requires=[ ], extras_require={ From 59c37d70f1140bf18b9a48398cc4502ebce91b5e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 Mar 2017 14:36:54 -0400 Subject: [PATCH 34/69] Don't bother with copyright year(s). Let the repository history track the changes and copyright years. YAGNI. --- docs/conf.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index bf6ae64..fc94797 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,10 +23,7 @@ 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(2017,1,1) -today = datetime.date.today() - -copyright = '{origin_date.year}-{today.year} {author}'.format(**locals()) +copyright = author # The full version, including alpha/beta/rc tags. release = version From 049284c6c440217c4f686b61c0980b5e0100626b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 Mar 2017 14:39:02 -0400 Subject: [PATCH 35/69] Include the project (for docstrings). Include Sphinx (for environments where it's not an implied provision). --- docs/requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index 442df9f..c11e755 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1,3 @@ +. +sphinx rst.linker From b9bcd869482ea0ff636c8848896a94e24a6fbfca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 Mar 2017 14:40:02 -0400 Subject: [PATCH 36/69] Include pytest-sugar for nicer test output. --- tests/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/requirements.txt b/tests/requirements.txt index ab48405..6d65b37 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,2 +1,3 @@ pytest >= 2.8 +pytest-sugar subprocess32; python_version=="2.6" From 908cf4ad0e27813933ada7cc9f16ebce9ac0c6cc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 30 Mar 2017 04:36:53 -0400 Subject: [PATCH 37/69] Rely on jaraco.packaging for loading the package metadata from the package for Sphinx. --- docs/conf.py | 27 ++------------------------- docs/requirements.txt | 3 ++- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index fc94797..0e11c82 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,46 +1,23 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import os -import sys -import subprocess -import datetime - -if 'check_output' not in dir(subprocess): - import subprocess32 as subprocess - extensions = [ 'sphinx.ext.autodoc', + 'jaraco.packaging.sphinx', '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') - -copyright = author - -# The full version, including alpha/beta/rc tags. -release = version - master_doc = 'index' link_files = { '../CHANGES.rst': dict( using=dict( GH='https://github.com', - project=project, - url=url, ), replace=[ dict( pattern=r"(Issue )?#(?P\d+)", - url='{url}/issues/{issue}', + url='{package_url}/issues/{issue}', ), dict( pattern=r"^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n", diff --git a/docs/requirements.txt b/docs/requirements.txt index c11e755..e7b6a74 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ . sphinx -rst.linker +jaraco.packaging>=3.2 +rst.linker>=1.9 From 689f700fcfcdfcdc7d027f204a9654b101ac9ecb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 30 Mar 2017 04:43:46 -0400 Subject: [PATCH 38/69] Use single-quotes to satisfy the style nazis. --- docs/conf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0e11c82..8bc8298 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,15 +16,15 @@ link_files = { ), replace=[ dict( - pattern=r"(Issue )?#(?P\d+)", + pattern=r'(Issue )?#(?P\d+)', url='{package_url}/issues/{issue}', ), dict( - pattern=r"^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n", - with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n", + pattern=r'^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n', + with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n', ), dict( - pattern=r"PEP[- ](?P\d+)", + pattern=r'PEP[- ](?P\d+)', url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', ), ], From 23dae906a2563a2da30e0d67490fa009576f6439 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 30 Mar 2017 20:41:18 -0400 Subject: [PATCH 39/69] The requirement is no longer needed for tests. --- tests/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 6d65b37..d9e0f33 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,3 +1,2 @@ pytest >= 2.8 pytest-sugar -subprocess32; python_version=="2.6" From fbe7cb7fa1c0f4e30f6ac6e886c49ab6491aa959 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 21 Apr 2017 12:21:45 -0400 Subject: [PATCH 40/69] Add readthedocs yml file --- .readthedocs.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .readthedocs.yml diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..e83d731 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,3 @@ +requirements_file: docs/requirements.txt +python: + version: 3 From 243e44fdb797ae54a08eb02d924f88e775e74ba9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 21 Apr 2017 12:31:54 -0400 Subject: [PATCH 41/69] Move requirements for docs and testing into extras --- .readthedocs.yml | 4 +++- docs/requirements.txt | 4 ---- setup.py | 9 +++++++++ tests/requirements.txt | 2 -- tox.ini | 4 +--- 5 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 docs/requirements.txt delete mode 100644 tests/requirements.txt diff --git a/.readthedocs.yml b/.readthedocs.yml index e83d731..8ae4468 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,3 +1,5 @@ -requirements_file: docs/requirements.txt python: version: 3 + extra_requirements: + - docs + pip_install: true diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index e7b6a74..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -. -sphinx -jaraco.packaging>=3.2 -rst.linker>=1.9 diff --git a/setup.py b/setup.py index 892b6b3..2bed3f7 100644 --- a/setup.py +++ b/setup.py @@ -27,6 +27,15 @@ params = dict( install_requires=[ ], extras_require={ + 'testing': [ + 'pytest>=2.8', + 'pytest-sugar', + ], + 'docs': [ + 'sphinx', + 'jaraco.packaging>=3.2', + 'rst.linker>=1.9', + ], }, setup_requires=[ 'setuptools_scm>=1.15.0', diff --git a/tests/requirements.txt b/tests/requirements.txt deleted file mode 100644 index d9e0f33..0000000 --- a/tests/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pytest >= 2.8 -pytest-sugar diff --git a/tox.ini b/tox.ini index d740130..8efcba6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,4 @@ [testenv] -deps = - -rtests/requirements.txt - commands = py.test {posargs} usedevelop = True +extras = testing From 3383a3aceb435cef929c13dff3e54e46af01cf49 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 26 Apr 2017 10:29:35 -0400 Subject: [PATCH 42/69] Add appveyor script for CI testing on Windows. --- appveyor.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..e856af3 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,19 @@ +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 + +test_script: + - "python -m pip install tox" + - "tox" From 110cb56c59e99c5d0c630612f8593a7ef55ce732 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 28 Apr 2017 19:21:34 -0400 Subject: [PATCH 43/69] Require tox 2.4 or later; fixes #2. --- tox.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tox.ini b/tox.ini index 8efcba6..1ae06ef 100644 --- a/tox.ini +++ b/tox.ini @@ -1,3 +1,6 @@ +[tox] +minversion = 2.4 + [testenv] commands = py.test {posargs} usedevelop = True From c84284022a198d560e685c5a687458a5be4c5fe6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 May 2017 21:42:53 -0400 Subject: [PATCH 44/69] Remove namespace_packages declaration, no longer needed. --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 2bed3f7..a7aeae1 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,6 @@ params = dict( url="https://github.com/jaraco/" + name, packages=setuptools.find_packages(), include_package_data=True, - namespace_packages=name.split('.')[:-1], python_requires='>=2.7', install_requires=[ ], From 31fb9d19ee7751ced7a0339268b2cd7b3ceb4701 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jun 2017 14:02:51 -0400 Subject: [PATCH 45/69] Use a simple build number rather than prefixing with '1.0.' --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index e856af3..0a8ce5c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,3 +17,5 @@ build: off test_script: - "python -m pip install tox" - "tox" + +version: '{build}' From 16d68a9fd19e6a726cc86fd1e3ec5f2d24788345 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 14 Aug 2017 08:14:57 -0400 Subject: [PATCH 46/69] Restore support for namespace package declaration, selected on a 'nspkg_technique' setting --- setup.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.py b/setup.py index a7aeae1..72d901c 100644 --- a/setup.py +++ b/setup.py @@ -11,6 +11,11 @@ with io.open('README.rst', encoding='utf-8') as readme: name = 'skeleton' description = '' +nspkg_technique = 'native' +""" +Does this package use "native" namespace packages or +pkg_resources "managed" namespace packages? +""" params = dict( name=name, @@ -22,6 +27,10 @@ params = dict( url="https://github.com/jaraco/" + name, packages=setuptools.find_packages(), include_package_data=True, + namespace_packages=( + name.split('.')[:-1] if nspkg_technique == 'managed' + else [] + ), python_requires='>=2.7', install_requires=[ ], From 250cb960021233160e78a6f2c2780cfc1c964b9c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 26 Aug 2017 15:35:09 -0400 Subject: [PATCH 47/69] Inspired by pypa/setuptools#1059, use the preferred bdist_wheel heading. --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index e080324..b0c90cb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,5 +2,5 @@ release = dists upload dists = clean --all sdist bdist_wheel -[wheel] +[bdist_wheel] universal = 1 From 88d315ae9adab430bd36722da8c6ab74c2e79cf0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 13 Sep 2017 04:24:11 -0400 Subject: [PATCH 48/69] Check the docs during tests --- setup.py | 1 + tox.ini | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 72d901c..75f2371 100644 --- a/setup.py +++ b/setup.py @@ -38,6 +38,7 @@ params = dict( 'testing': [ 'pytest>=2.8', 'pytest-sugar', + 'collective.checkdocs', ], 'docs': [ 'sphinx', diff --git a/tox.ini b/tox.ini index 1ae06ef..16bf78a 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,8 @@ minversion = 2.4 [testenv] -commands = py.test {posargs} +commands = + py.test {posargs} + python setup.py checkdocs usedevelop = True extras = testing From 835393c93e4fec867b5e2e0a638e7a14994c6b1d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 18 Sep 2017 18:05:16 -0400 Subject: [PATCH 49/69] Use stages in travis to have deployment depend on success in all Python versions. --- .travis.yml | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 91ba39a..e2914e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,32 @@ +dist: trusty sudo: false language: python -python: -- 2.7 -- 3.6 + +jobs: + fast_finish: true + include: + - python: 2.7 + - python: &latest_py3 3.6 + - stage: deploy + if: tag IS present + python: *latest_py3 + install: skip + script: skip + before_deploy: python bootstrap.py + deploy: + provider: pypi + on: + tags: true + all_branches: true + user: jaraco + # supply password with `travis encrypt --add deploy.password` + distributions: dists + skip_cleanup: true + skip_upload_docs: true + +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 - # supply password with `travis encrypt --add deploy.password` - distributions: dists - skip_upload_docs: true +- pip install tox + +script: tox From a419524c69e7c2f8b9327ff2f6ec9f61e89c9c30 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Sep 2017 19:46:21 -0400 Subject: [PATCH 50/69] Remove 'bootstrap', artifact from setuptools --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e2914e2..7932518 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ jobs: python: *latest_py3 install: skip script: skip - before_deploy: python bootstrap.py deploy: provider: pypi on: From a953d1baa6c6cd2b4b9e5f06378a706b3555259d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 21 Sep 2017 16:36:17 -0400 Subject: [PATCH 51/69] --add doesn't work in a list --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7932518..d4eecec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,8 @@ jobs: tags: true all_branches: true user: jaraco - # supply password with `travis encrypt --add deploy.password` + password: + secure: ... # encrypt password with `travis encrypt` distributions: dists skip_cleanup: true skip_upload_docs: true From 5dc924c102a23d06cafd8e0850f0f35582cbd9aa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 26 Sep 2017 12:02:30 +0100 Subject: [PATCH 52/69] Add a license file. Fixes jaraco/skeleton#1. --- LICENSE | 7 +++++++ README.rst | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5e795a6 --- /dev/null +++ b/LICENSE @@ -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 --git a/README.rst b/README.rst index 0e0e26e..1c5d10e 100644 --- a/README.rst +++ b/README.rst @@ -7,11 +7,3 @@ .. image:: https://img.shields.io/travis/jaraco/skeleton/master.svg :target: http://travis-ci.org/jaraco/skeleton - - -License -======= - -License is indicated in the project metadata (typically one or more -of the Trove classifiers). For more details, see `this explanation -`_. From d149ed4d5dc659c81d0567b227523d95ee8e04c3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Oct 2017 12:13:14 -0400 Subject: [PATCH 53/69] Remove downloads shield, no longer available. --- README.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.rst b/README.rst index 1c5d10e..5161ae5 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,5 @@ .. image:: https://img.shields.io/pypi/pyversions/skeleton.svg -.. image:: https://img.shields.io/pypi/dm/skeleton.svg - .. image:: https://img.shields.io/travis/jaraco/skeleton/master.svg :target: http://travis-ci.org/jaraco/skeleton From 34958ccc94b8c473ebf8adcdc35b82b6023d8702 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Oct 2017 19:47:02 -0400 Subject: [PATCH 54/69] Add documentation badge. --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index 5161ae5..bcdb31e 100644 --- a/README.rst +++ b/README.rst @@ -5,3 +5,6 @@ .. image:: https://img.shields.io/travis/jaraco/skeleton/master.svg :target: http://travis-ci.org/jaraco/skeleton + +.. image:: https://readthedocs.org/projects/skeleton/badge/?version=latest + :target: http://skeleton.readthedocs.io/en/latest/?badge=latest From 6c36336e9fc45048ad43e4ff494c9d1ffc14fc49 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 13 Nov 2017 09:14:44 -0500 Subject: [PATCH 55/69] Normalize indentation in docs/conf.py --- docs/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8bc8298..14744ee 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,9 +2,9 @@ # -*- coding: utf-8 -*- extensions = [ - 'sphinx.ext.autodoc', - 'jaraco.packaging.sphinx', - 'rst.linker', + 'sphinx.ext.autodoc', + 'jaraco.packaging.sphinx', + 'rst.linker', ] master_doc = 'index' From 99622ab0e3d295a3ec17f69fb21dc68c94cc7fda Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 15 Nov 2017 10:26:38 -0500 Subject: [PATCH 56/69] Declare 'python' factor at top level --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d4eecec..c7ed90b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,11 +2,12 @@ dist: trusty sudo: false language: python +python: +- 2.7 +- &latest_py3 3.6 + jobs: fast_finish: true - include: - - python: 2.7 - - python: &latest_py3 3.6 - stage: deploy if: tag IS present python: *latest_py3 From ce5e0eb6ef5943bfa15edf5f9ea3f74e71ab00e4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 16 Nov 2017 13:17:16 -0500 Subject: [PATCH 57/69] Correct travis syntax --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c7ed90b..61180db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ python: jobs: fast_finish: true + include: - stage: deploy if: tag IS present python: *latest_py3 From b4b4c1116886f7cb10729a2d42272e41618ca20f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 16 Nov 2017 15:45:57 -0500 Subject: [PATCH 58/69] reference the license file in metadata --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.cfg b/setup.cfg index b0c90cb..378a8e4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,3 +4,6 @@ dists = clean --all sdist bdist_wheel [bdist_wheel] universal = 1 + +[metadata] +license_file = LICENSE From dd475b7ad1784a564929c711781eebd9b85ba063 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jan 2018 19:32:19 -0500 Subject: [PATCH 59/69] Use https --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index bcdb31e..043561d 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ .. image:: https://img.shields.io/pypi/pyversions/skeleton.svg .. image:: https://img.shields.io/travis/jaraco/skeleton/master.svg - :target: http://travis-ci.org/jaraco/skeleton + :target: https://travis-ci.org/jaraco/skeleton .. image:: https://readthedocs.org/projects/skeleton/badge/?version=latest - :target: http://skeleton.readthedocs.io/en/latest/?badge=latest + :target: https://skeleton.readthedocs.io/en/latest/?badge=latest From 97c492d425da509f96f554a66499d13723d147bf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jan 2018 19:32:38 -0500 Subject: [PATCH 60/69] Add build-docs env in tox. --- tox.ini | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tox.ini b/tox.ini index 16bf78a..c3b6d2e 100644 --- a/tox.ini +++ b/tox.ini @@ -7,3 +7,11 @@ commands = python setup.py checkdocs usedevelop = True extras = testing + +[testenv:build-docs] +extras = + docs + testing +changedir = docs +commands = + python -m sphinx . {toxinidir}/build/html From 63659653697e9037ed5cb5a770dc00b07c77e5a9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Jan 2018 15:34:05 -0500 Subject: [PATCH 61/69] Run only default environment by default. --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index c3b6d2e..7cccd42 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,5 @@ [tox] +envlist = python minversion = 2.4 [testenv] From 99d850f0ed9852993626d4869e9f096e1643be6d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 17 Jan 2018 09:55:12 -0500 Subject: [PATCH 62/69] To support namespace packages, Setuptools must be 31.0.1. This change is necessary with the adoption of tox-venv, which uses Python's venv, which does not install the latest setuptools by default. --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 7cccd42..df1b0ef 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,8 @@ envlist = python minversion = 2.4 [testenv] +deps = + setuptools>=31.0.1 commands = py.test {posargs} python setup.py checkdocs From bbc018de3cbee4bccdcbb58b637c0c659e6e37e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Jan 2018 11:59:01 -0500 Subject: [PATCH 63/69] Need to avoid .eggs in recursing dirs. Ref pypa/setuptools_scm#212. --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 56a8774..1b2f624 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,4 @@ [pytest] -norecursedirs=dist build .tox +norecursedirs=dist build .tox .eggs addopts=--doctest-modules doctest_optionflags=ALLOW_UNICODE ELLIPSIS From b9aba822c7e154d1ad185585fe7642947b3c5265 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 29 Jan 2018 09:06:00 -0500 Subject: [PATCH 64/69] Use tox-venv for future compatibility. --- .travis.yml | 2 +- appveyor.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 61180db..85540ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,6 @@ jobs: cache: pip install: -- pip install tox +- pip install tox tox-venv script: tox diff --git a/appveyor.yml b/appveyor.yml index 0a8ce5c..3d55a92 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,7 +15,7 @@ install: build: off test_script: - - "python -m pip install tox" + - "python -m pip install tox tox-venv" - "tox" version: '{build}' From 34ab781f8768ab5101f087cfffe7e38b94048a7f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Feb 2018 09:28:53 -0500 Subject: [PATCH 65/69] Disable pytest-sugar until Frozenball/pytest-sugar#133 is addressed. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 75f2371..e07ba77 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ params = dict( extras_require={ 'testing': [ 'pytest>=2.8', - 'pytest-sugar', + # 'pytest-sugar', 'collective.checkdocs', ], 'docs': [ From 3902aabd7f5c4cb0f4aba8d2785da98e87cb7d6a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Feb 2018 13:24:23 -0500 Subject: [PATCH 66/69] Bring back pytest-sugar with a minimum version to support Pytest 3.4. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e07ba77..9e73e23 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ params = dict( extras_require={ 'testing': [ 'pytest>=2.8', - # 'pytest-sugar', + 'pytest-sugar>=0.9.1', 'collective.checkdocs', ], 'docs': [ From a8f66602f22459be95f8463e8cf6de1e653b352c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Feb 2018 08:45:54 -0500 Subject: [PATCH 67/69] Save the pip cache across builds. Ref pypa/setuptools#1279. --- appveyor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 3d55a92..2b7808f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,6 +14,9 @@ install: build: off +cache: + - '%LOCALAPPDATA%\pip\Cache' + test_script: - "python -m pip install tox tox-venv" - "tox" From 41b814aa6cff3c46788a1d410095061a82af2076 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 28 Feb 2018 09:43:16 -0500 Subject: [PATCH 68/69] Add workaround for build failures on Python 3.7 (yaml/pyyaml#126). --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index df1b0ef..47eae51 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,8 @@ minversion = 2.4 [testenv] deps = setuptools>=31.0.1 + # workaround for yaml/pyyaml#126 + # git+https://github.com/yaml/pyyaml@master#egg=pyyaml commands = py.test {posargs} python setup.py checkdocs From 40da2c65007ccc250c7d897d497ef2b3fb58f3d4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Mar 2018 13:33:07 -0500 Subject: [PATCH 69/69] Run flake8 with tests. Add flake8 config to ignore common exclusions. Add comments to testing and docs extras to aid with merges. --- .flake8 | 2 ++ pytest.ini | 2 +- setup.py | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..e9955e7 --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +ignore = W191,W503 diff --git a/pytest.ini b/pytest.ini index 1b2f624..0ba22c3 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,4 @@ [pytest] norecursedirs=dist build .tox .eggs -addopts=--doctest-modules +addopts=--doctest-modules --flake8 doctest_optionflags=ALLOW_UNICODE ELLIPSIS diff --git a/setup.py b/setup.py index 9e73e23..c5ad4b1 100644 --- a/setup.py +++ b/setup.py @@ -36,14 +36,21 @@ params = dict( ], extras_require={ 'testing': [ + # upstream 'pytest>=2.8', 'pytest-sugar>=0.9.1', 'collective.checkdocs', + 'pytest-flake8', + + # local ], 'docs': [ + # upstream 'sphinx', 'jaraco.packaging>=3.2', 'rst.linker>=1.9', + + # local ], }, setup_requires=[