diff options
author | Mike Crute <mike@crute.us> | 2020-06-03 22:55:02 +0000 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2020-06-03 22:55:02 +0000 |
commit | f515ab745385c5eb5460cec744e2110dec1bc755 (patch) | |
tree | 6a6eb38780639faab17164a9b292d9195f7d90ea | |
parent | fceff55ff94d88bd314dbe03ec6727c9e1e40de9 (diff) | |
download | pydora-f515ab745385c5eb5460cec744e2110dec1bc755.tar.bz2 pydora-f515ab745385c5eb5460cec744e2110dec1bc755.tar.xz pydora-f515ab745385c5eb5460cec744e2110dec1bc755.zip |
Migrate release command to setup.py
-rw-r--r-- | setup.cfg | 2 | ||||
-rwxr-xr-x | setup.py | 20 |
2 files changed, 20 insertions, 2 deletions
diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 27ce9a2..0000000 --- a/setup.cfg +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | [aliases] | ||
2 | release = test flake8 | ||
@@ -11,6 +11,25 @@ from distutils.errors import DistutilsError | |||
11 | from setuptools import setup, find_packages | 11 | from setuptools import setup, find_packages |
12 | 12 | ||
13 | 13 | ||
14 | class Release(Command): | ||
15 | |||
16 | user_options = [] | ||
17 | description = "build and test package with linting" | ||
18 | |||
19 | def initialize_options(self): | ||
20 | pass | ||
21 | |||
22 | def finalize_options(self): | ||
23 | pass | ||
24 | |||
25 | def run(self): | ||
26 | self.run_command("test") | ||
27 | |||
28 | # Flake8 should examine tests too | ||
29 | self.distribution.packages = find_packages() | ||
30 | self.run_command("flake8") | ||
31 | |||
32 | |||
14 | class TestsWithCoverage(test): | 33 | class TestsWithCoverage(test): |
15 | 34 | ||
16 | description = "run unit tests with coverage" | 35 | description = "run unit tests with coverage" |
@@ -139,6 +158,7 @@ setup( | |||
139 | cmdclass={ | 158 | cmdclass={ |
140 | "test": TestsWithCoverage, | 159 | "test": TestsWithCoverage, |
141 | "pypi_release": PyPiReleaseCommand, | 160 | "pypi_release": PyPiReleaseCommand, |
161 | "release": Release, | ||
142 | }, | 162 | }, |
143 | entry_points={ | 163 | entry_points={ |
144 | "console_scripts": [ | 164 | "console_scripts": [ |