Skip to content

Commit 351bc84

Browse files
authored
Merge pull request #86 from OpenNTI/issue66
Move static metadata to pyproject.toml; add SPDX license classifier; make top-level LICENSE match the files (and be the original license that was imported with the code)
2 parents 35ecd1f + 066f147 commit 351bc84

5 files changed

Lines changed: 89 additions & 129 deletions

File tree

CHANGES.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
- Explicitly list ``docutils`` as a dependency.
1212
- Add the ability to specify a ``:class:`` argument to set CSS classes
1313
on programoutput nodes.
14+
- [Internal] Convert static project metadata to ``pyproject.toml``.
15+
- [Internal] Clarify conflicting licensing statements by setting them
16+
all to the original BSD 2 Clause license.
1417

1518

1619
0.19 (2026-02-20)

LICENSE

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1+
Copyright (c) 2010, 2011, 2012 Sebastian Wiesner <lunaryorn@googlemail.com>
2+
All rights reserved.
3+
4+
15
Redistribution and use in source and binary forms, with or without
26
modification, are permitted provided that the following conditions are
37
met:
48

5-
1. Redistributions of source code must retain the above copyright
6-
notice, this list of conditions and the following disclaimer.
7-
8-
2. Redistributions in binary form must reproduce the above copyright
9-
notice, this list of conditions and the following disclaimer in the
10-
documentation and/or other materials provided with the distribution.
9+
* Redistributions of source code must retain the above copyright
10+
notice, this list of conditions and the following disclaimer.
1111

12-
3. Neither the name of the copyright holder nor the names of its
13-
contributors may be used to endorse or promote products derived from
14-
this software without specific prior written permission.
12+
* Redistributions in binary form must reproduce the above copyright
13+
notice, this list of conditions and the following disclaimer in the
14+
documentation and/or other materials provided with the distribution.
1515

1616
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17-
AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1818
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1919
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20-
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2121
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2222
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2323
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY

pyproject.toml

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
11
[build-system]
2-
requires = ["setuptools"]
2+
requires = ["setuptools>=61"]
33
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "sphinxcontrib-programoutput"
7+
description = "Sphinx extension to include program output"
8+
readme = "README.rst"
9+
requires-python = ">=3.10"
10+
license = "BSD-2-Clause"
11+
license-files = [
12+
'LICENSE',
13+
]
14+
keywords = ["sphinx", "cli", "command", "output", "program", "example"]
15+
authors = [{name = "Sebastian Wiesner", email = "lunaryorn@gmail.com"}]
16+
maintainers = [{name = "Jason Madden", email = "jason@seecoresoftware.com"}]
17+
dependencies = [
18+
"Sphinx >= 5.0.0",
19+
"docutils",
20+
]
21+
classifiers = [
22+
"Development Status :: 5 - Production/Stable",
23+
"Intended Audience :: Developers",
24+
"Operating System :: OS Independent",
25+
"Programming Language :: Python",
26+
"Programming Language :: Python :: 3 :: Only",
27+
"Programming Language :: Python :: 3.10",
28+
"Programming Language :: Python :: 3.11",
29+
"Programming Language :: Python :: 3.12",
30+
"Programming Language :: Python :: 3.13",
31+
"Programming Language :: Python :: 3.14",
32+
"Programming Language :: Python :: Implementation :: CPython",
33+
"Programming Language :: Python :: Implementation :: PyPy",
34+
"Topic :: Documentation",
35+
"Topic :: Utilities",
36+
"Framework :: Sphinx",
37+
"Framework :: Sphinx :: Extension",
38+
]
39+
dynamic = ["version"]
40+
41+
[project.optional-dependencies]
42+
test = [
43+
# Sphinx 8.1 stopped raising SphinxWarning when the ``logger.warning``
44+
# method is invoked. So we now have to test side effects.
45+
# That's OK, and the same side effect test works on older
46+
# versions as well.
47+
"erbsland-sphinx-ansi >= 1.2.4",
48+
]
49+
docs = [
50+
"furo",
51+
]
52+
ansi = [
53+
"erbsland-sphinx-ansi >= 1.2.4",
54+
]
55+
56+
[project.urls]
57+
Homepage = "https://sphinxcontrib-programoutput.readthedocs.io/en/latest/"
58+
Documentation = "https://sphinxcontrib-programoutput.readthedocs.io/en/latest/"
59+
Repository = "https://github.com/OpenNTI/sphinxcontrib-programoutput/"
60+
Issues = "https://github.com/OpenNTI/sphinxcontrib-programoutput/issues"
61+
Changelog = "https://github.com/OpenNTI/sphinxcontrib-programoutput/blob/master/CHANGES.rst"
62+
63+
[tool.setuptools]
64+
zip-safe = false
65+
include-package-data = true
66+
platforms = ["any"]
67+
68+
[tool.setuptools.dynamic]
69+
version = {attr = "sphinxcontrib.programoutput.__version__"}
70+
71+
[tool.setuptools.packages.find]
72+
where = ["src"]
73+
namespaces = true
74+
75+
[tool.zest-releaser]
76+
python-file-with-version = "src/sphinxcontrib/programoutput/__init__.py"

setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
# Copyright (c) 2011, 2012, Sebastian Wiesner <lunaryorn@gmail.com>
3-
# All rights reserved.
4-
5-
# Redistribution and use in source and binary forms, with or without
6-
# modification, are permitted provided that the following conditions are met:
7-
8-
# 1. Redistributions of source code must retain the above copyright notice,
9-
# this list of conditions and the following disclaimer.
10-
# 2. Redistributions in binary form must reproduce the above copyright
11-
# notice, this list of conditions and the following disclaimer in the
12-
# documentation and/or other materials provided with the distribution.
13-
14-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
18-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24-
# POSSIBILITY OF SUCH DAMAGE.
25-
26-
import os
27-
import re
281
from setuptools import setup
29-
from setuptools import find_namespace_packages
30-
31-
def read_desc():
32-
with open('README.rst', encoding='utf-8') as stream:
33-
readme = stream.read()
34-
# CHANGES.rst includes sphinx-specific markup, so
35-
# it can't be in the long description without some processing
36-
# that we're not doing -- its invalid ReST
37-
38-
return readme
39-
40-
def read_version_number():
41-
VERSION_PATTERN = re.compile(r"__version__ = '([^']+)'")
42-
with open(os.path.join('src', 'sphinxcontrib', 'programoutput', '__init__.py'),
43-
encoding='utf-8') as stream:
44-
for line in stream:
45-
match = VERSION_PATTERN.search(line)
46-
if match:
47-
return match.group(1)
48-
49-
raise ValueError('Could not extract version number')
50-
51-
tests_require = [
52-
# Sphinx 8.1 stopped raising SphinxWarning when the ``logger.warning``
53-
# method is invoked. So we now have to test side effects.
54-
# That's OK, and the same side effect test works on older
55-
# versions as well.
56-
"erbsland-sphinx-ansi >= 1.2.4",
57-
]
582

59-
setup(
60-
name='sphinxcontrib-programoutput',
61-
version=read_version_number(),
62-
url='https://sphinxcontrib-programoutput.readthedocs.org/',
63-
license='BSD',
64-
author='Sebastian Wiesner',
65-
author_email='lunaryorn@gmail.com',
66-
maintainer="Jason Madden",
67-
maintainer_email='jason@seecoresoftware.com',
68-
description='Sphinx extension to include program output',
69-
long_description=read_desc(),
70-
keywords="sphinx cli command output program example",
71-
zip_safe=False,
72-
project_urls={
73-
'Homepage': "https://sphinxcontrib-programoutput.readthedocs.io/en/latest/",
74-
'Documentation': "https://sphinxcontrib-programoutput.readthedocs.io/en/latest/",
75-
"Repository": "https://github.com/OpenNTI/sphinxcontrib-programoutput/",
76-
"Issues": "https://github.com/OpenNTI/sphinxcontrib-programoutput/issues",
77-
"Changelog":
78-
"https://github.com/OpenNTI/sphinxcontrib-programoutput/blob/master/CHANGES.rst",
79-
},
80-
classifiers=[
81-
'Development Status :: 5 - Production/Stable',
82-
'Intended Audience :: Developers',
83-
'License :: OSI Approved :: BSD License',
84-
'Operating System :: OS Independent',
85-
'Programming Language :: Python',
86-
'Programming Language :: Python :: 3 :: Only',
87-
"Programming Language :: Python :: 3.10",
88-
"Programming Language :: Python :: 3.11",
89-
"Programming Language :: Python :: 3.12",
90-
"Programming Language :: Python :: 3.13",
91-
"Programming Language :: Python :: 3.14",
92-
"Programming Language :: Python :: Implementation :: CPython",
93-
"Programming Language :: Python :: Implementation :: PyPy",
94-
'Topic :: Documentation',
95-
'Topic :: Utilities',
96-
'Framework :: Sphinx',
97-
'Framework :: Sphinx :: Extension',
98-
],
99-
platforms='any',
100-
packages=find_namespace_packages('src'),
101-
package_dir={'': 'src'},
102-
include_package_data=True,
103-
install_requires=[
104-
'Sphinx >= 5.0.0',
105-
'docutils',
106-
],
107-
extras_require={
108-
'test': tests_require,
109-
'docs': [
110-
'furo',
111-
],
112-
'ansi': [
113-
"erbsland-sphinx-ansi >= 1.2.4",
114-
],
115-
},
116-
python_requires=">=3.10",
117-
)
3+
setup()

0 commit comments

Comments
 (0)