Skip to content

Commit 9a25b50

Browse files
committed
Fix docs build
1 parent 620d662 commit 9a25b50

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

.github/workflows/gh-pages.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ jobs:
1010
runs-on: ubuntu-18.04
1111
steps:
1212
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
1315

1416
- uses: ammaraskar/sphinx-action@master
1517
with:
1618
docs-folder: "docs/"
19+
pre-build-command: "apt-get update -y && apt-get install -y git && pip install -e .[docs]"
1720

1821
- name: Deploy
1922
uses: peaceiris/actions-gh-pages@v3

docs/conf.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,16 @@
1414
#
1515
import os
1616
import sys
17-
sys.path.insert(0, os.path.abspath('..'))
1817

1918

2019
# -- Project information -----------------------------------------------------
2120

2221
project = 'RISC-V Model'
23-
copyright = '2018, Stefan Wallentowitz'
22+
copyright = '2018-2020, Stefan Wallentowitz'
2423
author = 'Stefan Wallentowitz'
2524

26-
from pkg_resources import get_distribution
27-
release = get_distribution('riscv-model').version
2825
# for example take major/minor
29-
version = '.'.join(release.split('.')[:2])
30-
26+
from riscvmodel import __version__ as release
3127

3228
# -- General configuration ---------------------------------------------------
3329

@@ -75,7 +71,7 @@
7571
# The theme to use for HTML and HTML Help pages. See the documentation for
7672
# a list of builtin themes.
7773
#
78-
html_theme = 'sphinx_rtd_theme'
74+
html_theme = 'python_docs_theme'
7975

8076
# Theme options are theme-specific and customize the look and feel of a theme
8177
# further. For a list of options available for each theme, see the

riscvmodel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
try:
22
from riscvmodel.version import version as __version__
33
except ImportError:
4-
__version__ = "unknown"
4+
__version__ = "unknown"

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@
2424
},
2525
setup_requires=[
2626
'setuptools_scm',
27+
'wheel'
2728
],
29+
extras_require={
30+
'docs': ['sphinx', 'python-docs-theme']
31+
},
2832
classifiers=[
2933
"Programming Language :: Python :: 3",
3034
"License :: OSI Approved :: MIT License",
3135
"Operating System :: OS Independent",
3236
],
33-
)
37+
)

0 commit comments

Comments
 (0)