Skip to content

Commit 459d871

Browse files
committed
Package sphinx-verilog-domain
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
1 parent 1c2d330 commit 459d871

File tree

6 files changed

+69
-16
lines changed

6 files changed

+69
-16
lines changed

.gitignore

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
1-
__pycache__/
21
build/
2+
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
35
*.py[cod]
6+
*$py.class
7+
8+
# Distribution / packaging
9+
.Python
10+
build/
11+
develop-eggs/
12+
dist/
13+
downloads/
14+
eggs/
15+
.eggs/
16+
lib/
17+
lib64/
18+
parts/
19+
sdist/
20+
var/
21+
wheels/
22+
share/python-wheels/
423
*.egg-info/
24+
.installed.cfg
25+
*.egg

README.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
Sphinx Verilog Domain
1+
sphinx-verilog-domain
22
=====================
33

44
.. warning::
5-
This extension is in development stage.
65

7-
.. note::
8-
This extension is not a part of sphinxcontrib yet.
6+
This extension is in development stage.
97

108
Dependencies
119
------------
@@ -17,7 +15,7 @@ Enabling
1715

1816
Add extension in ``conf.py``::
1917

20-
extensions = [ 'sphinxcontrib.verilogdomain' ]
18+
extensions = [ 'sphinxcontrib-verilog-domain' ]
2119

2220
Usage
2321
-----

setup.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import setuptools
2+
3+
with open("README.rst", "r") as fh:
4+
long_description = fh.read()
5+
6+
setuptools.setup(
7+
name="sphinx-verilog-domain",
8+
version="0.0.1",
9+
author="SymbiFlow Authors",
10+
author_email="symbiflow@lists.librecores.org",
11+
description="Verilog Domain for Sphinx",
12+
long_description=long_description,
13+
long_description_content_type="text/x-rst",
14+
url="https://github.com/SymbiFlow/sphinx-verilog-domain",
15+
python_requires=">=3.7",
16+
packages=setuptools.find_packages(),
17+
install_requires=[
18+
'setuptools',
19+
'docutils',
20+
'sphinx',
21+
'lark-parser'
22+
],
23+
classifiers=[
24+
'Development Status :: 4 - Beta',
25+
'Framework :: Sphinx :: Extension',
26+
'Intended Audience :: Developers',
27+
"License :: OSI Approved :: ISC License (ISCL)",
28+
"Programming Language :: Python :: 3",
29+
'Natural Language :: English',
30+
'Topic :: Documentation :: Sphinx',
31+
],
32+
)

sphinx-verilog-domain/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from sphinx.application import Sphinx
2+
from .verilogdomain import VerilogDomain
3+
4+
def setup(app: Sphinx):
5+
app.add_config_value('verilog_domain_debug', [], '')
6+
app.add_domain(VerilogDomain)
7+
8+
return {
9+
"version": "0.0.2",
10+
"parallel_read_safe": True,
11+
"parallel_write_safe": True,
12+
}
File renamed without changes.

sphinxcontrib/verilogdomain.py renamed to sphinx-verilog-domain/verilogdomain.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -753,13 +753,3 @@ def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
753753
qualified_name_without_root = VerilogQualifiedIdentifier(obj.qualified_name[1:])
754754
tooltip = f"{obj.objtype} {qualified_name_without_root}" if obj.objtype else f"{qualified_name_without_root}"
755755
return make_refnode(builder, fromdocname, obj.docname, obj.linktarget, contnode, tooltip)
756-
757-
def setup(app):
758-
app.add_config_value('verilog_domain_debug', [], '')
759-
app.add_domain(VerilogDomain)
760-
761-
return {
762-
"version": "0.1",
763-
"parallel_read_safe": True,
764-
"parallel_write_safe": True,
765-
}

0 commit comments

Comments
 (0)