Skip to content

Commit b401c18

Browse files
committed
Changed dependency from 'sphinx.ext.graphviz' to 'btd.sphinx.graphviz'.
1 parent 09874e8 commit b401c18

File tree

4 files changed

+125
-2
lines changed

4 files changed

+125
-2
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
[![Sourcecode on GitHub](https://img.shields.io/badge/BuildTheDocs-sphinx.inheritance_diagram-323131.svg?logo=github&longCache=true)](https://github.com/buildthedocs/sphinx.autoprogram)
2+
<!--[![License](https://img.shields.io/badge/Apache%20License,%202.0-bd0000.svg?longCache=true&label=code%20license&logo=Apache&logoColor=D22128)](LICENSE.md)-->
3+
[![GitHub tag (latest SemVer incl. pre-release)](https://img.shields.io/github/v/tag/buildthedocs/sphinx.inheritance_diagram?logo=GitHub&include_prereleases)](https://github.com/buildthedocs/sphinx.inheritance_diagram/tags)
4+
[![GitHub release (latest SemVer incl. including pre-releases)](https://img.shields.io/github/v/release/buildthedocs/sphinx.inheritance_diagram?logo=GitHub&include_prereleases)](https://github.com/buildthedocs/sphinx.inheritance_diagram/releases/latest)
5+
[![GitHub release date](https://img.shields.io/github/release-date/buildthedocs/sphinx.inheritance_diagram?logo=GitHub&)](https://github.com/buildthedocs/sphinx.inheritance_diagram/releases)
6+
[![Libraries.io status for latest release](https://img.shields.io/librariesio/release/pypi/btd.sphinx.inheritance_diagram)](https://libraries.io/github/buildthedocs/sphinx.inheritance_diagram)
7+
[![Requires.io](https://img.shields.io/requires/github/buildthedocs/sphinx.inheritance_diagram)](https://requires.io/github/buildthedocs/sphinx.inheritance_diagram/requirements/?branch=master)
8+
<!--[![Travis](https://img.shields.io/travis/com/buildthedocs/sphinx.inheritance_diagram?logo=Travis)](https://travis-ci.com/buildthedocs/sphinx.inheritance_diagram)-->
9+
[![PyPI](https://img.shields.io/pypi/v/btd.sphinx.inheritance_diagram?logo=PyPI)](https://pypi.org/project/sphinx.inheritance_diagram/)
10+
![PyPI - Status](https://img.shields.io/pypi/status/btd.sphinx.inheritance_diagram?logo=PyPI)
11+
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/btd.sphinx.inheritance_diagram?logo=PyPI)
12+
[![Dependent repos (via libraries.io)](https://img.shields.io/librariesio/dependent-repos/pypi/btd.sphinx.inheritance_diagram)](https://github.com/buildthedocs/sphinx.inheritance_diagram/network/dependents)
13+
<!-- [![Read the Docs](https://img.shields.io/readthedocs/btd-sphinx-inheritance_diagram)](https://btd-sphinx-inheritance_diagram.readthedocs.io/en/latest/)-->
14+
115
# btd.sphinx.inheritance_diagram
216

317
This is a patched version of [`sphinx.ext.inheritance_diagram`](https://github.com/sphinx-doc/sphinx).
@@ -9,4 +23,13 @@ This is a patched version of [`sphinx.ext.inheritance_diagram`](https://github.c
923
* TBD
1024

1125
--------------------
26+
27+
## Install using `pip`
28+
29+
```
30+
$ pip install btd.sphinx.inheritance_diagram
31+
```
32+
33+
----------------------
34+
1235
SPDX-License-Identifier: BSD-2-Clause

btd/sphinx/inheritance_diagram.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class E(B): pass
5151
from sphinx import addnodes
5252
from sphinx.application import Sphinx
5353
from sphinx.environment import BuildEnvironment
54-
from sphinx.ext.graphviz import (
54+
from btd.sphinx.graphviz import (
5555
graphviz, figure_wrapper,
5656
render_dot_html, render_dot_latex, render_dot_texinfo
5757
)
@@ -457,7 +457,7 @@ def skip(self: nodes.NodeVisitor, node: inheritance_diagram) -> None:
457457

458458

459459
def setup(app: Sphinx) -> Dict[str, Any]:
460-
app.setup_extension('sphinx.ext.graphviz')
460+
app.setup_extension('btd.sphinx.graphviz')
461461
app.add_node(
462462
inheritance_diagram,
463463
latex=(latex_visit_inheritance_diagram, None),

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
sphinx>=2.3.1
2+
btd.sphinx.graphviz>=2.3.1

setup.py

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# EMACS settings: -*- coding: utf-8; tab-width: 2; indent-tabs-mode: t -*-
2+
# vim: tabstop=2:shiftwidth=2:noexpandtab
3+
# kate: tab-width 2; replace-tabs off; indent-width 2;
4+
# =============================================================================
5+
# Authors: Patrick Lehmann
6+
#
7+
# Package installer: A modified version of sphinx.ext.inheritance_diagram
8+
#
9+
#
10+
# License:
11+
# ============================================================================
12+
# Copyright 2017-2019 Patrick Lehmann - Bötzingen, Germany
13+
# Copyright (c) 2007-2019 by the Sphinx team (see AUTHORS file).
14+
# All rights reserved.
15+
16+
# Redistribution and use in source and binary forms, with or without
17+
# modification, are permitted provided that the following conditions are
18+
# met:
19+
# * Redistributions of source code must retain the above copyright
20+
# notice, this list of conditions and the following disclaimer.
21+
# * Redistributions in binary form must reproduce the above copyright
22+
# notice, this list of conditions and the following disclaimer in the
23+
# documentation and/or other materials provided with the distribution.
24+
25+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28+
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29+
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30+
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33+
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36+
#
37+
# SPDX-License-Identifier: BSD-2-Clause
38+
# ============================================================================
39+
#
40+
import setuptools
41+
42+
with open("README.md", "r") as file:
43+
long_description = file.read()
44+
45+
requirements = []
46+
with open("requirements.txt") as file:
47+
for line in file.readlines():
48+
requirements.append(line)
49+
50+
projectName = "sphinx.inheritance_diagram"
51+
projectNameWithPrefix = "btd." + projectName
52+
version = "2.3.1.dev1"
53+
54+
github_url = "https://github.com/buildthedocs/" + projectName
55+
rtd_url = "https://" + projectNameWithPrefix.replace(".", "-") + ".readthedocs.io/en/latest/"
56+
57+
setuptools.setup(
58+
name=projectNameWithPrefix,
59+
version=version,
60+
61+
author="Sphinx team, Patrick Lehmann",
62+
author_email="[email protected]",
63+
# maintainer="Patrick Lehmann",
64+
# maintainer_email="[email protected]",
65+
66+
description="Embedding diagrams rendered with inheritance_diagram.",
67+
long_description=long_description,
68+
long_description_content_type="text/markdown",
69+
70+
url=github_url,
71+
project_urls={
72+
'Documentation': rtd_url,
73+
'Source Code': github_url,
74+
'Issue Tracker': github_url + "/issues"
75+
},
76+
# download_url="https://github.com/buildthedocs/sphinx.inheritance_diagram/tarball/0.1.0",
77+
78+
packages=setuptools.find_namespace_packages(),
79+
classifiers=[
80+
"License :: OSI Approved :: BSD License",
81+
"Operating System :: OS Independent",
82+
"Programming Language :: Python :: 3 :: Only",
83+
"Programming Language :: Python :: 3.4",
84+
"Programming Language :: Python :: 3.5",
85+
"Programming Language :: Python :: 3.6",
86+
"Programming Language :: Python :: 3.7",
87+
"Programming Language :: Python :: 3.8",
88+
"Development Status :: 5 - Production/Stable",
89+
"Intended Audience :: Developers",
90+
"Topic :: Documentation :: Sphinx",
91+
"Framework :: Sphinx :: Extension"
92+
],
93+
keywords="Sphinx Documentation Inheritance Diagram Graphviz",
94+
95+
python_requires='>=3.4',
96+
install_requires=requirements,
97+
# provides=
98+
# obsoletes=
99+
)

0 commit comments

Comments
 (0)