Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kestrel Collaboration
Kestrel LiteX
migen
Commits
77f25554
Commit
77f25554
authored
7 years ago
by
Tim 'mithro' Ansell
Committed by
Sébastien Bourdeauducq
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
doc: Fixing the version info.
parent
b008f1d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
doc/conf.py
doc/conf.py
+12
-5
No files found.
doc/conf.py
View file @
77f25554
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
#sys.path.insert(0, os.path.abspath('.'))
import
re
import
sphinx_rtd_theme
import
sphinx_rtd_theme
# -- General configuration -----------------------------------------------------
# -- General configuration -----------------------------------------------------
...
@@ -53,10 +55,14 @@ copyright = u'2011-2015, M-Labs Limited'
...
@@ -53,10 +55,14 @@ copyright = u'2011-2015, M-Labs Limited'
# |version| and |release|, also used in various other places throughout the
# |version| and |release|, also used in various other places throughout the
# built documents.
# built documents.
#
#
import
pkg_resources
migen_version
=
pkg_resources
.
require
(
"migen"
)[
0
].
version
# The short X.Y version.
# The short X.Y version.
version
=
'1.0'
version
=
re
.
sub
(
r
'(\d+\.\d+)(\..*)'
,
r
'\1'
,
migen_version
)
# The full version, including alpha/beta/rc tags.
# The full version, including alpha/beta/rc tags.
release
=
'1.0'
release
=
migen_version
print
(
"%s %s"
%
(
version
,
release
))
# The language for content autogenerated by Sphinx. Refer to documentation
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# for a list of supported languages.
...
@@ -227,6 +233,7 @@ man_pages = [
...
@@ -227,6 +233,7 @@ man_pages = [
# -- Options for links to the code ---------------------------------------------
# -- Options for links to the code ---------------------------------------------
# Taken from numpy - https://github.com/numpy/numpy/blob/master/doc/source/conf.py#L273
# Taken from numpy - https://github.com/numpy/numpy/blob/master/doc/source/conf.py#L273
import
migen
import
inspect
import
inspect
from
os.path
import
relpath
,
dirname
from
os.path
import
relpath
,
dirname
...
@@ -279,11 +286,11 @@ def linkcode_resolve(domain, info):
...
@@ -279,11 +286,11 @@ def linkcode_resolve(domain, info):
else
:
else
:
linespec
=
""
linespec
=
""
fn
=
relpath
(
fn
,
start
=
dirname
(
numpy
.
__file__
))
fn
=
relpath
(
fn
,
start
=
dirname
(
migen
.
__file__
))
if
'dev'
in
numpy
.
_
_version
__
:
if
'dev'
in
migen
_version
:
return
"http://github.com/m-labs/migen/blob/master/migen/%s%s"
%
(
return
"http://github.com/m-labs/migen/blob/master/migen/%s%s"
%
(
fn
,
linespec
)
fn
,
linespec
)
else
:
else
:
return
"http://github.com/m-labs/migen/blob/v%s/migen/%s%s"
%
(
return
"http://github.com/m-labs/migen/blob/v%s/migen/%s%s"
%
(
numpy
.
__version__
,
fn
,
linespec
)
migen
.
__version__
,
fn
,
linespec
)
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment