Hello community,
here is the log from the commit of package python-check-manifest for
openSUSE:Factory checked in at 2019-05-13 14:49:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-check-manifest (Old)
and /work/SRC/openSUSE:Factory/.python-check-manifest.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-check-manifest"
Mon May 13 14:49:57 2019 rev:2 rq:701746 version:0.38
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-check-manifest/python-check-manifest.changes
2018-10-08 17:50:51.526068291 +0200
+++
/work/SRC/openSUSE:Factory/.python-check-manifest.new.5148/python-check-manifest.changes
2019-05-13 14:49:59.186705074 +0200
@@ -1,0 +2,13 @@
+Wed May 8 15:09:17 UTC 2019 - John Vandenberg <[email protected]>
+
+- Remove unnecessary bcond test
+- Add optional VCS dependencies to BuildDepends and Suggests
+- Use fdupes
+- Revise Summary replacing confusing 'MANIFEST in' with MANIFEST.in
+- Update to v0.38
+ * Add Python 3.7 support
+ * Drop Python 3.4 support.
+ * Added GitHub templates to default ignore patterns
+ * Added reading check-manifest config out of tox.ini or pyproject.toml
+
+-------------------------------------------------------------------
Old:
----
check-manifest-0.37.tar.gz
New:
----
check-manifest-0.38.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-check-manifest.spec ++++++
--- /var/tmp/diff_new_pack.1cimki/_old 2019-05-13 14:49:59.746706484 +0200
+++ /var/tmp/diff_new_pack.1cimki/_new 2019-05-13 14:49:59.750706494 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-check-manifest
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,26 +12,33 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%bcond_without test
Name: python-check-manifest
-Version: 0.37
+Version: 0.38
Release: 0
-Summary: Check MANIFEST in a Python source package for completeness
+Summary: Check Python source package MANIFEST.in for completeness
License: MIT
Group: Development/Languages/Python
Url: https://github.com/mgedmin/check-manifest
Source:
https://files.pythonhosted.org/packages/source/c/check-manifest/check-manifest-%{version}.tar.gz
+BuildRequires: %{python_module mock}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module toml}
+BuildRequires: bzr
+BuildRequires: fdupes
+BuildRequires: git-core
+BuildRequires: mercurial
+BuildRequires: subversion
BuildRequires: python-rpm-macros
-%if %{with test}
-BuildRequires: %{python_module mock}
-BuildRequires: git
-%endif
+Requires: python-toml
+Suggests: bzr
+Suggests: git-core
+Suggests: mercurial
+Suggests: subversion
BuildArch: noarch
%python_subpackages
@@ -42,24 +49,21 @@
%prep
%setup -q -n check-manifest-%{version}
-#sed -ie "s,#!/usr/bin/env python,##!/usr/bin/python3," check_manifest.py
sed -i '1{\,^#!/usr/bin/env python,d}' check_manifest.py
+chmod -x check_manifest.py
%build
%python_build
%install
%python_install
-chmod -x %{buildroot}%{python_sitelib}/check_manifest.py
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
-%if %{with test}
%check
export LANG=en_US.UTF-8
%python_exec setup.py test
-%endif
%files %{python_files}
-%defattr(-,root,root,-)
%doc CHANGES.rst README.rst
%license LICENSE.rst
%python3_only %{_bindir}/check-manifest
++++++ check-manifest-0.37.tar.gz -> check-manifest-0.38.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/.coveragerc
new/check-manifest-0.38/.coveragerc
--- old/check-manifest-0.37/.coveragerc 2016-09-10 21:49:41.000000000 +0200
+++ new/check-manifest-0.38/.coveragerc 2018-11-09 10:54:43.000000000 +0100
@@ -1,3 +1,6 @@
+[run]
+source = check_manifest
+
[report]
exclude_lines =
pragma: nocover
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/.gitignore
new/check-manifest-0.38/.gitignore
--- old/check-manifest-0.37/.gitignore 2017-09-05 18:33:53.000000000 +0200
+++ new/check-manifest-0.38/.gitignore 2019-04-12 21:45:08.000000000 +0200
@@ -1,3 +1,5 @@
+.idea/
+.vscode/
*.pyc
__pycache__/
.tox/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/.travis.yml
new/check-manifest-0.38/.travis.yml
--- old/check-manifest-0.37/.travis.yml 2018-04-04 08:42:43.000000000 +0200
+++ new/check-manifest-0.38/.travis.yml 2019-04-23 11:11:47.000000000 +0200
@@ -1,23 +1,28 @@
language: python
-sudo: false
+sudo: required
+dist: xenial
+cache: pip
python:
- 2.7
- - 3.4
- 3.5
- 3.6
- - 3.7-dev
- - pypy
- - pypy3
+ - 3.7
+ # have to be very specific about pypy versions because
+ # https://github.com/travis-ci/travis-ci/issues/9452
+ - pypy2.7-5.10.0
+ - pypy3.5
env:
- FORCE_TEST_VCS=bzr
- FORCE_TEST_VCS=git
- FORCE_TEST_VCS=hg
- FORCE_TEST_VCS=svn
install:
- - pip install coverage coveralls mock
+ - pip install coverage coveralls mock flake8
script:
- - SKIP_NO_TESTS=1 coverage run --source=check_manifest setup.py test -q
- - coverage run --source=check_manifest --append check_manifest.py
+ - SKIP_NO_TESTS=1 coverage run setup.py test -q
+ - coverage report -m
+ - python check_manifest.py
+ - flake8 *.py
after_script:
- coveralls
notifications:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/CHANGES.rst
new/check-manifest-0.38/CHANGES.rst
--- old/check-manifest-0.37/CHANGES.rst 2018-04-12 15:08:29.000000000 +0200
+++ new/check-manifest-0.38/CHANGES.rst 2019-04-23 11:18:19.000000000 +0200
@@ -2,6 +2,18 @@
=========
+0.38 (2019-04-23)
+-----------------
+
+- Add Python 3.7 support.
+
+- Drop Python 3.4 support.
+
+- Added GitHub templates to default ignore patterns.
+
+- Added reading check-manifest config out of ``tox.ini`` or ``pyproject.toml``.
+
+
0.37 (2018-04-12)
-----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/Makefile
new/check-manifest-0.38/Makefile
--- old/check-manifest-0.37/Makefile 2017-12-19 17:29:45.000000000 +0100
+++ new/check-manifest-0.38/Makefile 2019-04-12 21:45:08.000000000 +0200
@@ -8,7 +8,7 @@
.PHONY: check test
test:
- detox
+ tox -p auto
check:
SKIP_NO_TESTS=1 tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/PKG-INFO
new/check-manifest-0.38/PKG-INFO
--- old/check-manifest-0.37/PKG-INFO 2018-04-12 15:12:27.000000000 +0200
+++ new/check-manifest-0.38/PKG-INFO 2019-04-23 11:29:11.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: check-manifest
-Version: 0.37
+Version: 0.38
Summary: Check MANIFEST.in in a Python source package for completeness
Home-page: https://github.com/mgedmin/check-manifest
Author: Marius Gedminas
@@ -82,20 +82,30 @@
Configuration
-------------
- You can tell check-manifest to ignore certain file patterns by adding a
- ``check-manifest`` section to your package's ``setup.cfg``. Example::
+ You can configure check-manifest to ignore certain file patterns using
+ a ``[tool.check-manifest]`` section in your ``pyproject.toml`` file or
+ a ``[check-manifest]`` section in either ``setup.cfg`` or
+ ``tox.ini``. Examples::
+
+ # pyproject.toml
+ [tool.check-manifest]
+ ignore = [".travis.yml"]
+ # setup.cfg or tox.ini
[check-manifest]
ignore =
.travis.yml
+ Note that lists are newline separated in the ``setup.cfg`` and
+ ``tox.ini`` files.
+
The following options are recognized:
ignore
- A list of newline separated filename patterns that will be ignored
by
- check-manifest. Use this if you want to keep files in your version
- control system that shouldn't be included in your source
distributions.
- The default ignore list is ::
+ A list of filename patterns that will be ignored by check-manifest.
+ Use this if you want to keep files in your version control system
+ that shouldn't be included in your source distributions. The
+ default ignore list is ::
PKG-INFO
*.egg-info
@@ -107,6 +117,7 @@
.gitignore
.bzrignore
.gitattributes
+ .github/*
.travis.yml
Jenkinsfile
*.mo
@@ -116,10 +127,10 @@
ignore list instead of adding to it.
ignore-bad-ideas
- A list of newline separated filename patterns that will be ignored
by
- check-manifest's generated files check. Use this if you want to
keep
- generated files in your version control system, even though it is
generally
- a bad idea.
+ A list of filename patterns that will be ignored by
+ check-manifest's generated files check. Use this if you want to
+ keep generated files in your version control system, even though
+ it is generally a bad idea.
.. |buildstatus| image::
https://api.travis-ci.org/mgedmin/check-manifest.svg?branch=master
@@ -132,11 +143,22 @@
.. _coverage: https://coveralls.io/r/mgedmin/check-manifest
-
Changelog
=========
+ 0.38 (2019-04-23)
+ -----------------
+
+ - Add Python 3.7 support.
+
+ - Drop Python 3.4 support.
+
+ - Added GitHub templates to default ignore patterns.
+
+ - Added reading check-manifest config out of ``tox.ini`` or
``pyproject.toml``.
+
+
0.37 (2018-04-12)
-----------------
@@ -477,11 +499,13 @@
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/README.rst
new/check-manifest-0.38/README.rst
--- old/check-manifest-0.37/README.rst 2017-09-05 18:33:53.000000000 +0200
+++ new/check-manifest-0.38/README.rst 2019-04-23 11:04:24.000000000 +0200
@@ -74,20 +74,30 @@
Configuration
-------------
-You can tell check-manifest to ignore certain file patterns by adding a
-``check-manifest`` section to your package's ``setup.cfg``. Example::
+You can configure check-manifest to ignore certain file patterns using
+a ``[tool.check-manifest]`` section in your ``pyproject.toml`` file or
+a ``[check-manifest]`` section in either ``setup.cfg`` or
+``tox.ini``. Examples::
+
+ # pyproject.toml
+ [tool.check-manifest]
+ ignore = [".travis.yml"]
+ # setup.cfg or tox.ini
[check-manifest]
ignore =
.travis.yml
+Note that lists are newline separated in the ``setup.cfg`` and
+``tox.ini`` files.
+
The following options are recognized:
ignore
- A list of newline separated filename patterns that will be ignored by
- check-manifest. Use this if you want to keep files in your version
- control system that shouldn't be included in your source distributions.
- The default ignore list is ::
+ A list of filename patterns that will be ignored by check-manifest.
+ Use this if you want to keep files in your version control system
+ that shouldn't be included in your source distributions. The
+ default ignore list is ::
PKG-INFO
*.egg-info
@@ -99,6 +109,7 @@
.gitignore
.bzrignore
.gitattributes
+ .github/*
.travis.yml
Jenkinsfile
*.mo
@@ -108,10 +119,10 @@
ignore list instead of adding to it.
ignore-bad-ideas
- A list of newline separated filename patterns that will be ignored by
- check-manifest's generated files check. Use this if you want to keep
- generated files in your version control system, even though it is generally
- a bad idea.
+ A list of filename patterns that will be ignored by
+ check-manifest's generated files check. Use this if you want to
+ keep generated files in your version control system, even though
+ it is generally a bad idea.
.. |buildstatus| image::
https://api.travis-ci.org/mgedmin/check-manifest.svg?branch=master
@@ -122,4 +133,3 @@
.. |coverage| image::
https://coveralls.io/repos/mgedmin/check-manifest/badge.svg?branch=master
.. _coverage: https://coveralls.io/r/mgedmin/check-manifest
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/appveyor.yml
new/check-manifest-0.38/appveyor.yml
--- old/check-manifest-0.37/appveyor.yml 2018-04-04 08:59:40.000000000
+0200
+++ new/check-manifest-0.38/appveyor.yml 2019-04-23 11:11:47.000000000
+0200
@@ -5,9 +5,9 @@
# https://www.appveyor.com/docs/installed-software#python lists available
# versions
- PYTHON: "C:\\Python27"
- - PYTHON: "C:\\Python34"
- PYTHON: "C:\\Python35"
- PYTHON: "C:\\Python36"
+ - PYTHON: "C:\\Python37"
init:
- "echo %PYTHON%"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/check_manifest.egg-info/PKG-INFO
new/check-manifest-0.38/check_manifest.egg-info/PKG-INFO
--- old/check-manifest-0.37/check_manifest.egg-info/PKG-INFO 2018-04-12
15:12:27.000000000 +0200
+++ new/check-manifest-0.38/check_manifest.egg-info/PKG-INFO 2019-04-23
11:29:11.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: check-manifest
-Version: 0.37
+Version: 0.38
Summary: Check MANIFEST.in in a Python source package for completeness
Home-page: https://github.com/mgedmin/check-manifest
Author: Marius Gedminas
@@ -82,20 +82,30 @@
Configuration
-------------
- You can tell check-manifest to ignore certain file patterns by adding a
- ``check-manifest`` section to your package's ``setup.cfg``. Example::
+ You can configure check-manifest to ignore certain file patterns using
+ a ``[tool.check-manifest]`` section in your ``pyproject.toml`` file or
+ a ``[check-manifest]`` section in either ``setup.cfg`` or
+ ``tox.ini``. Examples::
+
+ # pyproject.toml
+ [tool.check-manifest]
+ ignore = [".travis.yml"]
+ # setup.cfg or tox.ini
[check-manifest]
ignore =
.travis.yml
+ Note that lists are newline separated in the ``setup.cfg`` and
+ ``tox.ini`` files.
+
The following options are recognized:
ignore
- A list of newline separated filename patterns that will be ignored
by
- check-manifest. Use this if you want to keep files in your version
- control system that shouldn't be included in your source
distributions.
- The default ignore list is ::
+ A list of filename patterns that will be ignored by check-manifest.
+ Use this if you want to keep files in your version control system
+ that shouldn't be included in your source distributions. The
+ default ignore list is ::
PKG-INFO
*.egg-info
@@ -107,6 +117,7 @@
.gitignore
.bzrignore
.gitattributes
+ .github/*
.travis.yml
Jenkinsfile
*.mo
@@ -116,10 +127,10 @@
ignore list instead of adding to it.
ignore-bad-ideas
- A list of newline separated filename patterns that will be ignored
by
- check-manifest's generated files check. Use this if you want to
keep
- generated files in your version control system, even though it is
generally
- a bad idea.
+ A list of filename patterns that will be ignored by
+ check-manifest's generated files check. Use this if you want to
+ keep generated files in your version control system, even though
+ it is generally a bad idea.
.. |buildstatus| image::
https://api.travis-ci.org/mgedmin/check-manifest.svg?branch=master
@@ -132,11 +143,22 @@
.. _coverage: https://coveralls.io/r/mgedmin/check-manifest
-
Changelog
=========
+ 0.38 (2019-04-23)
+ -----------------
+
+ - Add Python 3.7 support.
+
+ - Drop Python 3.4 support.
+
+ - Added GitHub templates to default ignore patterns.
+
+ - Added reading check-manifest config out of ``tox.ini`` or
``pyproject.toml``.
+
+
0.37 (2018-04-12)
-----------------
@@ -477,11 +499,13 @@
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/check-manifest-0.37/check_manifest.egg-info/requires.txt
new/check-manifest-0.38/check_manifest.egg-info/requires.txt
--- old/check-manifest-0.37/check_manifest.egg-info/requires.txt
2018-04-12 15:12:27.000000000 +0200
+++ new/check-manifest-0.38/check_manifest.egg-info/requires.txt
2019-04-23 11:29:11.000000000 +0200
@@ -1,3 +1,4 @@
+toml
[test]
mock
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/check_manifest.py
new/check-manifest-0.38/check_manifest.py
--- old/check-manifest-0.37/check_manifest.py 2018-04-12 15:08:29.000000000
+0200
+++ new/check-manifest-0.38/check_manifest.py 2019-04-23 11:18:19.000000000
+0200
@@ -41,8 +41,10 @@
# Python 3.x
import configparser as ConfigParser
+import toml
-__version__ = '0.37'
+
+__version__ = '0.38'
__author__ = 'Marius Gedminas <[email protected]>'
__licence__ = 'MIT'
__url__ = 'https://github.com/mgedmin/check-manifest'
@@ -529,6 +531,8 @@
# it's not a problem if the sdist is lacking these files:
'.hgtags', '.hgsigs', '.hgignore', '.gitignore', '.bzrignore',
'.gitattributes',
+ '.github', # GitHub template files
+ '.github/*', # GitHub template files
'.travis.yml',
'Jenkinsfile',
# it's convenient to ship compiled .mo files in sdists, but they shouldn't
@@ -587,22 +591,59 @@
def read_config():
- """Read configuration from setup.cfg."""
+ """Read configuration from file if possible."""
# XXX modifies global state, which is kind of evil
- config = ConfigParser.ConfigParser()
- config.read(['setup.cfg'])
- if not config.has_section(CFG_SECTION_CHECK_MANIFEST):
- return
- if (config.has_option(*CFG_IGNORE_DEFAULT_RULES)
- and config.getboolean(*CFG_IGNORE_DEFAULT_RULES)):
+ config = _load_config()
+ if config.get(CFG_IGNORE_DEFAULT_RULES[1], False):
del IGNORE[:]
- if config.has_option(*CFG_IGNORE):
- patterns = [p.strip() for p in config.get(*CFG_IGNORE).splitlines()]
- IGNORE.extend(p for p in patterns if p)
- if config.has_option(*CFG_IGNORE_BAD_IDEAS):
- lines = config.get(*CFG_IGNORE_BAD_IDEAS).splitlines()
- patterns = [p.strip() for p in lines]
- IGNORE_BAD_IDEAS.extend(p for p in patterns if p)
+ if CFG_IGNORE[1] in config:
+ IGNORE.extend(p for p in config[CFG_IGNORE[1]] if p)
+ if CFG_IGNORE_BAD_IDEAS[1] in config:
+ IGNORE_BAD_IDEAS.extend(p for p in config[CFG_IGNORE_BAD_IDEAS[1]] if
p)
+
+
+def _load_config():
+ """Searches for config files, reads them and returns a dictionary
+
+ Looks for a ``check-manifest`` section in ``pyproject.toml``,
+ ``setup.cfg``, and ``tox.ini``, in that order. The first file
+ that exists and has that section will be loaded and returned as a
+ dictionary.
+
+ """
+ if os.path.exists("pyproject.toml"):
+ config = toml.load("pyproject.toml")
+ if CFG_SECTION_CHECK_MANIFEST in config.get("tool", {}):
+ return config["tool"][CFG_SECTION_CHECK_MANIFEST]
+
+ search_files = ['setup.cfg', 'tox.ini']
+ config_parser = ConfigParser.ConfigParser()
+ for filename in search_files:
+ if (config_parser.read([filename])
+ and config_parser.has_section(CFG_SECTION_CHECK_MANIFEST)):
+ config = {}
+
+ if config_parser.has_option(*CFG_IGNORE_DEFAULT_RULES):
+ ignore_defaults =
config_parser.getboolean(*CFG_IGNORE_DEFAULT_RULES)
+ config[CFG_IGNORE_DEFAULT_RULES[1]] = ignore_defaults
+
+ if config_parser.has_option(*CFG_IGNORE):
+ patterns = [
+ p.strip()
+ for p in config_parser.get(*CFG_IGNORE).splitlines()
+ ]
+ config[CFG_IGNORE[1]] = patterns
+
+ if config_parser.has_option(*CFG_IGNORE_BAD_IDEAS):
+ patterns = [
+ p.strip()
+ for p in
config_parser.get(*CFG_IGNORE_BAD_IDEAS).splitlines()
+ ]
+ config[CFG_IGNORE_BAD_IDEAS[1]] = patterns
+
+ return config
+
+ return {}
def read_manifest():
@@ -714,8 +755,8 @@
# of sub directories. We could use a regexp, but
# two ignores seems easier.
ignore.append(dirname + os.path.sep + pattern)
- ignore.append(dirname + os.path.sep + '*' + os.path.sep +
- pattern)
+ ignore.append(
+ dirname + os.path.sep + '*' + os.path.sep + pattern)
elif cmd == 'prune':
# rest is considered to be a directory name. It should
# not contain a path separator, as it actually has no
@@ -732,8 +773,8 @@
def file_matches(filename, patterns):
"""Does this filename match any of the patterns?"""
- return any(fnmatch.fnmatch(filename, pat) or
- fnmatch.fnmatch(os.path.basename(filename), pat)
+ return any(fnmatch.fnmatch(filename, pat)
+ or fnmatch.fnmatch(os.path.basename(filename), pat)
for pat in patterns)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/release.mk
new/check-manifest-0.38/release.mk
--- old/check-manifest-0.37/release.mk 2017-12-19 18:36:48.000000000 +0100
+++ new/check-manifest-0.38/release.mk 2018-11-03 15:11:29.000000000 +0100
@@ -1,6 +1,7 @@
-# Makefile.rules version 1.0 (2017-12-19)
+# release.mk version 1.3 (2018-11-03)
#
# Helpful Makefile rules for releasing Python packages.
+# https://github.com/mgedmin/python-project-skel
# You might want to change these
FILE_WITH_VERSION ?= setup.py
@@ -10,15 +11,19 @@
# These should be fine
PYTHON ?= python
-PYPI_PUBLISH ?= rm -rf dist && $(PYTHON) setup.py -q sdist bdist_wheel &&
twine upload dist/* && $(VCS_TAG) `$(PYTHON) setup.py --version`
+PYPI_PUBLISH ?= rm -rf dist && $(PYTHON) setup.py -q sdist bdist_wheel &&
twine check dist/* && twine upload dist/*
+LATEST_RELEASE_MK_URL =
https://raw.githubusercontent.com/mgedmin/python-project-skel/master/release.mk
# These should be fine, as long as you use Git
VCS_GET_LATEST ?= git pull
VCS_STATUS ?= git status --porcelain
VCS_EXPORT ?= git archive --format=tar --prefix=tmp/tree/ HEAD | tar -xf -
-VCS_TAG ?= git tag -s
+VCS_TAG ?= git tag -s $(changelog_ver) -m \"Release $(changelog_ver)\"
VCS_COMMIT_AND_PUSH ?= git commit -av -m "Post-release version bump" && git
push && git push --tags
+# These are internal implementation details
+changelog_ver = `$(PYTHON) setup.py --version`
+changelog_date = `LC_ALL=C date +'$(CHANGELOG_DATE_FORMAT)'`
.PHONY: dist
@@ -50,7 +55,7 @@
$(VCS_EXPORT) && \
cd tmp && \
tar -xzf ../dist/$$pkg_and_version.tar.gz && \
- diff -ur $$pkg_and_version tree -x PKG-INFO -x setup.cfg -x
'*.egg-info' && \
+ diff -ur $$pkg_and_version tree -x PKG-INFO -x setup.cfg -x
'*.egg-info' -I'^#' && \
cd $$pkg_and_version && \
make dist check && \
cd .. && \
@@ -60,13 +65,16 @@
cd ../two/ && \
tar -xzf ../$$pkg_and_version/dist/$$pkg_and_version.tar.gz && \
cd .. && \
- diff -ur one two -x SOURCES.txt && \
+ diff -ur one two -x SOURCES.txt -I'^#:' && \
cd .. && \
rm -rf tmp && \
echo "sdist seems to be ok"
-# NB: do not use $(MAKE) because then make -n releasechecklist will
-# actually run the distcheck instead of just printing what it does
+.PHONY: check-latest-rules
+check-latest-rules:
+ifndef FORCE
+ @curl -s $(LATEST_RELEASE_MK_URL) | cmp -s release.mk || { printf
"\nYour release.mk does not match the latest version
at\n$(LATEST_RELEASE_MK_URL)\n\n" 1>&2; exit 1; }
+endif
.PHONY: check-latest-version
check-latest-version:
@@ -81,17 +89,17 @@
check-long-description:
@$(PYTHON) setup.py --long-description | rst2html --exit-status=2 >
/dev/null
-changelog_ver = `$(PYTHON) setup.py --version`
-changelog_date = `LC_ALL=C date +'$(CHANGELOG_DATE_FORMAT)'`
-
.PHONY: check-changelog
check-changelog:
@ver_and_date="$(CHANGELOG_FORMAT)" && \
grep -q "^$$ver_and_date$$" $(FILE_WITH_CHANGELOG) || { \
echo "$(FILE_WITH_CHANGELOG) has no entry for $$ver_and_date";
exit 1; }
+# NB: do not use $(MAKE) because then make -n releasechecklist will
+# actually run the distcheck instead of just printing what it does
+
.PHONY: releasechecklist
-releasechecklist: check-latest-version check-version-number
check-long-description check-changelog
+releasechecklist: check-latest-rules check-latest-version check-version-number
check-long-description check-changelog
make distcheck
.PHONY: release
@@ -106,6 +114,7 @@
@echo "Please run"
@echo
@echo " $(PYPI_PUBLISH)"
+ @echo " $(VCS_TAG)"
@echo
@echo "Please increment the version number in $(FILE_WITH_VERSION)"
@echo "and add a new empty entry at the top of the changelog in
$(FILE_WITH_CHANGELOG), then"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/setup.cfg
new/check-manifest-0.38/setup.cfg
--- old/check-manifest-0.37/setup.cfg 2018-04-12 15:12:27.000000000 +0200
+++ new/check-manifest-0.38/setup.cfg 2019-04-23 11:29:11.000000000 +0200
@@ -1,11 +1,14 @@
[bdist_wheel]
universal = 1
+[metadata]
+license_file = LICENSE.rst
+
[nosetests]
with-doctest = 1
exe = 1
-[pytest]
+[tool:pytest]
norecursedirs = dist build tmp .* *.egg-info
python_files = tests.py check_manifest.py
addopts = --doctest-modules --ignore=setup.py
@@ -14,7 +17,7 @@
python-file-with-version = check_manifest.py
[flake8]
-ignore = E241,E501,E261,E126,E127,E128,E302
+ignore = E241,E501,E261,E126,E127,E128,E302,W503
[egg_info]
tag_build =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/setup.py
new/check-manifest-0.38/setup.py
--- old/check-manifest-0.37/setup.py 2018-04-04 08:44:17.000000000 +0200
+++ new/check-manifest-0.38/setup.py 2019-04-23 11:15:40.000000000 +0200
@@ -1,12 +1,11 @@
#!/usr/bin/env python
-import os, re, ast, email.utils, sys
-from setuptools import setup
+import ast
+import email.utils
+import os
+import re
-if sys.version_info < (2, 7):
- sys.exit("Python 2.7 or newer is required for check-manifest")
+from setuptools import setup
-if (3, 0) <= sys.version_info < (3, 4):
- sys.exit("Python 3.4 or newer is required for check-manifest")
here = os.path.dirname(__file__)
@@ -38,18 +37,14 @@
'linter'],
classifiers=[
'Development Status :: 4 - Beta',
-## 'Development Status :: 5 - Production/Stable', eventually...
'Environment :: Console',
'Intended Audience :: Developers',
- 'License :: OSI Approved :: GNU General Public License (GPL)'
- if licence.startswith('GPL') else
- 'License :: OSI Approved :: MIT License'
- if licence.startswith('MIT') else
- 'License :: uhh, dunno', # fail PyPI upload intentionally until fixed
+ 'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
@@ -61,7 +56,8 @@
py_modules=['check_manifest'],
zip_safe=False,
test_suite='tests.test_suite',
- install_requires=[],
+ python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
+ install_requires=['toml'],
extras_require={
'test': ['mock'],
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/tests.py
new/check-manifest-0.38/tests.py
--- old/check-manifest-0.37/tests.py 2018-04-12 14:51:25.000000000 +0200
+++ new/check-manifest-0.38/tests.py 2019-04-23 11:15:49.000000000 +0200
@@ -287,6 +287,9 @@
def test_strip_sdist_extras(self):
from check_manifest import strip_sdist_extras
filelist = list(map(os.path.normpath, [
+ '.github',
+ '.github/ISSUE_TEMPLATE',
+ '.github/ISSUE_TEMPLATE/bug_report.md',
'.gitignore',
'.travis.yml',
'setup.py',
@@ -329,6 +332,7 @@
recursive-exclude src/zope *.sh
""")
filelist = list(map(os.path.normpath, [
+ '.github/ISSUE_TEMPLATE/bug_report.md',
'.gitignore',
'setup.py',
'setup.cfg',
@@ -614,21 +618,35 @@
check_manifest.read_config()
self.assertEqual(check_manifest.IGNORE, ['default-ignore-rules'])
- def test_read_config_no_section(self):
+ def test_read_setup_config_no_section(self):
import check_manifest
with open('setup.cfg', 'w') as f:
f.write('[pep8]\nignore =\n')
check_manifest.read_config()
self.assertEqual(check_manifest.IGNORE, ['default-ignore-rules'])
- def test_read_config_no_option(self):
+ def test_read_pyproject_config_no_section(self):
+ import check_manifest
+ with open('pyproject.toml', 'w') as f:
+ f.write('[tool.pep8]\nignore = []\n')
+ check_manifest.read_config()
+ self.assertEqual(check_manifest.IGNORE, ['default-ignore-rules'])
+
+ def test_read_setup_config_no_option(self):
import check_manifest
with open('setup.cfg', 'w') as f:
f.write('[check-manifest]\n')
check_manifest.read_config()
self.assertEqual(check_manifest.IGNORE, ['default-ignore-rules'])
- def test_read_config_extra_ignores(self):
+ def test_read_pyproject_config_no_option(self):
+ import check_manifest
+ with open('pyproject.toml', 'w') as f:
+ f.write('[tool.check-manifest]\n')
+ check_manifest.read_config()
+ self.assertEqual(check_manifest.IGNORE, ['default-ignore-rules'])
+
+ def test_read_setup_config_extra_ignores(self):
import check_manifest
with open('setup.cfg', 'w') as f:
f.write('[check-manifest]\nignore = foo\n bar\n')
@@ -636,7 +654,15 @@
self.assertEqual(check_manifest.IGNORE,
['default-ignore-rules', 'foo', 'bar'])
- def test_read_config_override_ignores(self):
+ def test_read_pyproject_config_extra_ignores(self):
+ import check_manifest
+ with open('pyproject.toml', 'w') as f:
+ f.write('[tool.check-manifest]\nignore = ["foo", "bar"]\n')
+ check_manifest.read_config()
+ self.assertEqual(check_manifest.IGNORE,
+ ['default-ignore-rules', 'foo', 'bar'])
+
+ def test_read_setup_config_override_ignores(self):
import check_manifest
with open('setup.cfg', 'w') as f:
f.write('[check-manifest]\nignore = foo\n\n bar\n')
@@ -645,7 +671,16 @@
self.assertEqual(check_manifest.IGNORE,
['foo', 'bar'])
- def test_read_config_ignore_bad_ideas(self):
+ def test_read_pyproject_config_override_ignores(self):
+ import check_manifest
+ with open('pyproject.toml', 'w') as f:
+ f.write('[tool.check-manifest]\nignore = ["foo", "bar"]\n')
+ f.write('ignore-default-rules = true\n')
+ check_manifest.read_config()
+ self.assertEqual(check_manifest.IGNORE,
+ ['foo', 'bar'])
+
+ def test_read_setup_config_ignore_bad_ideas(self):
import check_manifest
with open('setup.cfg', 'w') as f:
f.write('[check-manifest]\n'
@@ -655,6 +690,14 @@
check_manifest.read_config()
self.assertEqual(check_manifest.IGNORE_BAD_IDEAS, ['foo', 'bar'])
+ def test_read_pyproject_config_ignore_bad_ideas(self):
+ import check_manifest
+ with open('pyproject.toml', 'w') as f:
+ f.write('[tool.check-manifest]\n'
+ 'ignore-bad-ideas = ["foo", "bar"]\n')
+ check_manifest.read_config()
+ self.assertEqual(check_manifest.IGNORE_BAD_IDEAS, ['foo', 'bar'])
+
def test_read_manifest_no_manifest(self):
import check_manifest
check_manifest.read_manifest()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-manifest-0.37/tox.ini
new/check-manifest-0.38/tox.ini
--- old/check-manifest-0.37/tox.ini 2018-04-04 08:43:14.000000000 +0200
+++ new/check-manifest-0.38/tox.ini 2019-04-23 11:11:46.000000000 +0200
@@ -1,29 +1,30 @@
[tox]
envlist =
- py27,py34,py35,py36,pypy,pypy3
+ py27,py35,py36,py37,pypy,pypy3,flake8
[testenv]
passenv = LANG LC_CTYPE LC_ALL MSYSTEM
+extras = test
deps =
- mock
nose
commands =
nosetests {posargs}
-## if I run check-manifest here, it breaks my 'make release' :(
-## check-manifest
[testenv:coverage]
deps =
{[testenv]deps}
coverage
commands =
- coverage run --source=check_manifest -m nose
-## since I'm not running check-manifest during regular tests, let's not lie
-## about the coverage numbers
-## coverage run --append check_manifest.py
+ coverage run -m nose
coverage report -m --fail-under=100
[testenv:py]
commands =
python --version
nosetests {posargs}
+
+
+[testenv:flake8]
+skip_install = true
+deps = flake8
+commands = flake8 *.py