Skip to content

Commit fadd275

Browse files
committed
docs: A bunch of small customizations
1 parent 11f98b9 commit fadd275

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

docs/conf.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
#!/usr/bin/env python3
22

3-
import sys
4-
import os
5-
63
import alabaster
7-
4+
import os
5+
import re
6+
import sys
87

98
sys.path.insert(0, os.path.abspath('..'))
109

10+
with open(os.path.abspath('../setup.py'), 'rt') as f:
11+
_m = re.search(r'''version=(?P<q>'|")(?P<ver>[\d\.]+)(?P=q)''', f.read())
12+
if not _m:
13+
raise RuntimeError('unable to read the version from setup.py')
14+
version = _m.group('ver')
15+
1116

1217
# -- General configuration ------------------------------------------------
1318

@@ -19,10 +24,9 @@
1924
source_suffix = '.rst'
2025
master_doc = 'index'
2126
project = 'uvloop'
22-
copyright = '2016, Yury Selivanov'
27+
copyright = '2016-present, MagicStack, Inc'
2328
author = 'Yury Selivanov'
24-
version = '0.4.14'
25-
release = '0.4.14'
29+
release = version
2630
language = None
2731
exclude_patterns = ['_build']
2832
pygments_style = 'sphinx'
@@ -40,17 +44,16 @@
4044
html_theme_path = [alabaster.get_path()]
4145
html_title = 'uvloop Documentation'
4246
html_short_title = 'uvloop'
43-
html_static_path = ['_static']
47+
html_static_path = []
4448
html_sidebars = {
4549
'**': [
4650
'about.html',
4751
'navigation.html',
48-
'searchbox.html',
4952
]
5053
}
5154
html_show_sourcelink = False
5255
html_show_sphinx = False
53-
html_show_copyright = False
56+
html_show_copyright = True
5457
htmlhelp_basename = 'uvloopdoc'
5558

5659

docs/dev/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ A goal for the `uvloop` project is to provide a drop in replacement for the
1010
`asyncio` event loop is considered a bug.
1111

1212
If you have found a bug or have an idea for an enhancement that would
13-
improve the library, use the `bug tracker <https://github.com/MagicStack/uvloop/issues>`_.
13+
improve the library, use the
14+
`bug tracker <https://github.com/MagicStack/uvloop/issues>`_.
1415

1516

1617
Get the source

docs/index.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1+
.. image:: https://travis-ci.org/MagicStack/uvloop.svg?branch=master
2+
:target: https://travis-ci.org/MagicStack/uvloop
13

2-
.. raw:: html
3-
4-
<div>
5-
<img src="https://img.shields.io/pypi/status/uvloop.svg?maxAge=2592000?style=plastic" />
6-
<img src="https://img.shields.io/travis/MagicStack/uvloop/master.svg" />
7-
<br />
8-
<br />
9-
</div>
4+
.. image:: https://img.shields.io/pypi/status/uvloop.svg?maxAge=2592000?style=plastic
5+
:target: https://pypi.python.org/pypi/uvloop
106

117
uvloop
128
======
@@ -21,7 +17,8 @@ makes it easier than ever to write high-performance networking code in Python.
2117
gevent, as well as any other Python asynchronous framework. The performance of
2218
uvloop-based asyncio is close to that of Go programs.
2319

24-
You can read more about uvloop in this `blog post <http://magic.io/blog/uvloop-blazing-fast-python-networking/>`_.
20+
You can read more about uvloop in this
21+
`blog post <http://magic.io/blog/uvloop-blazing-fast-python-networking/>`_.
2522

2623
Architecture
2724
------------

0 commit comments

Comments
 (0)