|
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 |
28 | 1 | 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 | | -] |
58 | 2 |
|
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