Skip to content

Commit a21e05d

Browse files
authored
Declare project and pytest configuration in pyproject.toml (#80)
* Declare project and pytest configuration in pyproject.toml Uses PEP 518 and PEP 621. Drops support for running tests via 'python setup.py' * Drop Python 3.6 support * Call 'setuptools.setup' in setup.py
1 parent c3689c9 commit a21e05d

File tree

5 files changed

+52
-52
lines changed

5 files changed

+52
-52
lines changed

.github/workflows/python-app.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
python-version: ["3.6", "3.7", "3.8", "3.9"]
17+
python-version: ["3.7", "3.8", "3.9"]
1818
sphinx-version: [
1919
"",
2020
"5.0.*",

README.rst

+5-3
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,13 @@ Simply install it via ``pip``::
7474

7575
$ pip install autodocsumm
7676

77-
Or you install it via::
7877

79-
$ python setup.py install
78+
Local development
79+
^^^^^^^^^^^^^^^^^
8080

81-
from the `source on GitHub`_.
81+
Use ``pip`` on the `source on GitHub`_::
82+
83+
$ pip install .
8284

8385

8486
.. _source on GitHub: https://github.com/Chilipp/autodocsumm

pyproject.toml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[build-system]
2+
build-backend = 'setuptools.build_meta'
3+
requires = ['setuptools >= 61.0']
4+
5+
[project]
6+
name = 'autodocsumm'
7+
version = '0.2.8'
8+
description = 'Extended sphinx autodoc including automatic autosummaries'
9+
readme = 'README.rst'
10+
keywords = ['sphinx', 'autodoc', 'autosummary', 'content', 'table']
11+
urls.homepage = 'https://github.com/Chilipp/autodocsumm'
12+
authors = [
13+
{ name = 'Philipp S. Sommer', email = 'philipp.sommer@hereon.de' },
14+
]
15+
license = { text = 'Apache-2.0' }
16+
17+
classifiers = [
18+
'Development Status :: 5 - Production/Stable',
19+
'Intended Audience :: Developers',
20+
'Topic :: Documentation',
21+
'License :: OSI Approved :: Apache Software License',
22+
'Programming Language :: Python :: 3',
23+
'Programming Language :: Python :: 3 :: Only',
24+
'Programming Language :: Python :: 3.7',
25+
'Programming Language :: Python :: 3.8',
26+
'Programming Language :: Python :: 3.9',
27+
'Programming Language :: Python :: 3.10',
28+
'Operating System :: OS Independent',
29+
]
30+
31+
requires-python = '>= 3.7'
32+
dependencies = [
33+
'Sphinx >= 2.2, < 6.0',
34+
]
35+
36+
[tool.setuptools]
37+
zip-safe = false
38+
39+
[tool.setuptools.packages.find]
40+
namespaces = false
41+
exclude = ['docs', 'tests*', 'examples']
42+
43+
[tool.pytest.ini_options]
44+
addopts = '-v'

setup.cfg

-4
This file was deleted.

setup.py

+2-44
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,3 @@
1-
from setuptools import setup, find_packages
2-
import sys
1+
from setuptools import setup
32

4-
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
5-
pytest_runner = ['pytest-runner'] if needs_pytest else []
6-
7-
8-
def readme():
9-
with open('README.rst') as f:
10-
return f.read()
11-
12-
13-
setup(name='autodocsumm',
14-
version='0.2.8',
15-
description='Extended sphinx autodoc including automatic autosummaries',
16-
long_description=readme(),
17-
long_description_content_type='text/x-rst',
18-
classifiers=[
19-
'Development Status :: 5 - Production/Stable',
20-
'Intended Audience :: Developers',
21-
'Topic :: Documentation',
22-
'License :: OSI Approved :: Apache Software License',
23-
'Programming Language :: Python :: 3',
24-
'Programming Language :: Python :: 3 :: Only',
25-
'Programming Language :: Python :: 3.5',
26-
'Programming Language :: Python :: 3.6',
27-
'Programming Language :: Python :: 3.7',
28-
'Programming Language :: Python :: 3.8',
29-
'Programming Language :: Python :: 3.9',
30-
'Programming Language :: Python :: 3.10',
31-
'Operating System :: OS Independent',
32-
],
33-
keywords='sphinx autodoc autosummary content table',
34-
python_requires=">=3.6",
35-
url='https://github.com/Chilipp/autodocsumm',
36-
author='Philipp S. Sommer',
37-
author_email='philipp.sommer@hereon.de',
38-
license="Apache-2.0",
39-
packages=find_packages(exclude=['docs', 'tests*', 'examples']),
40-
install_requires=[
41-
'Sphinx>=2.2,<6.0',
42-
],
43-
setup_requires=pytest_runner,
44-
tests_require=['pytest'],
45-
zip_safe=False)
3+
setup()

0 commit comments

Comments
 (0)