--- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,24 +7,32 @@ build-ubuntu: strategy: matrix: - python: [3.6, 3.7, 3.8] - name: Build (Python ${{ matrix.python }}) - runs-on: ubuntu-18.04 + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + name: Build (Python ${{ matrix.python-version }}) + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - - name: Set up Python + with: + fetch-depth: 0 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: - python-version: '${{ matrix.python }}' + python-version: '${{ matrix.python-version }}' + - name: Display Python version + run: python -c "import sys; print(sys.version)" - name: Install dependencies shell: bash run: | sudo apt-get update - sudo apt-get install -y notmuch python3-notmuch python3-venv + sudo apt-get install -y notmuch python3-notmuch python3-venv flake8 python3 -m venv env source ./env/bin/activate - pip install setuptools pytest dkimpy + pip install setuptools setuptools_scm pytest dkimpy ln -s /usr/lib/python3/dist-packages/notmuch ./env/lib/python*/site-packages + - name: flake8 lint + run: | + source ./env/bin/activate + flake8 --ignore=E501,W504 afew/ - name: Tests run: | source ./env/bin/activate @@ -38,20 +46,9 @@ run: | source ./env/bin/activate python setup.py install - - name: Generate coverage report - run: | - source ./env/bin/activate - pip install pytest-cov - pytest --cov=./ --cov-report=xml - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - file: ./coverage.xml - flags: unittests - name: codecov-umbrella - fail_ci_if_error: true - name: Docs run: | source ./env/bin/activate pip install sphinx - python setup.py build_sphinx -b html,man + sphinx-build -b html docs $(mktemp -d) + sphinx-build -b man docs $(mktemp -d) --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release + +on: + release: + types: + - published + +jobs: + release: + needs: [build-ubuntu] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools setuptools_scm wheel twine + - name: Build and publish (testpypi) + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.testpypi_token }} + TWINE_REPOSITORY: testpypi + run: | + python setup.py sdist + twine upload dist/* --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,22 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# We recommend specifying your dependencies to enable reproducible builds: +# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +# python: +# install: +# - requirements: docs/requirements.txt --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,26 @@ +afew 3.1.0 (unreleased) +======================= + +Python 3.6 support dropped + + afew stopped supporting the older python version 3.6. + +Handle DMARC report with empty spf or dkim XML nodes + +DMARC Filter: allow to define subject regexp + + Some DMARC report mail have a prefix before "Dmarc Report" in the subject + and where not checked by the plugin. + Afew now allows the user to define the suject regexp in the config file. + +Get notmuch database path using Database wrapper + + This allows FolderNameFilter to work with a relative path in database.path of notmuch config file. + +HeaderMatchingFilter: do not convert user supplied tags + + This prevents afew to lowercase the tags defined by the user, allowing to have non lowercase tags. + afew 3.0.0 (2020-03-10) ======================= --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ afew ==== -|GithubTag| |CodeCov| |CI Status| +|GithubTag| |CI Status| About ----- @@ -23,7 +23,7 @@ configurable rules that can contain arbitrary notmuch queries to match against any searchable attributes. -fyi: afew plays nicely with alot, a GUI for notmuch mail ;) +fyi: afew plays nicely with alot, a TUI for notmuch mail ;) * https://github.com/pazz/alot @@ -32,9 +32,9 @@ IRC --- -Feel free to ask your questions and discuss usage in the `#afewmail IRC Channel`_ on freenode. +Feel free to ask your questions and discuss usage in the `#afewmail IRC Channel`_ on Libera.Chat. -.. _#afewmail IRC Channel: http://webchat.freenode.net/?channels=#afewmail +.. _#afewmail IRC Channel: http://web.libera.chat/?channels=#afewmail Features @@ -51,7 +51,6 @@ * can move mails based on arbitrary notmuch queries, so your sorting may show on your traditional mail client (well, almost ;)) * has a ``--dry-run`` mode for safe testing -* works with python 3.6+ @@ -69,7 +68,5 @@ .. |GithubTag| image:: https://img.shields.io/github/tag/afewmail/afew.svg :target: https://github.com/afewmail/afew/releases -.. |CodeCov| image:: https://codecov.io/gh/afewmail/afew/branch/master/graph/badge.svg - :target: https://codecov.io/gh/afewmail/afew .. |CI Status| image:: https://github.com/afewmail/afew/workflows/CI/badge.svg :target: https://github.com/afewmail/afew/actions --- a/afew/Database.py +++ b/afew/Database.py @@ -97,7 +97,7 @@ def get_messages(self, query, full_thread=False): """ - Get all messages mathing the given query. + Get all messages matching the given query. :param query: the query to execute using :func:`Database.do_query` :type query: str @@ -126,7 +126,7 @@ # TODO: bindings are *very* unpythonic here... iterator *or* None # is a nono replies = message.get_replies() - if replies != None: + if replies is not None: for message in replies: # TODO: yield from for message in self.walk_replies(message): --- a/afew/MailMover.py +++ b/afew/MailMover.py @@ -80,7 +80,7 @@ shutil.copy2(fname, self.get_new_name(fname, destination)) to_delete_fnames.append(fname) except shutil.SameFileError: - logging.warn("trying to move '{}' onto itself".format(fname)) + logging.warning("trying to move '{}' onto itself".format(fname)) continue except shutil.Error as e: # this is ugly, but shutil does not provide more --- a/afew/NotmuchSettings.py +++ b/afew/NotmuchSettings.py @@ -9,14 +9,15 @@ def read_notmuch_settings(path=None): - if path == None: + if path is None: path = os.environ.get('NOTMUCH_CONFIG', os.path.expanduser('~/.notmuch-config')) with open(path) as fp: notmuch_settings.read_file(fp) -def write_notmuch_settings(path = None): - if path == None: + +def write_notmuch_settings(path=None): + if path is None: path = os.environ.get('NOTMUCH_CONFIG', os.path.expanduser('~/.notmuch-config')) with open(path, 'w+') as fp: --- a/afew/configparser.py +++ b/afew/configparser.py @@ -17,7 +17,9 @@ return filter(None, result) -class ConfigParser(configparser.ConfigParser, GetListMixIn): pass +class ConfigParser(configparser.ConfigParser, GetListMixIn): + pass -class RawConfigParser(configparser.RawConfigParser, GetListMixIn): pass +class RawConfigParser(configparser.RawConfigParser, GetListMixIn): + pass --- a/afew/files.py +++ b/afew/files.py @@ -8,13 +8,14 @@ import platform import queue import threading +import notmuch +import pyinotify +import ctypes +import contextlib if platform.system() != 'Linux': raise ImportError('Unsupported platform: {!r}'.format(platform.system())) -import notmuch -import pyinotify - class EventHandler(pyinotify.ProcessEvent): def __init__(self, options, database): @@ -22,7 +23,7 @@ self.database = database super().__init__() - ignore_re = re.compile('(/xapian/.*(base.|tmp)$)|(\.lock$)|(/dovecot)') + ignore_re = re.compile(r'(/xapian/.*(base.|tmp)$)|(\.lock$)|(/dovecot)') def process_IN_DELETE(self, event): if self.ignore_re.search(event.pathname): @@ -45,17 +46,17 @@ filter_.run('id:"{}"'.format(message.get_message_id())) filter_.commit(self.options.dry_run) except Exception as e: - logging.warn('Error processing mail with filter {!r}: {}'.format(filter_.message, e)) + logging.warning('Error processing mail with filter {!r}: {}'.format(filter_.message, e)) try: self.database.add_message(event.pathname, sync_maildir_flags=True, new_mail_handler=new_mail) except notmuch.FileError as e: - logging.warn('Error opening mail file: {}'.format(e)) + logging.warning('Error opening mail file: {}'.format(e)) return except notmuch.FileNotEmailError as e: - logging.warn('File does not look like an email: {}'.format(e)) + logging.warning('File does not look like an email: {}'.format(e)) return else: if src_pathname: @@ -67,9 +68,9 @@ def watch_for_new_files(options, database, paths, daemonize=False): wm = pyinotify.WatchManager() mask = ( - pyinotify.IN_DELETE | - pyinotify.IN_MOVED_FROM | - pyinotify.IN_MOVED_TO) + pyinotify.IN_DELETE | + pyinotify.IN_MOVED_FROM | + pyinotify.IN_MOVED_TO) handler = EventHandler(options, database) notifier = pyinotify.Notifier(wm, handler) @@ -83,9 +84,6 @@ notifier.loop() -import ctypes -import contextlib - try: libc = ctypes.CDLL(ctypes.util.find_library("c")) except ImportError as e: @@ -171,7 +169,7 @@ if child not in blacklist): try: stat_result = os.stat(child_path) - except: + except Exception: continue if stat_result.st_mode & stat.S_IFDIR: @@ -193,7 +191,7 @@ while True: result = results.get() - if result != None: + if result is not None: yield result else: break --- a/afew/filters/DMARCReportInspectionFilter.py +++ b/afew/filters/DMARCReportInspectionFilter.py @@ -81,6 +81,8 @@ :param node: XML node holding status as text. :returns: Whether the status is reported as "failed". """ + if not node or not node.text: + return True return (node.text.strip() not in ['pass', 'none']) @@ -118,17 +120,28 @@ class DMARCReportInspectionFilter(Filter): """ Inspect DMARC reports for DKIM and SPF status. + + Config: + + [DMARCReportInspectionFilter] + dkim_ok_tag = "dmarc/dkim-ok" + dkim_fail_tag = "dmarc/dkim-fail" + spf_ok_tag = "dmarc/spf-ok" + spf_fail_tag = "dmarc/spf-fail" + subject_regexp = "^report domain:" + """ def __init__(self, # pylint: disable=too-many-arguments database, dkim_ok_tag='dmarc/dkim-ok', dkim_fail_tag='dmarc/dkim-fail', spf_ok_tag='dmarc/spf-ok', - spf_fail_tag='dmarc/spf-fail'): + spf_fail_tag='dmarc/spf-fail', + subject_regexp=r'^report domain:'): super().__init__(database) self.dkim_tag = {True: dkim_ok_tag, False: dkim_fail_tag} self.spf_tag = {True: spf_ok_tag, False: spf_fail_tag} - self.dmarc_subject = re.compile(r'^report domain:', + self.dmarc_subject = re.compile(subject_regexp, flags=re.IGNORECASE) self.log = logging.getLogger('{}.{}'.format( self.__module__, self.__class__.__name__)) --- a/afew/filters/FolderNameFilter.py +++ b/afew/filters/FolderNameFilter.py @@ -2,7 +2,6 @@ # Copyright (c) dtk from afew.filters.BaseFilter import Filter -from afew.NotmuchSettings import notmuch_settings import re import shlex @@ -15,7 +14,7 @@ super().__init__(database) self.__filename_pattern = '{mail_root}/(?P.*)/(cur|new)/[^/]+'.format( - mail_root=notmuch_settings.get('database', 'path').rstrip('/')) + mail_root=database.db_path.rstrip('/')) self.__folder_explicit_list = set(shlex.split(folder_explicit_list)) self.__folder_blacklist = set(shlex.split(folder_blacklist)) self.__folder_transforms = self.__parse_transforms(folder_transforms) --- a/afew/filters/HeaderMatchingFilter.py +++ b/afew/filters/HeaderMatchingFilter.py @@ -6,6 +6,8 @@ from afew.filters.BaseFilter import Filter +from notmuch.errors import NullPointerError + import re @@ -22,10 +24,13 @@ def handle_message(self, message): if self.header is not None and self.pattern is not None: if not self._tag_blacklist.intersection(message.get_tags()): - value = message.get_header(self.header) - match = self.pattern.search(value) - if match: - sub = (lambda tag: - tag.format(**match.groupdict()).lower()) - self.remove_tags(message, *map(sub, self._tags_to_remove)) - self.add_tags(message, *map(sub, self._tags_to_add)) + try: + value = message.get_header(self.header) + match = self.pattern.search(value) + if match: + tagdict = {k: v.lower() for k, v in match.groupdict().items()} + sub = (lambda tag: tag.format(**tagdict)) + self.remove_tags(message, *map(sub, self._tags_to_remove)) + self.add_tags(message, *map(sub, self._tags_to_add)) + except NullPointerError: + pass --- a/afew/filters/SentMailsFilter.py +++ b/afew/filters/SentMailsFilter.py @@ -21,11 +21,11 @@ my_addresses.add(other_email) self.query = ( - '(' + - ' OR '.join('from:"%s"' % address for address in my_addresses) - + ') AND NOT (' + - ' OR '.join('to:"%s"' % address for address in my_addresses) - + ')' + '(' + + ' OR '.join('from:"%s"' % address for address in my_addresses) + + ') AND NOT (' + + ' OR '.join('to:"%s"' % address for address in my_addresses) + + ')' ) self.sent_tag = sent_tag @@ -58,7 +58,7 @@ return email_to_tags def __get_bare_email(self, email): - if not '<' in email: + if '<' not in email: return email else: match = self._bare_email_re.search(email) --- /dev/null +++ b/afew/tests/test_headermatchingfilter.py @@ -0,0 +1,84 @@ +"""Test suite for DKIMValidityFilter. +""" +import unittest +from email.utils import make_msgid +from unittest import mock + +from afew.Database import Database +from afew.filters.HeaderMatchingFilter import HeaderMatchingFilter + +from notmuch.errors import NullPointerError + + +class _AddTags: # pylint: disable=too-few-public-methods + """Mock for `add_tags` method of base filter. We need to easily collect + tags added by filter for test assertion. + """ + def __init__(self, tags): + self._tags = tags + + def __call__(self, message, *tags): + self._tags.update(tags) + + +def _make_header_matching_filter(): + """Make `HeaderMatchingFilter` with mocked `HeaderMatchingFilter.add_tags` + method, so in tests we can easily check what tags were added by filter + without fiddling with db. + """ + tags = set() + add_tags = _AddTags(tags) + header_filter = HeaderMatchingFilter(Database(), header="X-test", pattern="") + header_filter.add_tags = add_tags + return header_filter, tags + + +def _make_message(should_fail): + """Make mock email Message. + + Mocked methods: + + - `get_header()` returns non-empty string. When testing with mocked + function for verifying DKIM signature, DKIM signature doesn't matter as + long as it's non-empty string. + + - `get_filenames()` returns list of non-empty string. When testing with + mocked file open, it must just be non-empty string. + + - `get_message_id()` returns some generated message ID. + """ + message = mock.Mock() + if should_fail: + message.get_header.side_effect = NullPointerError + else: + message.get_header.return_value = 'header' + message.get_filenames.return_value = ['a'] + message.get_tags.return_value = ['a'] + message.get_message_id.return_value = make_msgid() + return message + + +class TestHeaderMatchingFilter(unittest.TestCase): + """Test suite for `HeaderMatchingFilter`. + """ + @mock.patch('afew.filters.HeaderMatchingFilter.open', + mock.mock_open(read_data=b'')) + def test_header_exists(self): + """Test message with header that exists. + """ + header_filter, tags = _make_header_matching_filter() + message = _make_message(False) + header_filter.handle_message(message) + + self.assertSetEqual(tags, set()) + + @mock.patch('afew.filters.HeaderMatchingFilter.open', + mock.mock_open(read_data=b'')) + def test_header_doesnt_exist(self): + """Test message with header that exists. + """ + header_filter, tags = _make_header_matching_filter() + message = _make_message(True) + header_filter.handle_message(message) + + self.assertSetEqual(tags, set()) --- a/afew/tests/test_mailmover.py +++ b/afew/tests/test_mailmover.py @@ -4,7 +4,6 @@ from email.utils import make_msgid from freezegun import freeze_time import mailbox -import notmuch import os import shutil import tempfile @@ -13,6 +12,7 @@ from afew.Database import Database from afew.NotmuchSettings import notmuch_settings, write_notmuch_settings + def create_mail(msg, maildir, notmuch_db, tags, old=False): email_message = email.message.EmailMessage() # freezegun doesn't handle time zones properly when generating UNIX @@ -83,11 +83,9 @@ }, } - def tearDown(self): shutil.rmtree(self.test_dir) - @staticmethod def get_folder_content(db, folder): return { @@ -95,7 +93,6 @@ for msg in db.do_query('folder:{}'.format(folder)).search_messages() } - def test_all_rule_cases(self): from afew import MailMover @@ -132,7 +129,6 @@ self.assertEqual(expect_archive, self.get_folder_content(db, '.archive')) self.assertEqual(expect_spam, self.get_folder_content(db, '.spam')) - def test_max_age(self): from afew import MailMover --- a/afew/tests/test_utils.py +++ /dev/null @@ -1,12 +0,0 @@ -# -import unittest - -from afew import utils - - -class TestUtils(unittest.TestCase): - pass - - -if __name__ == '__main__': - unittest.main() --- a/docs/conf.py +++ b/docs/conf.py @@ -12,7 +12,8 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import sys +import os from pkg_resources import get_distribution # If extensions (or modules to document with autodoc) are in another directory, @@ -42,7 +43,7 @@ # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +# needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. @@ -79,37 +80,37 @@ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -#language = None +# language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -#today = '' +# today = '' # Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [] # The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None +# default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True +# add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -#add_module_names = True +# add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -#show_authors = False +# show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] +# modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------------- @@ -121,26 +122,26 @@ # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +# html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] +# html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +# html_title = None # A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None +# html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. -#html_logo = None +# html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -#html_favicon = None +# html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -149,44 +150,44 @@ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' +# html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -#html_use_smartypants = True +# html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -#html_sidebars = {} +# html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. -#html_additional_pages = {} +# html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +# html_domain_indices = True # If false, no index is generated. -#html_use_index = True +# html_use_index = True # If true, the index is split into individual pages for each letter. -#html_split_index = False +# html_split_index = False # If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True +# html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True +# html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True +# html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. -#html_use_opensearch = '' +# html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None +# html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'afewdoc' @@ -195,10 +196,10 @@ # -- Options for LaTeX output -------------------------------------------------- # The paper size ('letter' or 'a4'). -#latex_paper_size = 'letter' +# latex_paper_size = 'letter' # The font size ('10pt', '11pt' or '12pt'). -#latex_font_size = '10pt' +# latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). @@ -209,26 +210,26 @@ # The name of an image file (relative to this directory) to place at the top of # the title page. -#latex_logo = None +# latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -#latex_use_parts = False +# latex_use_parts = False # If true, show page references after internal links. -#latex_show_pagerefs = False +# latex_show_pagerefs = False # If true, show URL addresses after external links. -#latex_show_urls = False +# latex_show_urls = False # Additional stuff for the LaTeX preamble. -#latex_preamble = '' +# latex_preamble = '' # Documents to append as an appendix to all manuals. -#latex_appendices = [] +# latex_appendices = [] # If false, no module index is generated. -#latex_domain_indices = True +# latex_domain_indices = True # -- Options for manual page output -------------------------------------------- --- a/docs/filters.rst +++ b/docs/filters.rst @@ -26,7 +26,7 @@ DKIMValidityFilter ------------------ -This filter verifies DKIM signatures of E-Mails with DKIM header, and adds `dkin-ok` or `dkin-fail` tags. +This filter verifies DKIM signatures of E-Mails with DKIM header, and adds `dkim-ok` or `dkim-fail` tags. DMARCReportInspectionFilter --------------------------- @@ -145,7 +145,7 @@ [HeaderMatchingFilter.3] header = X-Redmine-Project - pattern = (?P.*) + pattern = (?P.+) tags = +redmine;+{project} SpamFilter and ListMailsFilter are implemented using HeaderMatchingFilter, and are --- a/setup.py +++ b/setup.py @@ -12,6 +12,8 @@ yield 'chardet' yield 'dkimpy' +with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst'), encoding='utf-8') as f: + long_description = f.read() setup( name='afew', @@ -19,6 +21,8 @@ description="An initial tagging script for notmuch mail", url="https://github.com/afewmail/afew", license="ISC", + long_description=long_description, + long_description_content_type="text/x-rst", setup_requires=['setuptools_scm'], packages=find_packages(), test_suite='afew.tests',