Skip to content

Commit 17b5951

Browse files
authored
Clean up packaging and build system (#167)
* Tell git to not ignore egg files that are not the correct .egg-info/ dir * Tell git to ignore the dist/ directory where sdist/bdist files are stored * Make the setup.py executable without prefixing it with python * Migrate packaging metadata from setup.py to declarative setup.cfg * Add PEP-518 pyproject.toml file
1 parent c5aed67 commit 17b5951

5 files changed

Lines changed: 52 additions & 43 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*.pyc
2-
*egg*
2+
pytest_rerunfailures.egg-info/
33
.DS_Store
44
.Python
55
.cache/
@@ -8,6 +8,7 @@
88
.tox*
99
bin/
1010
build/*
11+
dist/
1112
include/
1213
lib/
1314
pip-selfcheck.json

HEADER.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. contents::

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[build-system]
2+
requires = [
3+
"setuptools >= 40.0",
4+
]
5+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,45 @@ universal = 0
44
[check-manifest]
55
ignore =
66
.pre-commit-config.yaml
7+
8+
[metadata]
9+
name = pytest-rerunfailures
10+
version = 10.2.dev0
11+
url = https://github.com/pytest-dev/pytest-rerunfailures
12+
description = pytest plugin to re-run tests to eliminate flaky failures
13+
long_description = file: HEADER.rst, README.rst, CHANGES.rst
14+
author = Leah Klearman
15+
author_email = lklrmn@gmail.com
16+
license = Mozilla Public License 2.0 (MPL 2.0)
17+
keywords = py.test pytest rerun failures flaky
18+
classifiers =
19+
Development Status :: 5 - Production/Stable
20+
Framework :: Pytest
21+
Intended Audience :: Developers
22+
License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
23+
Operating System :: POSIX
24+
Operating System :: Microsoft :: Windows
25+
Operating System :: MacOS :: MacOS X
26+
Topic :: Software Development :: Quality Assurance
27+
Topic :: Software Development :: Testing
28+
Topic :: Utilities
29+
Programming Language :: Python :: 3
30+
Programming Language :: Python :: 3.6
31+
Programming Language :: Python :: 3.7
32+
Programming Language :: Python :: 3.8
33+
Programming Language :: Python :: 3.9
34+
Programming Language :: Python :: 3 :: Only
35+
Programming Language :: Python :: Implementation :: CPython
36+
Programming Language :: Python :: Implementation :: PyPy
37+
38+
[options]
39+
zip_safe = False
40+
py_modules = pytest_rerunfailures
41+
python_requires = >= 3.6
42+
install_requires =
43+
setuptools >= 40.0
44+
pytest >= 5.3
45+
46+
[options.entry_points]
47+
pytest11 =
48+
rerunfailures = pytest_rerunfailures

setup.py

100644100755
Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,4 @@
1+
#!/usr/bin/env python
12
from setuptools import setup
23

3-
with open("README.rst") as readme, open("CHANGES.rst") as changelog:
4-
long_description = ".. contents::\n\n" + readme.read() + "\n\n" + changelog.read()
5-
6-
setup(
7-
name="pytest-rerunfailures",
8-
version="10.2.dev0",
9-
description="pytest plugin to re-run tests to eliminate flaky failures",
10-
long_description=long_description,
11-
author="Leah Klearman",
12-
author_email="lklrmn@gmail.com",
13-
url="https://github.com/pytest-dev/pytest-rerunfailures",
14-
py_modules=["pytest_rerunfailures"],
15-
entry_points={"pytest11": ["rerunfailures = pytest_rerunfailures"]},
16-
install_requires=[
17-
"setuptools>=40.0",
18-
"pytest >= 5.3",
19-
],
20-
python_requires=">=3.6",
21-
license="Mozilla Public License 2.0 (MPL 2.0)",
22-
keywords="py.test pytest rerun failures flaky",
23-
zip_safe=False,
24-
classifiers=[
25-
"Development Status :: 5 - Production/Stable",
26-
"Framework :: Pytest",
27-
"Intended Audience :: Developers",
28-
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
29-
"Operating System :: POSIX",
30-
"Operating System :: Microsoft :: Windows",
31-
"Operating System :: MacOS :: MacOS X",
32-
"Topic :: Software Development :: Quality Assurance",
33-
"Topic :: Software Development :: Testing",
34-
"Topic :: Utilities",
35-
"Programming Language :: Python :: 3",
36-
"Programming Language :: Python :: 3.6",
37-
"Programming Language :: Python :: 3.7",
38-
"Programming Language :: Python :: 3.8",
39-
"Programming Language :: Python :: 3.9",
40-
"Programming Language :: Python :: 3 :: Only",
41-
"Programming Language :: Python :: Implementation :: CPython",
42-
"Programming Language :: Python :: Implementation :: PyPy",
43-
],
44-
)
4+
setup()

0 commit comments

Comments
 (0)