From f515ab745385c5eb5460cec744e2110dec1bc755 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Wed, 3 Jun 2020 22:55:02 +0000 Subject: Migrate release command to setup.py --- setup.cfg | 2 -- setup.py | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) delete mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 27ce9a2..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[aliases] -release = test flake8 diff --git a/setup.py b/setup.py index a4f43c3..490bf1d 100755 --- a/setup.py +++ b/setup.py @@ -11,6 +11,25 @@ from distutils.errors import DistutilsError from setuptools import setup, find_packages +class Release(Command): + + user_options = [] + description = "build and test package with linting" + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + self.run_command("test") + + # Flake8 should examine tests too + self.distribution.packages = find_packages() + self.run_command("flake8") + + class TestsWithCoverage(test): description = "run unit tests with coverage" @@ -139,6 +158,7 @@ setup( cmdclass={ "test": TestsWithCoverage, "pypi_release": PyPiReleaseCommand, + "release": Release, }, entry_points={ "console_scripts": [ -- cgit v1.2.3