Change the docs to not require library installation
This commit is contained in:
@@ -2,34 +2,3 @@
|
||||
|
||||
API Reference
|
||||
===================
|
||||
|
||||
.. automodule:: capnp
|
||||
|
||||
.. currentmodule:: capnp
|
||||
|
||||
Functions
|
||||
-------------
|
||||
.. autofunction:: load
|
||||
.. autofunction:: writeMessageToFd
|
||||
.. autofunction:: writePackedMessageToFd
|
||||
|
||||
Readers
|
||||
-------------
|
||||
|
||||
.. autoclass:: StreamFdMessageReader
|
||||
:members:
|
||||
:undoc-members:
|
||||
:inherited-members:
|
||||
|
||||
.. autoclass:: PackedFdMessageReader
|
||||
:members:
|
||||
:undoc-members:
|
||||
:inherited-members:
|
||||
|
||||
Writers
|
||||
-------------
|
||||
|
||||
.. autoclass:: MallocMessageBuilder
|
||||
:members:
|
||||
:undoc-members:
|
||||
:inherited-members:
|
||||
|
||||
26
docs/conf.py
26
docs/conf.py
@@ -48,18 +48,22 @@ copyright = u'2013, Author'
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
import pkg_resources
|
||||
try:
|
||||
release = pkg_resources.get_distribution('capnp').version
|
||||
except pkg_resources.DistributionNotFound:
|
||||
print 'To build the documentation, The distribution information of sandman'
|
||||
print 'Has to be available. Either install the package into your'
|
||||
print 'development environment or run "setup.py develop" to setup the'
|
||||
print 'metadata. A virtualenv is recommended!'
|
||||
sys.exit(1)
|
||||
del pkg_resources
|
||||
def extract_version():
|
||||
"""extract version from version.py, so it's not multiply defined"""
|
||||
with open(os.path.join('..', 'capnp', 'version.py')) as f:
|
||||
line = f.readline()
|
||||
while not line.startswith("version"):
|
||||
line = f.readline()
|
||||
print line
|
||||
exec(line)
|
||||
return version
|
||||
|
||||
version = '.'.join(release.split('.')[:2])
|
||||
vs = extract_version()
|
||||
# The short X.Y version.
|
||||
import string
|
||||
version = vs.rstrip(string.letters)
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = vs
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
||||
Reference in New Issue
Block a user